Commit Graph

3590 Commits

Author SHA1 Message Date
xuwei-k da26f3078b use withFilter instead of filter 2025-01-04 09:10:36 +09:00
xuwei-k 614d9ce985 remove unused private val and def 2025-01-02 18:48:32 +09:00
eugene yokota 52d36653da
Merge pull request #7997 from xuwei-k/scalafmt-convertToNewSyntax
[2.x] update `.scalafmt.conf`. enforce new scala 3 syntax
2025-01-01 22:34:03 -05:00
eugene yokota 734d06a3c6
Merge pull request #7996 from xuwei-k/enum-sealed-trait 2025-01-01 22:04:23 -05:00
xuwei-k 13d6626564 update .scalafmt.conf. enforce new scala 3 syntax 2025-01-02 11:25:34 +09:00
xuwei-k a7ba960c17 use enum instead of sealed trait 2025-01-02 10:52:37 +09:00
xuwei-k e0a51807bc change to using param anonymous if possible 2025-01-02 10:35:15 +09:00
xuwei-k d7ec1013da remove unused type params 2025-01-01 18:42:59 +09:00
eugene yokota 8be482533a
Merge pull request #7991 from xuwei-k/lazyZip
[2.x] use `lazyZip`
2025-01-01 03:06:26 -05:00
eugene yokota 308af6c695
Merge pull request #7990 from xuwei-k/extaHashes-typo
[2.x] fix typo
2025-01-01 03:05:58 -05:00
eugene yokota 6a3f16de7c
Merge pull request #7988 from xuwei-k/correspond-file-class-name
[2.x] correspond file name and class name
2025-01-01 03:05:08 -05:00
eugene yokota df6e1bc2aa
Merge pull request #7986 from xuwei-k/string-interpolation-format-s
[2.x] use string interpolation instead of `format` method
2025-01-01 03:03:43 -05:00
xuwei-k 5c5a14aac5 use lazyZip 2025-01-01 16:34:54 +09:00
kenji yoshida 26eaee1ac1
fix typo 2025-01-01 16:29:51 +09:00
xuwei-k 2167a72ac3 correspond file name and class name 2025-01-01 16:12:30 +09:00
xuwei-k 13563f9d49 use string interpolation instead of `format` method 2025-01-01 16:02:11 +09:00
xuwei-k 3d6286edc2 remove unnecessary vararg splice 2025-01-01 15:47:55 +09:00
eugene yokota 439e24fb84
Merge pull request #7979 from eed3si9n/wip/retry 2024-12-30 08:47:04 -05:00
xuwei-k f255c38892 use toIntOption instead of scala.util.Try 2024-12-30 13:13:53 +09:00
Eugene Yokota 799bd65ba5 fix: Retry create directory
**Problem**
Files.createDirectories can fail.

**Solution**
Use IO version, which retries.
2024-12-29 03:18:18 -05:00
Eugene Yokota 515cae27a8 Cache terminal capability
**Problem**
JSON-RPC is currently full of terminal capability query
since JLine seems to be asking them for each line.

**Solution**
This caches the query.
2024-12-28 04:09:01 -05:00
Eugene Yokota 8e13a43f48 Zinc 2.0.0-M3 2024-12-18 00:26:30 -05:00
Eugene Yokota 12db63951b Address reviews 2024-12-16 22:22:33 -05:00
Eugene Yokota 3d86f30837 Merge branch '1.10.x' into wip/merge-1.10.x 2024-12-16 03:20:10 -05:00
Eugene Yokota 0906b2d7ac fix: Use JDK path, not JRE path
**Problem**
There are a few places where javaHome or java path is set,
using java.home system property. The problem is that it points to JRE,
not JDK, so it would break on Java compilation etc.

**Solution**
If the path ends with jre, go up one directory.
2024-12-15 02:47:35 -05:00
Matthew de Detrich eea840be2c Replace tuple with proper record type for licenses 2024-12-05 00:56:39 -05:00
Eugene Yokota 02c7cf309d Avoid the use of URL
**Problem**
`java.net.URL` calls out to the network to perform `equals`,
so we should remove that from anywhere that can be involved in caching etc.

**Solution**
This changes java.net.URL to java.net.URI in Keys.
2024-12-04 22:12:54 -05:00
Eugene Yokota ac4ba55e9e fix: Fix root project detection
**Problem**
Whether a subproject is root or not is currently detected by
comparing getCanonicalFile against the build base directory.
Problem is that often the root project uses "." as the directory,
and getting the canonical file works ok for the current build,
but it breaks when loading `ProjectRef`.
There might be other bugs related to the root project detection.

**Solution**
This factors out `isRootPath` function that's aware of the build base.

This PR adds the repro test prepared by xuwei-k.
2024-12-02 03:15:35 -05:00
Eugene Yokota 56e83977e9 fix: Remove -Wconf:cat=unused-nowarn:s
**Problem**
Currently the following warning shows up while compiling metabuild:

[warn] Failed to parse `-Wconf` configuration: cat=unused-nowarn:s
[warn] unknown category: unused-nowarn

-Wconf:cat=unused-nowarn in general was added as a Scala 2.12 of
falsely warning about pure expression not doing anything in the macro.

**Solution**
We should be able to remove the -Wconf flag in sbt 2.x.
2024-12-01 18:09:38 -05:00
Eugene Yokota 111eb123fa Call store.clearCache() 2024-11-30 00:51:20 -05:00
Eugene Yokota efe2a83c73 Zinc 1.10.5 2024-11-30 00:05:26 -05:00
eugene yokota f03ff1f32b
Merge pull request #7916 from Friendseeker/ctrl-c-background-task 2024-11-27 20:23:28 -05:00
friendseeker b49fe9dc97
Add boolean flag isAutoCancel
Address PR feedback from Eugene
2024-11-27 01:30:01 -08:00
friendseeker e613cb70ea
Avoid generation of negative frequency 2024-11-27 00:52:57 -08:00
Friendseeker 9494033bd6 Shutdown background jobs when pressing ctrl+c 2024-11-26 23:40:23 -08:00
friendseeker eefc89605e Improve message format for loading settings 2024-11-26 16:46:48 -08:00
Eugene Yokota eb7d43c363 Refactor RefThenConfig to be an opaque type 2024-11-26 04:55:08 -05:00
Eugene Yokota 70d7ddb258 Refactor slash syntax to mostly use methods
**Problem**
Slash syntax is currently implemented via a series of implicit
converters (Conversion), which is not nice, partly because
the behavior is difficult to follow.

**Solution**
This removes all the implicit converters and moves the slashes
into:
1. / methods under Reference for subproject scoping.
2. / methods under ScopeAxis with Reference type constraint
   for the initial Zero scoping.
3. Return RefThenConfig structure for intermediate config scoping.
4. / method under `Scoped`, which is base trait for the keys
   to implement task scoping e.g. `compile / scalacOptions`.
5. Extension methods for ConfigKey.
6. Extension methods for AttributeKey.
2024-11-25 04:54:40 -05:00
Eugene Yokota 4e3fbcced9 Refactor ScopeAxis to use enum 2024-11-24 23:10:18 -05:00
Eugene Yokota 56377274b7 fix: Fix Scala 3.x - 2.12 sandwich for matrix
Problem
Currently Scala 3.x - 2.13 sandwich doesn't seem to work for projectMatrix.
This is due to isScala2Scala3Sandwich checking for "3." while projectMatrix
uses scalaBinaryVersion, which is 3.

Solution
This consolidates the implementation of isScala2Scala3Sandwich with the one
in Defaults module, and check for both "3" and "3."
2024-11-23 04:05:28 -05:00
eugene yokota f25fde18a4
Merge pull request #7906 from Friendseeker/sbt-6905
[1.x] Synchronize `dependencyTree` console output
2024-11-22 16:28:40 -05:00
eugene yokota 0ec6424a51
Merge pull request #7905 from Friendseeker/sbt-7828
[1.x] Synchronize `java.awt.Desktop.browse()`
2024-11-22 00:30:59 -05:00
Friendseeker 27cec84333 Synchronize dependencyTree console output 2024-11-21 17:36:22 -08:00
Friendseeker de4c3da451 Add synchronized for desktop.browse() 2024-11-21 17:02:15 -08:00
Friendseeker c8940bfba0 Respect dependencyBrowseGraphTarget, dependencyBrowseTreeTarget 2024-11-21 16:24:49 -08:00
xuwei-k d8705bbac0 use given instead of implicit object 2024-11-18 17:09:03 +09:00
xuwei-k f11d9d76f0 remove more implicit. use given and using 2024-11-18 14:39:00 +09:00
xuwei-k d193c990d1 remove implicit params. change to using 2024-11-18 06:49:22 +09:00
xuwei-k c5b7038f3a use `given` instead of `implicit val` 2024-11-17 17:35:23 +09:00
friendseeker 1ec08180f7
Remove enableConsistentCompileAnalysis & enableBinaryCompileAnalysis 2024-11-16 21:27:29 -08:00