Commit Graph

1301 Commits

Author SHA1 Message Date
Anatolii Kmetiuk 4ed16c96ce
[2.x] Fix publishDiagnostics propagation (#9376)
**Problem**
Test is based on https://github.com/sbt/sbt/issues/9345#issuecomment-4718229113 which gives us the following sequence:

1. Metals sends buildTarget/compile.
2. sbt publishes real non-empty diagnostics.
3. Metals sends buildTarget/scalaMainClasses.
4. During that request, sbt emits build/publishDiagnostics with diagnostics: [] and reset: true.
5. The following build/taskFinish still reports errors: 1.

Previously, errors for diagnostics reporting via bsp were collected from a live compilation run. In the sequence above, that is triggered by buildTarget/compile. Then, buildTarget/scalaMainClasses does not trigger such a run for the second time, it uses the cached compilation result. Therefore, the diagnostics is not populated.

**Solution**
The proposed fix modifies sendFailureReport to accept an optional CompileFailed object that contains the diagnostics even in case the actual compiler did not run because the cached result was used. If no problems were found for a file via default means, this CompileFailed object is queried to see if it has any information about problems in a given file.
2026-06-26 12:36:42 -04:00
eugene yokota f468735c9f
[2.x] sbtn 2.0.0-2932685e (#9363) 2026-06-21 14:41:45 -04:00
kenji yoshida c33b795c78
[2.x] ci: Update version and ivy tests (#9342) 2026-06-15 12:28:14 -04:00
kenji yoshida 29f2c8648f
[2.x] ci: Update mimaPreviousArtifacts (#9341) 2026-06-15 12:26:58 -04:00
eugene yokota 183ed46375
[2.x] sbtn 2.0.0-f0d2fae4 (#9333) 2026-06-14 01:32:02 -04:00
kenji yoshida ad6c7a35a8
Update mimaPreviousArtifacts (#9308) 2026-06-09 14:21:18 -04:00
eugene yokota ac320c7fd0
[2.x] fix: ByteStream chunked upload/download (#9298)
**Problem**

BatchUpdateBlobsRequest suffers from gRPC's message size limitation.

**Solution**

For larger files, we switch to using the ByteStream API, chunked to 1MB at a time.
2026-06-07 15:17:20 -04:00
kenji yoshida e27f3df021
[2.x] ci: Remove duplicate scalaVersion setting (#9297) 2026-06-03 10:40:44 -04:00
kenji yoshida 7b73bd1f44
Update mima setting (#9294) 2026-06-01 23:26:07 -04:00
Eugene Yokota f327ef14d0 [2.x] sjson-new 0.15.0 2026-06-01 01:52:50 -04:00
Eugene Yokota 0bab2066df [2.x] Reimplement FarmHash
**Problem**
sbtn and server uses FarmHash.

**Solution**
This reimplements FarmHash using Scala.
2026-05-31 16:07:28 -04:00
eugene yokota 315202181c
[2.x] ci: Scalafmt 3.11.1 (#9279)
Apply Scalafmt
2026-05-31 16:01:15 -04:00
eugene yokota ffa8c14ca6
[2.x] Migrate FarmHash usage to xxhash64 (#9267)
Problem
ZAHa, which we use for FarmHash, uses Unsafe.

Solution
This ports xxhash64 to Scala.
2026-05-30 19:14:53 -04:00
kenji yoshida 96bb1848da
[2.x] Update mimaSettings (#9242) 2026-05-17 18:59:44 -04:00
eugene yokota 2488e973db
[2.x] Update sbtn to 2.0.0-RC14 for timeout fix (#9240) 2026-05-17 14:12:57 -04:00
eugene yokota 57495c28dc
[2.x] fix: Include test arg into hash (#9222)
**Problem**
test -- foo passes on MUnit, allowing failing tests to be validated.

**Solution**
Include test args into the cache input.
2026-05-16 04:12:33 -04:00
eugene yokota d27c6a46df
[2.x] fix: Invalidate on JDK version (#9216)
**Problem**
sbt 2.x caching doesn't invalidate on JDK version.

**Solution**
Invalidate on JDK version.
2026-05-14 03:13:16 -04:00
eugene yokota c491f035f8
[2.x] test: Port tests to use lm-coursier (#9205)
**Problem**
Some tests are failing.

**Solution**

* Port EvictionErrorSpec to lm-coursier
* Port EvictionWarningSpec to lm-coursier
* Port InclExclSpec to lm-coursier
* Port ZincComponentCompilerSpec to lm-coursier
* Apparently we still need lmIvy
2026-05-10 04:40:15 -04:00
kenji yoshida 590dbbacb8
Avoid infix syntax in build files (#9175) 2026-05-03 12:40:00 -04:00
xuwei-k a377790ed7 Remove "-source:3.7" option 2026-05-03 21:02:56 +09:00
kenji yoshida ddd888dc42
[2.x] Remove duplicate packageSrc/mappings (#9156) 2026-04-29 08:58:36 -04:00
kenji yoshida dd1eb78e8a
Remove unnecessary code in build.sbt (#9154) 2026-04-29 08:56:08 -04:00
kenji yoshida 01fbc474f1
[2.x] ci: Avoid infix syntax in build files (#9157) 2026-04-29 08:41:54 -04:00
eugene yokota 0968cbf7ef
[2.x] perf: Use bytecodeHash for incremental test (#9146)
**Problem**
There's perf issue building ClassStamp for the incremental test.

**Solution**
This reuses the bytecodeHash created during compilation.
2026-04-29 03:27:04 -04:00
kenji yoshida c9c90978e4
[2.x] ci: Avoid postfix in build files (#9150) 2026-04-29 03:13:17 -04:00
eugene yokota 5b9553af9e
[2.x] Bump sbtn to 2.0.0-RC13 (#9140) 2026-04-27 01:03:42 -04:00
eugene yokota 64463535ca
[2.x] refactor: Replace string Array with ju.List (#9138)
**Problem**
Scala 3 supposedly has problem with String array in structural types.

**Solution**
This works around the issue by using ju.List.
2026-04-27 00:22:30 -04:00
Ali Rashid 9275bda052
[2.x] feat: Expose `scripted / excludeFilter` and `scripted / includeFilter` keys for scripted test filtering. (#9131)
* [2.x] feat: Add scripted / includeFilter and scripted / excludeFilter

* [2.x] Add scripted-exclude-filter scripted test. Remove stale item from Scripted.sbtWindowsExcludeFilter
2026-04-26 14:31:42 -04:00
Zainab Ali 3b1dbae74a
[2.x] Add Test configuration to evictionWarningOptions (#9102)
* Add Test configuration to evictionWarningOptions
* Add Test configuration to default evictionWarningOptions
* Deduplicate eviction errors based on callers.
* Update eviction error test for semantic versioning.
* Group evictions by configuration and update test.
2026-04-23 23:06:54 -04:00
Matthias Kurz 1f0b0e1bfa
[2.x] ci: Update sbt-java-formatter (#9098) 2026-04-21 12:19:44 -04:00
eugene yokota af0cbaf74e
Merge pull request #9112 from xuwei-k/duplicate-hedgehog
[2.x] Remove duplicate hedgehog TestFramework setting
2026-04-18 03:21:31 -04:00
xuwei-k 639a19d262 Update mimaPreviousArtifacts 2026-04-18 15:38:09 +09:00
xuwei-k 349e91da04 Remove duplicate hedgehog TestFramework setting 2026-04-18 08:22:42 +09:00
kenji yoshida 852505f9f7
[2.x] ci: Remove -Ymacro-expand option (#9072) 2026-04-12 01:57:41 -04:00
kenji yoshida d46ba8bfc9
[2.x] ci: Add -source-links option (#9063) 2026-04-12 01:56:17 -04:00
kenji yoshida 2e0a724c63
[2.x] refactor: Remove return from sbtw/Main (#9066) 2026-04-11 13:06:50 -04:00
kenji yoshida 160a6c1fb0
[2.x] Fix scaladoc issue in mainProj and sbtIvyProj (#9061) 2026-04-11 02:29:54 -04:00
kenji yoshida 7218b2a1ac
[2.x] ci: Remove unnecessary code in build file (#9045) 2026-04-08 23:58:39 -04:00
kenji yoshida 1601570602
Update mima setting (#9039) 2026-04-07 17:54:53 -04:00
kenji yoshida 8ad6ada60f
[2.x] Scala 3.8.3 (#8997) 2026-04-05 14:28:47 -04:00
kenji yoshida ed49601662
[2.x] ci: Organize scalatest dependency (#9015) 2026-04-04 23:54:09 -04:00
kenji yoshida 9936f9c07c
Update mima settings (#8991) 2026-03-29 23:03:20 -04:00
Dream 8132a392c3
[2.x] feat: Add dependencyMode setting to control classpath transitivity (#8960)
**Problem**
sbt always includes all transitive dependencies on the classpath.
This makes it easy to accidentally depend on transitive dependencies
without declaring them, leading to fragile builds that break when
a library changes its own dependencies.

**Solution**
Add a `dependencyMode` setting with three modes:

- DependencyMode.Transitive (default) — current behavior, all
  transitive dependencies on the classpath
- DependencyMode.Direct — only declared dependencies plus
  scala-library on the classpath
- DependencyMode.PlusOne — declared dependencies plus their
  immediate transitive dependencies plus scala-library

Fixes sbt/sbt#8942
2026-03-23 16:30:16 -04:00
Daniil Sivak 9939666a33
[2.x] fix: server-test and related refactoring (#8904)
- TestServer was replaced with ServerSession class, which is located in protocol module and allows you to interact with JSON-RPC sbt server.
2026-03-21 23:45:37 -04:00
kenji yoshida 14606c593d
[2.x] ci: Add scalafix DisableSyntax.noReturns (#8922) 2026-03-19 10:48:10 -04:00
bitloi 4696b91a17 CI: allowUnsafeScalaLibUpgrade for serverTestProj (Scala 3 eviction) 2026-03-16 17:39:06 +01:00
eugene yokota 39fa98ef79
[2.x] Update to Coursier 2.1.25-M24 (#8381)
This forward ports (https://github.com/coursier/sbt-coursier/pull/570), and follows along some of the migrated methods to work through the deprecations.
2026-03-13 22:57:38 -04:00
seroperson d322b2428c
[2.x] fix: remove staging directory before running tests 2026-03-12 13:17:43 +03:00
kenji yoshida 5dad0d325f
Format launcher-package/build.sbt (#8898) 2026-03-11 20:11:02 -04:00
Dream b3d2733fb1
[2.x] fix: Remove projectDescriptors key that leaks Ivy types (#8894)
**Problem**
The projectDescriptors key in sbt.Keys leaked Ivy classes
(ModuleRevisionId, ModuleDescriptor) through its API surface.
No external plugins use this key.

**Solution**
Remove projectDescriptors entirely. IvyDependencyPlugin now uses
its internal depMap method directly for projectResolverTask and
coursierExtraProjectsTask, eliminating unnecessary Any casts.
The descriptors field is also removed from GlobalPluginData.

Fixes sbt#8865
2026-03-11 14:53:39 -04:00