Commit Graph

2070 Commits

Author SHA1 Message Date
Adrien Piquerez ded074ac75 Expose Defaults.makeScalaInstance 2021-05-01 20:29:42 +02:00
Jason Pickens 223ab2b310
Remove configuration scope from runner settings 2021-04-20 15:35:06 +12:00
Guillaume Galy 8849bfbcd5 Retain classifiers for transitive dependencies when publishing to Ivy 2021-04-19 15:24:45 +02:00
kenji yoshida 61f4ed1017
fix typo 2021-04-16 15:48:53 +09:00
Philippus Baalman 4bf7f3a877
Fix typo 2021-04-12 21:02:14 +02:00
eugene yokota 627f72ef87
Merge pull request #6425 from ashleymercer/issues/2853-junit-config
Allow output directory for JUnitXmlTestsListener to be configured
2021-04-12 10:15:56 -04:00
Ashley Mercer b37fc6d5be Allow JUnitXmlTestsListener output directory to be configured
Add `testReportsDirectory` setting to allow output directory for
JUnitXmlTestsListener to be configured.

Add `testReportSettings` which provides defaults values:

- by default this uses the build configuration name as a prefix so
  `target/test-reports` for `Test` config, but `target/it-reports`
  for `IntegrationTest` (previously this was hardcoded to always
  use `target/test-reports`). To override this set e.g.

  `Test / testReportsDirectory := target.value / "my-custom-dir"`

- the `JunitXmlTestsListener` is now only attached to the `Test`
  and `IntegrationTest` configs by default (previously it was added
  to the global configuration object). Any configs which inherit
  from one of these will continue to have the listener attached;
  but completely custom configurations will need to re-add with:

  `project.settings(testReportSettings)`

Fixes #2853
2021-04-12 12:17:50 +01:00
Adrien Piquerez 7ac35d11d9 Fix MetaBuildLoader 2021-04-07 17:11:38 +02:00
Adrien Piquerez 56746d5792 Fix unused nowarn in sbt plugins 2021-04-06 15:45:52 +02:00
Adrien Piquerez b0ee80e34e Use full Scala 3 version in crossTarget 2021-04-01 10:23:38 +02:00
Guillaume Martres 24dba24b2a Fix Scala 2.13-3.0 sandwich on Scala >= 3.0.0
The binary version of Scala >= 3.0.0 will be 3, but the logic was
hardcoded for 3.0.
2021-03-31 13:54:40 +02:00
Eugene Yokota 2a3a0f5594 Fixes clean not cleaning files added to cleanFiles
Fixes #6395

The current code assumes cleanFiles are only directories. This fixes that.
2021-03-29 00:23:50 -04:00
eugene yokota 1cb23c843b
Merge pull request #6417 from mkurz/fix_warn
Add missing versionScheme to warning
2021-03-28 16:43:07 -04:00
Josef Vlach 0c7bc71403
Instantiate only test runners needed by current TestDefinitions 2021-03-28 20:58:18 +01:00
Matthias Kurz dc2865d407
Add missing versionScheme to warning 2021-03-28 21:31:48 +02:00
Adrien Piquerez 54c27d575b Fix internal dependency configurations 2021-03-23 15:58:23 +01:00
Eugene Yokota 01e3d9e9d8 Use LOCALAPPDATA or $HOME/AppData/Local on Windows
Fixes https://github.com/sbt/sbt/issues/5206

Problem
--------
Coursier uses directories-jvm to determine its default cache directory.
Currently directories-jvm shells out to Powershell to call the [Known Folders API](https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid), which doesn't work in various environments, and instead of an error, it apparently returns `null/Coursier/cache` as the directory name.

Solution
--------
With due respect to the heroic effort directories-jvm is making to comply to the directory standards on all operating systems, including that of Microsoft, I don't think the majority of the sbt users care exactly where that directory is as long as it is well-documented, and calculated in a fast and predictable way.

Instead of shelling out to Powershell, or using JNI, to hit the Known Folders API, I propose we first look at `LOCALAPPDATA` environment variable. When it is not found, it will fall back to `$HOME/AppData/Local`. Per discussion in https://github.com/dirs-dev/directories-jvm/issues/43, `LOCALAPPDATA` environment variable may NOT represent the one-true Known Folders API value of the AppData directory in case the user happened to have set the `LOCALAPPDATA` environmental variable. For the purpose of picking a directory for Coursier cache, I don't find that to be a problem because it will be faster, more reliable, and predictable.
2021-03-21 20:50:03 -04:00
eugene yokota b8691cba88
Merge pull request #6397 from arixmkii/bsp-env-var
Environment variables support in BSP debug session
2021-03-19 11:45:01 -04:00
Arthur Sengileyev 75a5135417 Adding env vars at ScalaMainClass creation time 2021-03-18 23:13:03 +02:00
Adrien Piquerez 332b53735e Silence unused-nowarn in meta-build 2021-03-18 18:27:26 +01:00
Arthur Sengileyev 970ce22aca Environment variables support in BSP debug session 2021-03-15 13:41:50 +02:00
eugene yokota 3d784b9217
Merge pull request #6378 from adpi2/bsp-logging
Improve BSP processing logs
2021-03-09 09:46:31 -05:00
Adrien Piquerez 93afa7e892 Improve BSP processing logs
The processing log is sent when a command issued by a request is being
processed, if the request has not yet been responded. In particular,
the processing log of sbtReportResult is filtered out if the client has
already received a response.

The processing log severity is the lowest so that it can be ignored by
the BSP client.
2021-03-09 10:18:12 +01:00
Ethan Atkins 7dc5590190 Don't use deprecated `in` inside of macros
The inputFileChanges, inputFiles and outputFiles macros all used the now
deprecated `in` syntax, which causes warnings for builds that use these
apis. SlashSyntax doesn't naively work in these macros so it was easier
to just reimplement the logic in this file.

Fixes #6330
2021-03-08 10:54:01 -08:00
Matthias Kurz 6fbed26d22 Make sure to also pass absolute sourceFile to sourceMappers 2021-03-07 14:44:42 -05:00
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