Commit Graph

12007 Commits

Author SHA1 Message Date
adpi2 29d6912754
Merge pull request #7567 from adpi2/backport-7538
[1.10.x] Fix `dependency-management/force-update-period` (backport of #7538)
2024-05-23 08:49:48 +02:00
Adrien Piquerez 9a3c4a6f53 Fix dependency-management/force-update-period 2024-05-21 16:54:14 +02:00
eugene yokota b27c7253b1
Merge pull request #7565 from sbt/dependabot/github_actions/scalacenter/sbt-dependency-submission-3
Bump scalacenter/sbt-dependency-submission from 2 to 3
2024-05-20 12:24:53 -04:00
dependabot[bot] 78296a9128
Bump scalacenter/sbt-dependency-submission from 2 to 3
Bumps [scalacenter/sbt-dependency-submission](https://github.com/scalacenter/sbt-dependency-submission) from 2 to 3.
- [Release notes](https://github.com/scalacenter/sbt-dependency-submission/releases)
- [Commits](https://github.com/scalacenter/sbt-dependency-submission/compare/v2...v3)

---
updated-dependencies:
- dependency-name: scalacenter/sbt-dependency-submission
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 04:22:26 +00:00
adpi2 4e46a331d9
Merge pull request #7555 from mkurz/upgrade_sbt_plugins
Upgrade sbt plugins to avoid deprecated repo.scala-sbt.org
2024-05-08 12:27:27 +02:00
Matthias Kurz c810383daf
Upgrade sbt plugins to avoid deprecated repo.scala-sbt.org 2024-05-08 11:59:00 +02:00
Eugene Yokota 0a17062645 sbt 1.10.0 2024-05-05 23:19:24 -04:00
eugene yokota d56e17b72b
Merge pull request #7551 from eed3si9n/wip/bump
Zinc 1.10.0 + universal macOS sbtn binary
2024-05-05 22:54:29 -04:00
Eugene Yokota bc4d5830e9 Banner for sbt 1.10.0 2024-05-05 22:38:05 -04:00
Eugene Yokota ae1f829f9f Include universal macOS sbtn 2024-05-05 22:34:58 -04:00
Eugene Yokota b8bb5e33fb Zinc 1.10.0 2024-05-05 20:11:32 -04:00
Eugene Yokota 7529eefda6 IO 1.10.0 2024-05-05 17:21:40 -04:00
eugene yokota 542f11bab6
Merge pull request #7550 from eed3si9n/wip/dotty_plugin
Fix old Dotty plugin compat
2024-05-04 23:30:59 -07:00
Eugene Yokota aac79df4a3 Fix old Dotty plugin compat
**Problem**
https://github.com/scala/scala3/pull/20157 identified that
`sbt-dotty/dotty-knowledge.i17` scripted test fails on sbt 1.10.0-RC2.
The regression happened in https://github.com/sbt/sbt/pull/7480/files#diff-6d9589bfb3f1247d2eace99bab7e928590337680d1aebd087d9da286586fba77L739-L740
where global setting was removed, and moved to project level.

**Solution**
This restores the global setting that is apparently referenced by
now defunct Dotty plugin.
2024-05-05 01:55:32 -04:00
eugene yokota 8fe6e4e876
Merge pull request #7548 from szeiger/wip/fix-string-logging
Fix logging of raw strings
2024-05-04 22:34:41 -07:00
eugene yokota 26cdfa8b0f
Merge branch '1.10.x' into wip/fix-string-logging 2024-05-04 22:19:44 -07:00
eugene yokota 1c7c62135b
Merge pull request #7549 from eed3si9n/wip/mac
Fix CI
2024-05-04 22:19:21 -07:00
Eugene Yokota a6bdf9dc2e Fix CI
It seems like the latest macOS image no longer supports JDK 8.
2024-05-05 01:02:19 -04:00
Stefan Zeiger da79479ff7 Fix logging of raw strings
sbt passes raw string messages in `ConsoleAppenderFromLog4J` to `StringFormatterMessageFactory`. This is wrong because these strings are pre-formatted and should not be processed again for formatting. There is no way to pass parameters to them anyway. This causes problems when the raw strings contain characters that `StringFormatterMessageFactory` wants to interpret.

For example, when using `-Ystatistics`:

```
ERROR StatusConsoleListener Unable to format msg:   nscprofiling                : 1 spans, ()7.543ms (0.3%)
java.util.UnknownFormatConversionException: Conversion = ')'
at java.base/java.util.Formatter.checkText(Formatter.java:2732)
at java.base/java.util.Formatter.parse(Formatter.java:2718)
at java.base/java.util.Formatter.format(Formatter.java:2655)
at java.base/java.util.Formatter.format(Formatter.java:2609)
at java.base/java.lang.String.format(String.java:2938)
at org.apache.logging.log4j.message.StringFormattedMessage.formatMessage(StringFormattedMessage.java:121)
at org.apache.logging.log4j.message.StringFormattedMessage.getFormattedMessage(StringFormattedMessage.java:89)
at sbt.internal.util.Appender.$anonfun$appendMessage$1(ConsoleAppender.scala:522)
...
```
2024-05-02 18:31:23 +02:00
eugene yokota 0c6d7b8f30
Merge pull request #7545 from mazugrin/1.10.x
Update jansi dep to match the one that's included in the jline dep
2024-04-18 18:36:21 -04:00
mazugrin 4d8bff40dc Update jansi dep to match the one that's included in the jline dep, which also allows sbt to work on ARM64 Windows without needing to specify -Djline.terminal=jline.UnsupportedTerminal 2024-04-18 12:54:31 -04:00
eugene yokota 6678746ef6
Merge pull request #7536 from sbt/eed3si9n-patch-1
Fix typo
2024-04-15 18:18:45 -04:00
eugene yokota 422d9e735f
Fix typo 2024-04-15 10:44:17 -04:00
eugene yokota acf825179b
Merge pull request #7534 from eed3si9n/wip/consistent
Consistent Analysis
2024-04-15 00:19:18 -04:00
Eugene Yokota b1a43f9adc Consistent Analysis
See also https://github.com/sbt/zinc/pull/1326

This adds a new setting `enableConsistentCompileAnalysis`,
which enables the new "Consistent" Analysis format,
which is faster and more repeatable than the status quo.
This is initialized to `true` by default.
It can be opted out either by the setting or using
`-Dsbt.analysis2024=false`.
2024-04-14 23:17:04 -04:00
eugene yokota e254370384
Merge pull request #7533 from eed3si9n/wip/sip51-error-message
Improve the SIP-51 error message
2024-04-14 21:38:23 -04:00
Eugene Yokota b19a54a1ef Improve the SIP-51 error message 2024-04-14 21:18:15 -04:00
adpi2 7064066e6f
Merge pull request #7531 from Philippus/patch-1
Remove superfluous space
2024-04-11 11:08:35 +02:00
Philippus Baalman f89505bb03
Remove superfluous space 2024-04-11 07:21:26 +02:00
eugene yokota 4c642e6d64
Merge pull request #7528 from eed3si9n/wip/zinc
Zinc 1.10.0-RC1
2024-04-08 23:45:17 -04:00
Eugene Yokota f804c28417 Zinc 1.10.0-RC1 2024-04-08 23:07:57 -04:00
eugene yokota ec02bf3dc2
Merge pull request #7480 from lrytz/lib-unfreeze-m
Add support for SIP-51 (unfreezing the Scala library)
2024-04-08 01:10:05 -04:00
eugene yokota 21a4aaa4d6
Merge pull request #7516 from SethTisue/scala-2.12.19
Scala 2.12.19 (was 2.12.18), scala-xml 2.2.0 (was 2.1.0)
2024-03-22 11:56:51 -04:00
Seth Tisue 735214afd0 Scala 2.12.19 (was 2.12.18), scala-xml 2.2.0 (was 2.1.0) 2024-03-16 11:39:55 +01:00
eugene yokota 9bd80cf4d2
Merge pull request #7513 from kubukoz/update-lm 2024-03-15 10:51:33 -04:00
Jakub Kozłowski 4507135564
Update lm-coursier-shaded: 2.1.3 -> 2.1.4 2024-03-15 14:36:38 +01: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
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 02df82840a add noOp field in BSP compile report 2024-02-15 15:50:02 +01:00
eugene yokota f08032af26
Merge pull request #7478 from sbt/dependabot/github_actions/actions/cache-4
Bump actions/cache from 3 to 4
2024-01-21 23:55:06 -05:00