Commit Graph

3048 Commits

Author SHA1 Message Date
eugene yokota ff6cbf2e1f
Merge pull request #6351 from steinybot/scripted-publish-deps
Publish all plugin dependencies
2021-03-04 23:35:59 -05:00
Ondra Pelech 81457e60ec
Give an explanation in case of ServerAlreadyBootingException (#6353)
Give and explanation in case of ServerAlreadyBootingException
2021-03-04 23:21:42 -05:00
eugene yokota 5f24664c0d
Merge pull request #6355 from marcospereira/updates/semanticdb-4.4.10
Update semanticdb to version 4.4.10
2021-03-04 20:17:06 -05:00
Marcos Pereira c9941aeabc
Update semanticdb to version 4.4.10 2021-03-04 16:38:00 -05:00
Matthias Kurz de313bbdde
Never set a default for sourcePositionMappers 2021-03-04 22:30:35 +01:00
Jason Pickens 6e0da94d91
Publish all plugin dependencies 2021-03-04 12:09:12 +13:00
eugene yokota 0972b7fa17
Merge pull request #6336 from adpi2/fix-tasty-test
Fix TastyFiles added twice in Test
2021-02-24 13:28:51 -05:00
eugene yokota c5eda8c7ce
Merge pull request #6332 from adpi2/fix-scala3-doc
Fix scaladoc resolution without JCenter
2021-02-24 11:25:20 -05:00
Adrien Piquerez c1e7b9c3f8 Fix TastyFiles added twice in Test 2021-02-24 15:58:31 +01:00
Julien Richard-Foy fad8e8c3c9 Add MUnit test framework 2021-02-24 10:42:30 +01:00
Adrien Piquerez ff12c87367 fix scaladoc resolution without JCenter 2021-02-23 16:24:49 +01:00
eugene yokota ab2b396543
Merge pull request #6329 from eed3si9n/fport/6326
[fport] synchronize access to stamps in testQuickFilter
2021-02-22 00:42:50 -05:00
Rafał Sumisławski d3080ee3f0 synchronise access to stamps in testQuickFilter 2021-02-22 00:15:51 -05:00
Eugene Yokota 695261a068 Migrate most of the internal usage of in 2021-02-22 00:09:36 -05:00
Eugene Yokota 6c18a37d3f integrate assumedVersionScheme and assumedEvictionErrorLevel
Fixes https://github.com/sbt/sbt/issues/6301
Fixes https://github.com/sbt/sbt/issues/6302

```scala
ThisBuild / assumedVersionScheme := VersionScheme.PVP
ThisBuild / assumedVersionSchemeJava := VersionScheme.EarlySemVer
ThisBuild / assumedEvictionErrorLevel := Level.Warn
```
2021-02-21 19:17:34 -05:00
Adrien Piquerez 9a2b0f5f06 Move sbtDependency in pluginCrossBuild to JvmPlugin 2021-02-20 13:22:30 +01:00
Adrien Piquerez be1e756104 Upgrade semanticdb default version 2021-02-20 11:36:58 +01:00
Eugene Yokota 5495524e60 Fix "-Yrangepos" disappearing from Test / scalacOptions
Fixes https://github.com/sbt/sbt/issues/5934

In #5886 adpi2 reported that Test / scalacOptions could have unwanted duplicated flags from Compile / scalacOptions. So #5887 added

```diff
+    // remove duplicated semanticdbOptions
+    scalacOptions --= (Compile / semanticdbOptions).value
```

Notice that it's subtracting (Compile / semanticdbOptions).value regardless of the semanticdbEnabled value. If semanticdbEnabled is set to true I am guessing that it would all work out, but when it's false, it's just subtracting "-Yrangepos".

This fixes that by checking for semanticdbEnabled.
2021-02-17 00:45:41 -05:00
eugene yokota 6c6df88d1e
Merge pull request #6309 from eed3si9n/wip/deprecate_old_shell_syntax
Deprecate old shell syntax
2021-02-16 10:08:13 -05:00
Eugene Yokota 9cde1dfcaa Warn on missing versionScheme
Fixes https://github.com/sbt/sbt/issues/6303

This will print warning on publishing when versionScheme is not set.

```
[warn] versionScheme setting is empty; set `ThisBuild / versionScheme := Some("early-semver")` or `Some("pvp")`
[warn] so tooling can use it for evction errors etc - https://www.scala-sbt.org/1.x/docs/Publishing.html
```
2021-02-15 16:53:57 -05:00
Eugene Yokota 2305abd81e Deprecate old shell syntax
Unified slash syntax was added in sbt 1.1.x (https://github.com/sbt/sbt/pull/3434).
This deprecates the older shell syntax: `proj/cofing:intask::key`.

### Example

```
sbt:hello> it:compile
[warn] sbt 0.13 shell syntax is deprecated use slash syntax instead: IntegrationTest / compile
[info] compiling 1 Scala source to /private/tmp/hello/target/scala-2.13/classes ...

sbt:hello> compile:console::scalacOptions
[warn] sbt 0.13 shell syntax is deprecated use slash syntax instead: Compile / console / scalacOptions
```
2021-02-15 13:40:47 -05:00
eugene yokota da4e1d3711
Merge pull request #6296 from bjaglin/semanticdb-confs
better support of custom configurations in SemanticdbPlugin
2021-02-15 12:12:48 -05:00
Eugene Yokota a25d9e7114 dependency-graph fixes 2021-02-06 22:58:12 -05:00
Eugene Yokota 587d821828 Override filter method on the FilteringReporter 2021-02-06 22:32:14 -05:00
Eugene Yokota 22d12f6618 Use nowarn annotation 2021-02-06 22:31:47 -05:00
Brice Jaglin 145966e3f3 better support of custom configurations in SemanticdbPlugin
Second take at https://github.com/sbt/sbt/issues/5886, which fixed the
problem for Test specifically but not for custom configurations.

* Any child of Compile (like Custom in the scripted) had to use
  testSettings, whether they were related to testing or not
* Custom configurations with grand parents (like SystemTest in the
  scripted) would get duplicated scalacOptions no matter what they used
2021-02-06 23:52:55 +01:00
Eugene Yokota 5ebb3da150 Override warning + error method
Scala compiler changed the implementation of reporter in 2.12.13 such that overriding `info0` no longer increments the error count in the delegating reporter.
See https://github.com/scala/bug/issues/12317 for details.
2021-02-01 01:20:20 -05:00
Eugene Yokota 61a077e3a6 Scala 2.12.13 2021-01-31 12:59:31 -05:00
Eugene Yokota 1275051974 Deprecate externalPom
Ref #5493
2021-01-24 23:36:02 -05:00
eugene yokota 83012a9644
Merge pull request #6237 from eed3si9n/wip/package
packageTimestamp setting
2021-01-24 23:24:09 -05:00
Eugene Yokota 628d908a5c packageTimestamp setting
Fixes https://github.com/sbt/sbt/issues/6235

In sbt 1.4.0 (https://github.com/sbt/sbt/pull/5344) we started wiping out the timestamps in JAR
to make the builds more repeatable.
This had an unintended consequence of breaking Play's last-modified response header (https://github.com/playframework/playframework/issues/10572).

This adds a global setting called `packageTimestamp`, which is
initialized as follows:

```scala
packageTimestamp :== Package.defaultTimestamp,
```

Here the `Package.defaultTimestamp` would pick either the value from the
`SOURCE_DATE_EPOCH` environment variable or 2010-01-01.

To opt out of this default, the user can use:

```scala
ThisBuild / packageTimestamp := Package.keepTimestamps

// or

ThisBuild / packageTimestamp := Package.gitCommitDateTimestamp
```

Before (sbt 1.4.6)
------------------

```
$ ll example
total 32
-rw-r--r--  1 eed3si9n  wheel   901 Jan  1  1970 Greeting.class
-rw-r--r--  1 eed3si9n  wheel  3079 Jan  1  1970 Hello$.class
-rw-r--r--  1 eed3si9n  wheel   738 Jan  1  1970 Hello$delayedInit$body.class
-rw-r--r--  1 eed3si9n  wheel   875 Jan  1  1970 Hello.class
```

After (using Package.gitCommitDateTimestamp)
--------------------------------------------

```
$ unzip -v target/scala-2.13/root_2.13-0.1.0-SNAPSHOT.jar
Archive:  target/scala-2.13/root_2.13-0.1.0-SNAPSHOT.jar
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
     288  Defl:N      136  53% 01-25-2021 03:09 888682a9  META-INF/MANIFEST.MF
       0  Stored        0   0% 01-25-2021 03:09 00000000  example/
     901  Defl:N      601  33% 01-25-2021 03:09 3543f377  example/Greeting.class
    3079  Defl:N     1279  59% 01-25-2021 03:09 848b4386  example/Hello$.class
     738  Defl:N      464  37% 01-25-2021 03:09 571f4288  example/Hello$delayedInit$body.class
     875  Defl:N      594  32% 01-25-2021 03:09 ad295259  example/Hello.class
--------          -------  ---                            -------
    5881             3074  48%                            6 files
```
2021-01-24 22:14:31 -05:00
eugene yokota feaea5d943
Merge pull request #6265 from adpi2/scala3-doc
[1.5.0-M1] Improve error report for scala3doc missing
2021-01-24 21:36:26 -05:00
eugene yokota 43409fcc6f
Update main/src/main/scala/sbt/Defaults.scala 2021-01-24 18:02:50 -05:00
Eugene Yokota c5d65fe3c7 Cache configuration parser 2021-01-23 22:27:25 -05:00
Eugene Yokota 5deb1f5994 Fix configuration identifier completion
Fixes https://github.com/sbt/sbt/issues/6282
2021-01-23 22:15:06 -05:00
Marko Elezovic 79645dfee7 Fix ExitCode calc on StashOnFailure
Previous sbt.Exec != String match would never fail
2021-01-19 11:37:00 +01:00
Adrien Piquerez 67689e0bbd Improve error report for scala3doc missing 2021-01-18 20:20:03 +01:00
Eugene Yokota 98450fe743 Add half-failing tests for completions 2021-01-16 03:48:57 -05:00
Eugene Yokota 1c6a5d21bb Port mutable.Specification to verify.BasicTestSuite 2021-01-16 00:47:53 -05:00
Naoki Takezoe 5ce3a174e8 Reset ZipEntry timestamps to 2010-01-01 in order to prevent negative value 2021-01-14 08:32:50 +09:00
Adrien Piquerez fdcfe87dbf
Merge branch 'develop' into client-launch-jar 2021-01-11 13:20:49 +01:00
Eugene Yokota 8f5759e48d Cross build to Scala 2.13 2021-01-10 20:24:05 -05:00
Eugene Yokota f8c158291d Work around Scala parallel collections situation
Ref https://github.com/scala/scala-parallel-collections/issues/22

Parallel collection got split off without source-compatible library, so apparently we need to roll our own compat hack, which causes import not used, so it needs to be paired with silencer.
2021-01-10 18:02:18 -05:00
Eugene Yokota ab402543d3 Replace the unicode arrows 2021-01-10 14:20:43 -05:00
Eugene Yokota 6d2a516df5 Port XMainConfiguration to Java
The bytecode generated by 2.13 compiler contains scala.runtime.BoxedUnit in the constant pool. To avoid referencing scala-library, port XMainConfiguration to Java.
2021-01-10 14:17:26 -05:00
Adrien Piquerez 8f5c222a0c Introduce tastyFiles task 2021-01-04 18:43:49 +01:00
Adrien Piquerez ab345e0a71 Adapt sources and scalacOptions for scala3doc 2021-01-04 10:01:34 +01:00
Adrien Piquerez 5f4197cf2e Use scala-doc-tool config for scala3doc 2021-01-04 10:01:34 +01:00
Adrien Piquerez 521e80b61b Fix semanticdb on Scala > 3.0.0-M3 2020-12-25 17:34:06 +01:00
Adrien Piquerez 166a421a26 Fix Scala 3 consoleProject and add scripted test 2020-12-23 21:21:54 +01:00