Commit Graph

2329 Commits

Author SHA1 Message Date
friendseeker b4e9469816
Add double quote around thread name 2024-11-16 13:16:40 -08:00
Friendseeker 8ce6c1b47e Pass `useConsistent` to `staticCachedStore` 2024-11-04 13:21:08 -08:00
Eugene Yokota f8280f14c8 Fix ++ with a command argument
**Problem**
sbt 1.10.0 added support for ++ command with external reference,
but broke ++ takes an aggregate command with slash.

**Solution**
This fixes the parser
2024-11-03 14:42:10 -05:00
friendseeker fae2bcc01b
Add documentation & deduplicate implementation 2024-10-29 21:40:51 -07:00
Friendseeker 92d4cfa690 Replace nnbsp with regular space 2024-10-29 17:43:33 -07:00
Friendseeker 828dc04808 Migrate all usages of `System.console == null` 2024-10-28 18:25:16 -07:00
eugene yokota 64f0acf05f
Merge pull request #7838 from Friendseeker/sbt-7017
[1.x] Pass reload action for `watchOnTermination` callback
2024-10-28 02:23:38 -04:00
friendseeker 6d4d2161b2
Set correct action for onTermination callback 2024-10-27 22:43:44 -07:00
eugene yokota 4e15180596
Merge pull request #7830 from Friendseeker/remove-early-output-version
[1.x] Use generic early output file name
2024-10-28 01:12:58 -04:00
friendseeker 7d674f6c93
Throw when template not found 2024-10-26 22:10:48 -07:00
Friendseeker 4beb78b260
Adopt PR feedbacks 2024-10-26 16:24:45 -07:00
friendseeker 5e7fe0b158
Use more generic early output file name 2024-10-24 22:00:51 -07:00
eugene yokota 36fb500f8c
Merge pull request #7811 from Friendseeker/use-jline-jni
[1.x] Use `jline-terminal-jni` to replace deprecated Jansi & JNA Provider
2024-10-23 10:14:39 -04:00
philippus 1ba63a1c07
Deprecate useJCenter key 2024-10-23 07:56:00 +02:00
Friendseeker 0e85726858 Use JNI to replace deprecated Jansi & JNA 2024-10-22 13:05:20 -07:00
friendseeker 9d5cddd171
Let Consistent Analysis to be opt-in by default 2024-10-21 22:00:25 -07:00
Eugene Yokota b7a687356f deps: Zinc 1.10.3 2024-10-19 12:15:16 -04:00
Seth Tisue f06b7622be Scala 2.12.20 (was .19) 2024-10-10 12:53:31 -07:00
eugene yokota c5b11a41a9
Merge pull request #7733 from Friendseeker/remove-deprecated-thread-id
[1.x] Remove deprecated `Thread.getId`
2024-10-06 21:48:16 -04:00
friendseeker 0b34b6b406
Remove deprecated Thread.getId call 2024-10-06 18:18:46 -07:00
friendseeker 48ac49d4ca Remove compile error in GCUtil
runFinalization is going to be removed
2024-10-06 18:14:09 -07:00
kenji yoshida b36cf81584
update to latest versions in TemplateCommandUtil 2024-10-06 19:36:12 +09:00
Eugene Yokota ddeb5dba2c feat: Use _sbt2_3 suffix
**Problem**
The extra attribute is a vestige from the days when sbt plugins were published on Ivy repos.

**Solution**
This uses normal suffix system.
2024-09-15 15:16:10 -04:00
Eugene Yokota 31dd85b7ba fix: Allow scripted to go through
**Problem**
Currently scripted does version checking to block sbt 2.x plugins
to be cross published from sbt 1.x.

**Solution**
Remove the sbt version matching.
2024-09-15 12:28:40 -04:00
SlowBrainDude f6663a0d6c Fix stale BSP diagnostics
The BSP server didn't reset old diagnostic messages sent to BSP clients under
certain circumstances. This commit mitigates this edge case and ensures that
diagnostics for files that previously had compilation problems are properly
reset when fresh diagnostics messages are sent.

The culprit was a mismatch of map keys: Files with problems were sometimes recorded
under an absolute path, but later attempted to be retrieved by virtual path.
2024-09-02 15:27:26 +02:00
James Roper a7481e49d0 Include ALL sources, and resources in source jar
This follows on from #7470, to include all sources, not just managed and
unmanaged, in the source jar, along with all resources (previously only
unmanaged resources were included).

This means that if, for whatever crazy reason, someone does modify the
`sources` task to include additional sources or filter out sources, rather than
using the managed or unmanaged source mechanisms, their changes will still be
reflected in the source jar.
2024-08-26 13:07:17 +10:00
adpi2 586e0a752c
Merge pull request #7568 from adpi2/fix-bsp-internal-dep-configs
[1.10.x] Fix declaring `Optional` inter-project dependency in BSP
2024-05-23 08:50:43 +02:00
Adrien Piquerez 9a3c4a6f53 Fix dependency-management/force-update-period 2024-05-21 16:54:14 +02:00
Adrien Piquerez f990bd2d8d [BSP] Fix importing Optional project dependency 2024-05-21 15:56:37 +02: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 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 422d9e735f
Fix typo 2024-04-15 10:44:17 -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 b19a54a1ef Improve the SIP-51 error message 2024-04-14 21:18:15 -04:00
Philippus Baalman f89505bb03
Remove superfluous space 2024-04-11 07:21:26 +02: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
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
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
Adrien Piquerez 02df82840a add noOp field in BSP compile report 2024-02-15 15:50:02 +01:00
Tammo Steffens 053c7cc8bd Use the publisher interface for publishing as default 2024-01-17 21:39:39 +01:00
friendseeker e4ab56e444 Include managedSources in packageSrc 2024-01-01 20:58:39 -08:00
friendseeker eadb5b3786
fix compile error in VirtualFileValueCache 2024-01-01 19:47:08 -08:00
Aleksandra Zdrojowa f9f47620d0 pass classifiersModule configurations to ModuleDescriptorConfiguration 2023-11-21 15:57:59 +01:00