Commit Graph

17422 Commits

Author SHA1 Message Date
Adrien Piquerez 95a82adffc Activate -Xfatal-warnings 2024-03-05 10:41:07 +01:00
Adrien Piquerez c15a4031a9 Fix or mute warnings 2024-03-05 10:39:00 +01:00
Adrien Piquerez 5d0a0b7356 Uncomment EmbeddedXmlSpec 2024-03-05 10:09:22 +01:00
Eugene Yokota 458a172b8f readme 2024-03-01 00:29:02 -05:00
Lukas Rytz 447c2ba5e5 update zinc and sbt-coursier dependencies 2024-02-27 10:56:30 +01:00
Lukas Rytz 4a1ba0c970 tests for standard library unfreezing 2024-02-27 10:56:30 +01:00
Lukas Rytz f0afeff4d9 Set locale for f interpolator decimal character
dependency-graph/toFileSubTask failed for me locally
2024-02-27 10:56:30 +01:00
Lukas Rytz b9375f5e6b Update scala-library in scala-tool configuration for Scala 3
When a macro was compiled against a new scala-library (say 2.13.15),
the runtime classpath of the Scala compiler should not contain an older
scala-library. Otherwise the macro can cause a NoSuchMethodException
during expansion.

This commit updates scala-library in the scalaInstance to the version
on the projects dependency classpath.
2024-02-27 10:56:30 +01:00
Lukas Rytz 951d1c4ae4 Add new `csrSameVersions` setting, use it for Scala artifacts
The `csrSameVersions` setting can be used to keep dependencies at the
same version.

By default it's used for Scala artifacts. They need to be kept at the
same version because the compiler / reflect are built with
cross-artifact inlining enabled.

`csrSameVersions := Seq(Set(scala-library, scala-reflect, scala-compiler, scalap))`

Users can make use of the new setting in the following way:
  - `csrSameVersions += Set[InclExclRule]("com.corp" % "lib", "com.corp" % "lub")`
  - `csrSameVersions += Set[InclExclRule]("com.corp" % "lib-family-*")`
2024-02-27 10:56:30 +01:00
Lukas Rytz 4c74358707 Fail the build if 2.13 scalaVersion < scala artifact on classpath
When expanding a macro compiled against a new Scala library, the
runtime classpath of the compiler should not contain an older library.
Otherwise a NoSuchMethodException can occur.

A similar issue is present when running the Scala repl through sbt.
An input line compiled against a new library could fail to run if
the repl's runtime classpath is on an old version.
2024-02-26 13:49:04 +01:00
Lukas Rytz 35bc07bd9e Use scala library from classpath in sbt run class loader 2024-02-26 13:49:04 +01:00
Lukas Rytz 893997d1b6 Update scala libraries according to dependency graph
There are a couple of settings / configs that affect this, summary
below. The change in this PR seems to be the most narrow.

`scalaModuleInfo.value.overrideScalaVersion` in sbt
  - affects how sbt to sets coursier's `forceScalaVersion` (see below)
  - used by librarymanagement.ivy. If true, add a OverrideScalaMediator
    See sbt/sbt#2634. Probably not relevant when using coursier.

`autoScalaLibrary` setting in sbt
  - automatically add `scala-library` (or `scala3-library`) as a project
    dependency
  - also used for `forceScalaVersion` (see below)

`CoursierConfiguration.autoScalaLibrary`
  - if `true` then Coursier `ResolutionParams.forceScalaVersion` is set
    to to `true`
  - initialized by sbt to
    `autoScalaLibrary.value &&
     !ScalaArtifacts.isScala3(sv) &&
     !Classpaths.isScala213(sv) &&        // added in this commit
     scalaModuleInfo.forall(_.overrideScalaVersion)`

coursier `ResolutionParams.forceScalaVersion`
  - if true, `scala-library` / `scala-reflect` / `scala-compiler` /
    `scalap` are forced to the scala version, not actually resolved
  - for Scala 3, the `scala3-library` and `scala3-compiler` versions
    are forced
2024-02-26 13:49:04 +01:00
Lukas Rytz d8d2b02e7e Use the ordinary compiler classpath for scala-library
No longer pass `-bootclasspath /path/to/scala-library.jar` to the Scala
compiler, put the library on the ordinary classpath.
2024-02-26 13:49:04 +01:00
eugene yokota 0255009d2b
Merge pull request #492 from scala-steward/update/scalatest-3.2.18
Update scalatest to 3.2.18
2024-02-23 02:22:02 -05:00
eugene yokota 7924ac31f9
Merge pull request #491 from scala-steward/update/coursier-2.1.9
Update coursier, ... to 2.1.9
2024-02-23 02:21:33 -05:00
Nikita Vilunov 380d1526b0
Add support for non-matrix projects to be aggregated in and depended on by matrix projects (#89)
Add support for non-matrix projects to be aggregated in and depended on by matrix projects
2024-02-21 13:28:54 -05:00
Scala Steward 6de76349c9
Update scalatest to 3.2.18 2024-02-19 17:01:44 +00:00
Scala Steward 2de922e468
Update coursier, ... to 2.1.9 2024-02-19 17:01:41 +00:00
adpi2 48c23761dc
Merge pull request #7499 from hagay3/1.10.x
upgrade lm-coursier-shaded to 2.1.3
2024-02-19 09:48:13 +01:00
Hagai Ovadia 0f4be2405e upgrade lm-coursier-shaded tp 2.1.3 2024-02-18 16:00:22 +02:00
adpi2 a1599c98c7
Merge pull request #7496 from adpi2/bsp-noop-compilation
[1.x] add noOp field in BSP compile report
2024-02-15 16:23:14 +01:00
Adrien Piquerez eadf1117f6 Store bootServerSocket in state 2024-02-15 16:18:54 +01:00
Adrien Piquerez 02df82840a add noOp field in BSP compile report 2024-02-15 15:50:02 +01:00
adpi2 749b9caa11
Merge pull request #7494 from adpi2/sbt2-todo-refactorings
[2.x] Fix `SbtRefactorings` and run `SessionSettingsSpec`
2024-02-14 19:00:16 +01:00
adpi2 fcaf7afe10
Merge pull request #7493 from adpi2/sbt2-eval3
[2.x] Update eval for Scala 3.3.1
2024-02-14 09:41:44 +01:00
Adrien Piquerez 5425e066a0 Fix SbtRefactorings 2024-02-13 14:01:26 +01:00
Adrien Piquerez 4baf698a8c Fix TupleMapExtensionTests
The compiler cannot infer F[_] on a concrete Tuple.Map[T, F[_]] because it reduces it to a (F[A], F[B], ...)
2024-02-13 11:17:52 +01:00
Adrien Piquerez ac191ddc5c Update eval for Scala 3.3.1 2024-02-13 10:37:07 +01:00
adpi2 a607e54188
Merge pull request #7490 from adpi2/sbt2-remove-manifest
[sbt 2] Remove usage of Manifest in Structure.scala
2024-02-12 16:34:41 +01:00
Adrien Piquerez 144b86e32e fix tag of InputTask 2024-02-12 15:28:57 +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
adpi2 79def174ef
Merge pull request #7492 from adpi2/sbt2-todo-errorspec
Fix test in ErrorSpec
2024-02-08 16:08:22 +01:00
Adrien Piquerez 013194c217 Rename to SbtParserErrorSpec 2024-02-08 13:29:15 +01:00
Adrien Piquerez 245d13575a Refactor xml test in ErrorSpec 2024-02-08 13:28:19 +01:00
Adrien Piquerez 135ab16b5c Remove outdated test in ErrorSpec 2024-02-08 13:21:04 +01:00
Adrien Piquerez 5990775a43 Fix test in ErrorSpec 2024-02-08 13:12:35 +01:00
eugene yokota 652f7dc575
Merge pull request #7486 from eed3si9n/wip/postfix
[2.x] Migrate postfix ops
2024-02-07 12:34:11 -05: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 ea4b38d1b1 Shorten fake task macro impl 2024-02-07 12:13:35 +01:00
Adrien Piquerez cabf08e5f0 Use report.errorAndAbort in macro 2024-02-07 11:55:27 +01:00
Adrien Piquerez e18ddb1666 Fix resolution of * on String 2024-02-07 11:47:22 +01:00
Adrien Piquerez 4b59b56785 More cleaning in TypeFunctions 2024-02-07 11:16:38 +01:00
Adrien Piquerez 7ac3cd321d Remove the unused ~> 2024-02-07 11:12:43 +01:00
Adrien Piquerez 10fc5da8b6 remove Composite and replace it with type lambda 2024-02-07 10:58:05 +01:00
Adrien Piquerez cf3c9bbf0d Remove ~>| and use polymorphic function instead 2024-02-07 10:49:23 +01:00
eugene yokota 1c4d9c89bf
Merge pull request #88 from hugo-vrijswijk/base-dir-setting 2024-02-06 09:28:22 -05:00
Hugo van Rijswijk 7f30c1e0dc Add `projectMatrixBaseDirectory` setting
Similar to https://github.com/portable-scala/sbt-crossproject/pull/152
2024-02-05 09:48:17 +01:00
eugene yokota 0d291f0489
Merge pull request #7488 from Duhemm/scripted-classpath 2024-02-02 09:05:01 -05:00