Brice Jaglin
9ff4e1d1e9
cache semanticdb output when not included in JAR
2025-03-28 12:47:03 +01:00
Eugene Yokota
2f4280c6f3
fix: Fix incremental test with companion objects
...
**Problem**
Incremental test (aka testQuick) has a bug when companion objects
depends on others since at some point it's failing to look up relationship from Zinc analysis.
**Solution**
This fixes the lookup.
2025-03-23 22:25:16 -04:00
Eugene Yokota
de5c9b1869
Scala 3.6.4
2025-03-10 01:51:32 -04:00
Brice Jaglin
80ac808619
Remove debug println
2025-03-10 02:37:15 +01:00
Eugene Yokota
8db8c79d33
Implement client-side run
...
**Problem**
`run` task has been emulated via function call inside of a sandboxed classloader,
and blocking the command processing of sbt server loop.
This poses isolation and availability issues.
**Solution**
This implements client-side run where the server creates a sandbox environment, and sends the information to the client,
and the client forks a new JVM to perform the run.
The client-side behavior has been implemented in sbtn side already.
2025-03-09 15:00:24 -04:00
Eugene Yokota
2c3c0f4a7c
Merge branch '1.10.x' into wip/merge-1.10.x
2025-03-08 19:05:30 -05:00
Eugene Yokota
946b54c858
Skip retry on CompileCancelled
...
**Problem**
When compilation fails, it's retrying 10 times
since Retry now retries on non-IOExceptions.
**Solution**
This adds CompileFailed to excluded exception list.
2025-03-03 22:19:22 -05:00
Eugene Yokota
5d5fe21ec5
Revert run switching on 1.x
...
**Problem**
client-side run apparently won't work for Scala.JS,
so forcing sbtn users to client-side run will break the Scala.JS users.
**Solution**
This reverts the client-side run on sbt 1.x, while retaining the
mechanism for sbt 2.x usages via sbtn.
Now, if `run / connectInput := true` is true, stdout will not display on sbtn.
2025-03-03 04:59:36 -05:00
Eugene Yokota
a18ed19cbc
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.
2025-03-03 02:31:44 -05:00
Eugene Yokota
67265638c6
Implement client-side run
...
**Problem**
`run` task blocks the server, but during the run the server is just
waiting for the built program to finish.
**Solution**
This implements client-side run where the server creates a sandbox
environment, and sends the information to the client,
and the client forks a new JVM to perform the run.
2025-03-02 20:45:04 -05:00
xuwei-k
5d660ab8b5
remove unnecessary `case`
...
- 3ca3633505/rules/src/main/scala/fix/RemoveParameterUntuplingCase.scala
- https://docs.scala-lang.org/scala3/reference/other-new-features/parameter-untupling.html
- https://docs.scala-lang.org/scala3/reference/other-new-features/parameter-untupling-spec.html
2025-02-22 08:48:29 +09:00
Eugene Yokota
cb63de6574
Merge branch '1.10.x' into wip/merge-1.10.x
2025-02-10 02:43:30 -05:00
eugene yokota
971991c72f
Merge pull request #8033 from eed3si9n/wip/inputtaskdyn
...
[2.x] Implement Def.inputTaskDyn
2025-02-07 20:38:57 -05:00
Adrien Piquerez
711df2cbf2
Internal usage of inputTaskDyn
2025-02-07 12:02:16 +01:00
Eugene Yokota
11cd58daa7
Implement Def.inputTaskDyn
...
**Problem/Solution**
This implements Def.inputTaskDyn using Scala 3 macros.
2025-02-05 02:04:22 -05:00
Dmitrii Naumenko
a7d862a08b
detect user-specific jdk installations on macOs ( fixes #8031 )
...
User-specific JDKs are installed, for example, by IntelliJ IDEA
2025-02-04 18:11:40 +01:00
Josh Soref
613eb86447
Spelling ( #8028 )
...
* spelling: 1.x
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: a
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: aether
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: anymore
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: artifact
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: available
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: be
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: bridge
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: cannot
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: case-insensitive
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: checksum
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: class loads
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: contra
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: dependencies
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: dependency
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: dependent
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: deriveds
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: describes
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: early
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: enclosed
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: evaluation
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: excluding
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: execution
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: for
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: frequently
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: github
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: green
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: https://www
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: https
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: in-sourcing
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: include
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: incompatible
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: indefinitely
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: information
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: inputted
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: just
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: lastmodifiedtimes
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: latest
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: manifest
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: miscellaneous
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: more
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: neither
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: never
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: nonexistent
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: opted
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: outputting
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: params
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: performance
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: preceding
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: presentation
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: project
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: projects
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: protocol
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: related
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: representation
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: res
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: resolverlist
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: resolverset
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: response
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: returned
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: sbt_version
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: scalacheck
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: sentinels
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: separates
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: serves
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: should
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: significant
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: specifically
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: substitute
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: suppress
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: terminal
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: the
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: title
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: transitive
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: version
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: versions
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: want
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: wanting
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* spelling: whether
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* link: sbt Cached Resolution
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* link: Testing sbt plugins
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
---------
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-02-04 01:11:28 -05:00
Eugene Yokota
c6b7b5a061
[2.x] fix: Fix semanticdbEnabled
...
**Problem**
semanticdbEnabled doesn't work on sbt 2.x
1. classes directory has changed during compilation
2. semanticdb scalacOptions are duplicated for Test
**Solution**
1. change to using the backend directory
2. reimplement scalacOptions handling
2025-02-01 01:28:57 -05:00
Dmitrii Naumenko
9352e1cdad
[2.x] fix: updateSbtClassifiers task fails with error ( #8022 )
...
In `classifiersModuleTask` we now don't include the full plugin classpath, but include only the dependency classpath (effectively excluding sbt.PluginData.definitionClasspath). Only items from the dependency classpath are considered to be published. Only for them we can download classifier artifacts later in the `updateSbtClassifiers` pipeline.
This also fixes integration test "dependency-management/update-sbt-classifiers".
I also made the test stricter, it now tests the module ids that are included in the sbt classpath.
2025-01-29 14:54:09 +01:00
Josh Soref
2ee5eb7fa7
Make timing outputs consistently show hours and hint at time format
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-01-29 04:20:37 -05:00
Eugene Yokota
55b1fdeddb
fix: Fix Chrome tracing file
...
**Problem**
We changed the content of Chrome tracing file incorrectly
and renamed tid to tname.
**Solution**
1. This renames tname back to to tid.
2. To retain the fix to avoid Thread#getId, this calls
either the JDK 8 way or the JDK 19 way reflectively.
2025-01-28 04:11:36 -05:00
Josh Soref
0493dee315
Make timing outputs consistently show hours and hint at time format
...
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-01-27 12:42:53 -05:00
Lukas Rytz
e46843bfd9
Add setting to allow demoting the SIP-51 build failure
...
Add a `allowUnsafeScalaLibUpgrade` setting (default is `false`) to
demote the SIP-51 build failure to a warning.
If the scalaVersion is 2.13.12 but some dependency pulls in
scala-library 2.13.13, the compiler will stay at 2.13.12, but
the dependency classpath will contain scala-library 2.13.13.
This usually works, the compiler can run fine with a newer
scala-library on its dependency classpath.
Macro expansion may fail, if the macro uses some library
class / method that doesn't exist in the old version.
The macro itself is loaded from the dependency classpath
into the class loader running the compiler, where the older
Scala library is on the runtime classpath.
Using the Scala REPL in sbt may also fail in a similar fashion.
2025-01-20 10:00:13 +01:00
eugene yokota
873f8b1261
Merge branch 'develop' into wip/run
2025-01-12 18:05:11 -05:00
Eugene Yokota
08fcea4c77
refactor: Refactor MainLoop.scala
...
**Problem/Solution**
This refactors MainLoop.scala.
2025-01-12 03:03:03 -05:00
Eugene Yokota
cd09003583
fix: Fix sbtn not showing run
...
**Problem**
Currently sbtn doesn't correctly display the stdout
during `run` because by the time it starts the terminal has been reset.
**Solution**
Don't reset the terminal in-between the tasks.
2025-01-12 02:24:23 -05:00
Eugene Yokota
bcad9f6887
fix: Fix run getting stuck
...
**Problem**
When the run ends too quickly it gets stuck.
**Solution**
This doesn't pause the channel if the job is already done.
2025-01-12 01:30:12 -05:00
Derek Wickern
f0afda3dd0
make NetworkChannel#thread private
2025-01-11 13:08:18 -08:00
Derek Wickern
a13bfd3ef9
fix race condition in NetworkChannel
2025-01-11 12:46:35 -08:00
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
friendseeker
c834f500b9
Add comment
2024-12-30 19:30:15 -08:00
Friendseeker
1a8fa65af3
Avoid upstream compilation when calling previousCompile
2024-12-30 17:55:42 -08:00
eugene yokota
439e24fb84
Merge pull request #7979 from eed3si9n/wip/retry
2024-12-30 08:47:04 -05:00
adpi2
011c7083ad
Merge pull request #7913 from Friendseeker/sbt-7510
...
[1.x] Implement `jvmBuildTarget` for `workspace/buildTargets`
2024-12-30 09:06:53 +01:00