Commit Graph

3291 Commits

Author SHA1 Message Date
Adrien Piquerez b0f3cb0a8e Fix actions/completions
When loading a scripted test, sbt creates a jar file and loads it.
The path of the jar file is the same for all the batched tests.
We must prevent the JDK from caching this jar file to force a reload after each test.
Otherwise sbt tries to load the auto-plugins of a previous test and fails.
2024-04-08 10:05:52 +02:00
Adrien Piquerez 129b38f55b Fix tests/serial 2024-04-02 17:49:12 +02:00
Adrien Piquerez d9b024cf91 fix project1/ignore-hidden-build-files 2024-04-02 17:49:12 +02:00
Adrien Piquerez 4a946a68cd Fix project1/extra 2024-04-02 17:49:12 +02:00
Adrien Piquerez 222410009b fix no-scala-tool 2024-04-02 17:49:12 +02:00
Adrien Piquerez e2c7a294f8 minor change 2024-03-27 14:41:24 +01:00
Adrien Piquerez 453ccc6805 Uncomment pending tests 2024-03-26 10:12:29 +01:00
Adrien Piquerez 627bd6bea1 Fix checkTargets 2024-03-25 10:52:15 +01:00
Adrien Piquerez b5afcf8a0c Fix server completion tests 2024-03-19 17:06:09 +01:00
Adrien Piquerez 03ca5365f5 Fix BuildServerTest 2024-03-19 17:06:09 +01:00
Adrien Piquerez 924150851c Port server tests to scalatest and fix 2024-03-19 17:06:09 +01:00
Adrien Piquerez e62984846b Re-implement BuildServerEvalReporter 2024-03-19 17:06:09 +01:00
Adrien Piquerez 7ca6ad5fec Fix resolution of bridge using Coursier 2024-03-06 16:40:41 +01:00
Adrien Piquerez 12e9267e1e Remove more unused 2024-03-05 15:25:25 +01:00
Adrien Piquerez 0458e8063d Adapt -Wunused 2024-03-05 11:23:00 +01:00
Adrien Piquerez c15a4031a9 Fix or mute warnings 2024-03-05 10:39:00 +01:00
Adrien Piquerez eadf1117f6 Store bootServerSocket in state 2024-02-15 16:18:54 +01:00
Adrien Piquerez 5425e066a0 Fix SbtRefactorings 2024-02-13 14:01:26 +01:00
Adrien Piquerez 739dedb017 Remove usage of Manifest in Structure.scala 2024-02-12 15:22:09 +01:00
adpi2 64be877549
Merge pull request #7491 from adpi2/misc-cleanup
[2.x] Miscellaneous cleanup
2024-02-08 17:42:35 +01:00
Eugene Yokota 63ba90d198 Migrate postfix ops
**Problem**
There are a few places in the code that's using postfix ops.

**Solution**
This rewrites the expressions to use normal dot notaiton.
2024-02-07 11:40:45 -05:00
eugene yokota ecca26175e
[sbt 2.x] remote cache (#7464)
For the details about this PR, please see the blog post https://eed3si9n.com/sbt-remote-cache/.

* Add cache basics
* Refactor Attributed to use StringAttributeMap, which is Map[StringAttributeKey, String]
* Implement disk cache
* Rename Package to Pkg
* Virtualize packageBin
* Use HashedVirtualFileRef for packageBin
* Virtualize compile task
2024-02-07 10:34:06 -05:00
Adrien Piquerez e18ddb1666 Fix resolution of * on String 2024-02-07 11:47:22 +01:00
Adrien Piquerez 7ac3cd321d Remove the unused ~> 2024-02-07 11:12:43 +01:00
Martin Duhem 6679067bcb
Resolve `scripted-sbt-redux` to run scripted
Previously, in sbt 2, the Scripted plugin was not resolving any module
that would provide it with the `ScriptedTests` object, and could
therefore not run scripted tests.

With this patch, `scripted-sbt-redux` will be resolved and added to the
classloader that's used to load `sbt.scriptedtest.ScriptedTests`.
2024-02-02 14:28:56 +01:00
Adrien Piquerez 7ea0506736 Introduce TaskId to reduce abstraction around Execute 2023-11-28 14:26:52 +01:00
Eugene Yokota 08966370b1 Update to lm 2.0.0-alpha13 for sjson-new 2023-11-25 21:01:04 -05:00
Eugene Yokota bde26f6c51 Communicate narrowing by adding case 2023-11-25 20:50:34 -05:00
Eugene Yokota e87e1d6e0d Update to Scalafmt 3.7.14 2023-11-25 01:08:17 -05:00
Eugene Yokota 72af500294 Subsume platform cross building
Problem
-------
In sbt 1, platform cross building is implemented using in the user-land
using `%%%` operator, which clevery handles both Scala cross building
and appending platform suffix like sjs1.
However, in general symbolic `%%%` is confusing, and hard to explain.

Solution
--------
In sbt 2, we should subsume the idea of platform cross building,
so `%%` can act as the current `%%%` operator.
This adds a new setting called `platform`, which defaults to
`Platform.jvm` by default.
When a subprojects sets it to `Platform.sjs1`, `ModuleID`s defined using
`%%` operator will inject the platform suffix `_sjs1` **in addition**
to the Scala binary suffix `_2.13` etc.

Note: Explicit JVM dependencies will now require `.platform(Platform.jvm)`.
2023-03-12 13:38:56 -04:00
Eugene Yokota dbaa34bdac Interpret bare settings are common settings
See https://eed3si9n.com/simplifying-sbt-with-common-settings/

Problem
-------
The behavior of bare settings is confusing in a multi-project build.
This is partly due to the fact that to use `ThisBuild` scoping
the build user needs to be aware of the task implementation,
and know if the task is already defined at project level.

Solution
--------
This changes the interpretation of the baresettings to be common
settings, which works similar to the way `ThisBuild` behaves in sbt 1.x,
but since this would be a simple append at project-level, it should
work for any tasks or settings.
2023-03-11 17:02:07 -05:00
Eugene Yokota a8213abb92 Add more keys to excludeLintKeys 2023-01-20 22:34:44 -05:00
Eugene Yokota 9821f5e1b4 def % support 2023-01-20 16:14:51 -05:00
Eugene Yokota 84a5fcb035 Use extension method to encode the syntax 2023-01-18 00:50:30 -05:00
Eugene Yokota e5dd518deb Adjust to changes in develop branch 2023-01-16 00:23:05 -05:00
Eugene Yokota e8223cc8be Fixes scripted tests 2023-01-15 23:50:31 -05:00
Eugene Yokota fc31bc3d15 Fix aggregation 2023-01-15 23:50:30 -05:00
Eugene Yokota a20d5205af Minor Scala 3 syntax change 2023-01-15 23:50:30 -05:00
Eugene Yokota e1c4fd5f1d Fix setting loading 2023-01-15 23:50:30 -05:00
Eugene Yokota 78bf095c44 Add convertion to ClasspathDep 2023-01-15 23:50:30 -05:00
Eugene Yokota d4dc90efd9 add Conversion from Project => LocalProject 2023-01-15 23:50:30 -05:00
Eugene Yokota 193b47b49b Fix taskDyn 2023-01-15 23:50:30 -05:00
Eugene Yokota ceb1ea8aad bump Zinc, which uses current util 2023-01-15 23:50:29 -05:00
Eugene Yokota fbc98ed72e Use ClassTag instead of Manifest 2023-01-15 23:50:29 -05:00
Eugene Yokota ecd59bd3e1 Scalafmt 3.6.0 2023-01-15 23:50:29 -05:00
Eugene Yokota d5d2ff05f0 Comment out tests 2023-01-15 23:48:13 -05:00
Eugene Yokota ad90590bc6 Fix project loading
Problem
-------
Given val root, currently both `root` and synthetic root gets loaded.
This might be caused by build.sbt being virtualized, and no longer
matching the build root directory.

Solution
--------
For now, comparing the canonical paths seems to fix the issue.
2023-01-15 23:48:13 -05:00
Eugene Yokota 54c12819df Adjust to the code changes 2023-01-15 23:48:13 -05:00
Eugene Yokota 9a2ca3c4da Fix compilation of the intrinsic Scala version 2023-01-15 23:48:13 -05:00
Eugene Yokota 4f85c11e01 Some minor tweaks to get things moving 2023-01-15 23:48:13 -05:00