Commit Graph

2233 Commits

Author SHA1 Message Date
Eugene Yokota 7c7576843a Fix sbt init menu
Problem
-------
sbt init menu doesn't pick the right template in the latter half.

Solution
--------
This fixes the mapping between the position and the letter.
2023-06-01 22:45:51 -04:00
Eugene Yokota 1f1ee778e3 Update Scala to 2.12.18
Fixes https://github.com/sbt/sbt/issues/7235
2023-06-01 12:13:40 -04:00
eugene yokota babbdaeaa0
Merge pull request #7264 from eed3si9n/wip/diagnostic
Forward ScalaDiagnostic
2023-05-26 09:49:59 -04:00
Arman Bilge dc79c592cf Update typelevel toolkit, config test artifact 2023-05-22 21:53:09 +00:00
Eugene Yokota 93bd66b673 Forward ScalaDiagnostic
**Problem**
Zinc added actions in Problem, but it's not yet forwarded to BSP
clients.

**Solution**
As discussed in
https://contributors.scala-lang.org/t/roadmap-for-actionable-diagnostics/6172,
the plan seems to be to use the `data` field with `actions` inside it,
so this implements that.
2023-05-22 00:33:46 -04:00
Jakub Kozłowski f8a29b748b
Add weaver-cats as a default test framework (#7263)
Add weaver-cats as a default test framework
2023-05-21 23:28:04 -04:00
Matthew de Detrich e3c7bc7d8f
Deprecate itSettings 2023-05-22 00:14:29 +02:00
eugene yokota 26e9af13ec
Merge pull request #7240 from eed3si9n/wip/bannar
sbt 1.9.0 bannar
2023-05-07 14:41:01 -04:00
Eugene Yokota b122e292e5 Bump Typelevel toolkit 2023-05-07 14:18:18 -04:00
Eugene Yokota 731af0173c Add init as an alias to new 2023-05-07 14:17:26 -04:00
Eugene Yokota 2664884f37 sbt 1.9.0 bannar 2023-05-07 14:05:05 -04:00
Eugene Yokota 86ecec8ac3 sbt-giter8-resolver 0.16.2 2023-05-07 01:28:46 -04:00
Eugene Yokota 51591bde5b Make new more interactive
If the terminal supports ANSI control sequence,
this displays the template list in an interactive way.
The focused template is rendered reversed,
and arrow key can be used to move the focus up/down.
2023-05-06 20:07:47 -04:00
eugene yokota 3d1349a37d
Merge pull request #7234 from adpi2/fix-7233
[1.9.x] Fix #7233: copy artifact files of sbt plugin
2023-05-04 12:47:28 -04:00
Adrien Piquerez bb0bb5ce58 Fix #7233
The sbt-reproducible-build fails if  two artifacts point to the same file.

When packaging the artifacts of an sbt plugin,
we copy each files to avoid this issue.
2023-05-04 10:46:21 +02:00
Eugene Yokota 4c96c087c0 Fix typo 2023-05-03 21:20:16 -04:00
eugene yokota d8725e245e
Merge pull request #7228 from eed3si9n/wip/new
sbt new, a text-based adventure
2023-05-01 00:27:47 -04:00
Eugene Yokota a033c37d6e sbt new, a text-based adventure
**Problem**
You want to get started with sbt, and you don't know
which template to get started with.

**Solution**
This implements an interactive menu on `sbt new` command
when invoked without an argument to list template candidates.

The first option is `scala/toolkit.local`, which locally creates
an sbt build without calling out to Giter8 (GitHub).
2023-04-30 23:36:06 -04:00
Eugene Yokota f98c4fff3b Update modules 2023-04-30 00:56:11 -04:00
eugene yokota df738abbbd
Merge pull request #7215 from dragos/expose/external-hooks-public
Expose RunProfiler to the build
2023-04-25 11:49:28 -04:00
Iulian Dragos 6dfebc689b
Add a key for Zinc listeners.
Expose what the incremental compiler is doing behind the scenes. The RunProfiler interface has been part of Zinc for a while, but this allows the build itself, or an Sbt plugin, to hook their own implementation.

We expose a list of such listeners to avoid plugins stepping on each other and replacing an existing listener.
2023-04-25 12:00:02 +02:00
Iulian Dragos 9301bc2589
Make externalHooks public
This key has been added in 4061dabf4d but it is only available to Sbt itself. Since ExternalHooks is a Java interface, defined in Zinc for a while and fairly stable, I think this should be safe to do.

My main  motivation is to allow installing an InvalidationProfiler from an Sbt plugin, thus gaining access to zinc recompilation decisions. See related PR https://github.com/sbt/zinc/pull/1181
2023-04-18 15:13:09 +03:00
adpi2 e1b0b25418
Merge pull request #7201 from adpi2/sbt-plugin-toggle
[1.9.x] Add `sbtPluginPublishLegacyMavenStyle` to publish to Artifactory
2023-04-12 09:55:13 +02:00
Adrien Piquerez 9e0a728c58 Add sbtPluginPublishLegacyMavenStyle to publish to Artifactory
Artifactory rejects the legacy artifacts of sbt plugin.
It is now possible to publish to Artifactory
by turning `sbtPluginPublishLegacyMavenStyle` off.
2023-04-11 16:56:24 +02:00
Adrien Piquerez 5436ed5ef8 Fix cross-publish sbt plugin to Maven 2023-04-11 11:43:44 +02:00
eugene yokota 4a470dcd17
Merge pull request #7148 from armanbilge/feature/release-notes-url
Add `releaseNotesURL` setting
2023-03-07 10:37:46 -05:00
Matthew de Detrich 714e4175b3
Improve grammar on skip key description 2023-03-04 09:19:17 +01:00
Matthew de Detrich 2a332a56a9
Make skip work on publishLocal 2023-03-03 16:09:44 +01:00
Arman Bilge ed29e35f41 Bump lm, use release notes key 2023-02-28 06:08:13 +00:00
Adrien Piquerez 8020ec4d7c Smooth transition to valid Maven pattern of sbt plugin
For an sbt plugin, we publish two POM files, the legacy one, and the
new Maven compatible one. The name of the new POM file contains the sbt
cross-version _2.12_1.0. The format of the new POM file is also slightly
different, because we append the sbt cross-version to all artifactIds of
sbt plugins. Hence Maven can resolve the new sbt plugin POM and its
dependencies.

When resolving an sbt plugin, we first try to resolve the new Maven POM
and if it fails we fallback on the legacy one. When parsing the new POM
format, we remove the sbt cross-version from all artifact IDs so that
there is no mismatch between old and new format of dependencies.
2023-02-22 10:09:26 +01:00
Arman Bilge 11ea11e382
Fix
Co-authored-by: Marco Zühlke <mzuehlke@gmail.com>
2023-02-12 22:54:19 -08:00
Arman Bilge 3cde7f8e07 Missing comma 2023-02-12 23:27:14 +00:00
Arman Bilge 3ce8008ae7 WIP support for `releaseNotesURL` 2023-02-10 06:19:39 +00:00
Adrien Piquerez 9b4d5a5a5a Fix reporting Java diagnostics through BSP
Java diagnostics don't have a pointer but we should report them.
Copied implementation from Bloop to translate the position of an
xsbti.Problem to a BSP range.
2023-01-27 10:21:44 +01:00
Eugene Yokota b0b7705739 Fixes Debian 11 compat
Fixes https://github.com/sbt/sbt/issues/7118

Problem
-------
sbtn 1.8.1 was built using ubuntu-latest, which meant picking up newer
glibc.

Solution
--------
This downgraded the ubuntu machine to build sbtn.
2023-01-04 17:19:29 -05:00
Matthias Kurz ac638a764d
Use latest sbtn 2023-01-03 16:02:18 +01:00
Matthias Kurz 5fa46859d2
Make use of sbtn aarch64 binary where possible 2023-01-03 12:41:49 +01:00
Eugene Yokota 39dc13668f lm-coursier-shaded 2.0.12
https://github.com/coursier/sbt-coursier/releases/tag/v2.0.12
2022-10-30 18:25:04 -04:00
Nabil Abdel-Hafeez e7a847615a
Add zio-test TestFramework to default test frameworks 2022-10-16 22:42:53 +02:00
frosforever d366b77b23 Protect against missing edges in graph by using map get vs apply 2022-10-02 14:04:50 -04:00
Eugene Yokota 2a61fb35f9 Fix /tmp/.sbt/ collision for domain socket
Problem
-------
Fixes https://github.com/sbt/sbt/issues/7013
In a shared environment, multiple users will try to create
`/tmp/.sbt/` directory, and fail.

Solution
--------
Append a deterministic hash like `/tmp/.sbt1234ABCD` based
on the user home, so the same directory is used for the given
user, but each user would have a unique runtime directory.
2022-10-02 12:45:30 -04:00
eugene yokota f0cb420fe2
Merge pull request #7031 from gontard/backport_6903_to_1.8.x
Backport #6903 to 1.8.x
2022-09-30 11:43:20 -04:00
gontard cc44169fe0 Fix testQuick on changed function in object
Fix https://github.com/sbt/sbt/issues/5504
2022-09-30 11:25:31 +02:00
gontard 89acd3eed1 Improve log for not found remote cache artifact
Before
remote cache not found for 0.0.0-7c40144bd1c774e6

After
remote cache artifact not found for org.gontard:sbt-test:0.0.0-7c40144bd1c774e6 Some(cached-compile)
2022-09-30 11:07:20 +02:00
Eugene Yokota b00792a3a7 Scala 2.12.17
This bumps up scala-xml to 2.x.
2022-09-17 04:09:52 -04:00
Eugene Yokota 573cd2de81 Giter8 0.15.0 by default 2022-09-11 13:03:43 -04:00
Devin Fisher 9f9b08edbd refactor printing error to an in-function function 2022-08-10 10:08:49 -04:00
Devin Fisher 5874ad920e add output when book server socket fails to create 2022-08-10 10:08:42 -04:00
eugene yokota ab59e4c6ba
Merge pull request #6998 from ckipp01/captureCodeBsp
feat: start forwarding diagnosticCode via BSP
2022-08-10 10:03:40 -04:00
Chris Kipp 15a45cb3c0 feat: start forwarding diagnosticCode via BSP
This change is a continuation of the work that was done in
https://github.com/sbt/sbt/pull/6874 to allow the Scala 3 compiler to
forward the `diagnosticCode` of an error as well as the other normal
things. This change in dotty was merged in
https://github.com/lampepfl/dotty/pull/15565 and also backported so it
will be in the 3.2.x series release. This change captures the
`diagnosticCode` and forwards it on via BSP so that tools like Metals
can can use this code.

You can see this in the BSP trace now for a diagnostic:

For example with some code that contains the following:

```scala
val x: Int = "hi"
```

You'll see the code in the BSP diagnostic:
```  "diagnostics": [
    {
      "range": {
        "start": {
          "line": 9,
          "character": 15
        },
        "end": {
          "line": 9,
          "character": 19
        }
      },
      "severity": 1,
      "code": "7",
      "source": "sbt",
      "message": "Found:    (\u001b[32m\"hi\"\u001b[0m : String)\nRequired: Int\n\nThe following import might make progress towards fixing the problem:\n\n  import sourcecode.Text.generate\n\n"
    }
  ]
```

Co-authored-by: Adrien Piquerez <adrien.piquerez@gmail.com>
Refs: https://github.com/lampepfl/dotty/issues/14904
2022-08-09 19:02:52 +02:00