Commit Graph

2260 Commits

Author SHA1 Message Date
Eugene Yokota b1e9308ebe Use binary compiler bridge
Problem
-------
Starting Scala 2.13.12, Scala 2 has in-sourced the compiler bridge
implementtion, which hopefully will be kept up to date more than the
ones in Zinc.

Solution
--------
This switches to using the pre-compiled compiler bridge for >=2.13.12.
2023-09-11 23:15:15 -04:00
Seth Tisue 876a85461d add a Scala 3 seed to the sbt new menu 2023-08-13 07:18:09 -07:00
Adrien Piquerez 897e2552e4 Maintain order of internal deps 2023-08-02 10:26:59 +02:00
Eugene Yokota de20328029 Let ++ fall back to a bincompat Scala version
Fixes https://github.com/sbt/sbt/issues/7327

**Problem**
In builds with mixed Scala patch versions (like scalameta),
it's possible for a core subproject to be set to the lastest 2.12.x,
but the compiler plugin component is cross published to 2.12.0 etc.
`++ 2.12.0` in this case does not work since sbt 1.7.x onwards requires
the queried Scala version to be listed in `crossScalaVersions`.

**Solution**
This implements sbt 1.6.x-like fallback mechanism,
but instead of using the queried version (e.g. 2.12.0) it will set
the Scala version to one of listed versions that is binary compatible.
2023-07-09 18:31:55 -04:00
eugene yokota 98cafd366c
Merge pull request #7318 from eed3si9n/wip/template_bump
Bump toolkit versions
2023-06-25 20:07:14 -04:00
eugene yokota 4b810a63e7
Merge pull request #7304 from eed3si9n/wip/templates
Make sbt new extensible
2023-06-25 20:07:02 -04:00
Eugene Yokota 952db253a2 Bump toolkit versions 2023-06-25 19:18:43 -04:00
eugene yokota 5fc0a4c8d4
Merge pull request #7317 from xuwei-k/trivial-refactoring 2023-06-25 11:28:41 -04:00
eugene yokota fb011ecaa3
Merge pull request #7315 from xuwei-k/URL-constructor 2023-06-24 22:14:00 -04:00
xuwei-k 6c032b8283 some trivial refactoring
- remove unused type params
- use `withFilter` if possible
- use `collectFirst` instead of `collect` and `headOption`
- use `length` instead of `size` if `Array` or `String`
- use `foreach` instead of `map`
2023-06-25 08:57:41 +09:00
xuwei-k c7ec22cff8 avoid deprecated `java.net.URL` constructor
- https://bugs.openjdk.org/browse/JDK-8295949
- 4338f527aa
2023-06-25 08:23:09 +09:00
xuwei-k 3de0c92754 fix scaladoc warnings 2023-06-25 08:04:17 +09:00
xuwei-k 2edb4dcbb6 fix typo 2023-06-24 20:05:52 +09:00
Julien Richard-Foy 72bfb3f45a Transfer copyright to Scala Center 2023-06-20 16:39:07 +02:00
Eugene Yokota 5398f6e1aa Make sbt new extensible
Problem
-------
`sbt new` (`sbt init`) hardcodes the templates, which I think is ok,
but without changing much, we can make it extensible.

Solution
--------
This adds two new keys `templateDescriptions` and `templateRunLocal`,
which can customize the behavior for in-house usage etc.
2023-06-18 15:48:18 -04:00
Ondra Pelech 9ec7c4f027 Dependency graph with colors (based on the organization) (#7052) 2023-06-17 02:29:48 +02:00
Krzysztof Atłasik 118138a0c8
Add new template to text-based menu (#7300) 2023-06-15 05:14:40 -04:00
eugene yokota c6bc422ea3
Merge pull request #7298 from adpi2/fix-7297 2023-06-14 08:56:06 -04:00
Adrien Piquerez a209cf2700 Fix #7297: Convert OffsetPosition to BSP range 2023-06-14 10:35:54 +02:00
adpi2 f692583034
Merge pull request #7295 from adpi2/fix-7288
Fix #7288: `publish` should not fail if `publish / skip := true`
2023-06-13 09:54:45 +02:00
eugene yokota e0d88607a5
Merge pull request #7294 from ckipp01/semanticDbUpdate
deps: bump the default semanticdb version used
2023-06-12 13:03:53 -04:00
Adrien Piquerez 783a8e57db Fix #7288 and implement publisM2 / skip 2023-06-12 18:06:06 +02:00
eugene yokota cfa88f766f
Merge pull request #7290 from mkurz/sbtn-1.9.0
sbtn 1.9.0
2023-06-12 10:49:49 -04:00
Chris Kipp 05ac9c88d1 deps: bump the default semanticdb version used
This updates semanticdb from 4.5.13 to 4.7.8.
2023-06-12 16:44:20 +02:00
Alex Klibisz b9cc499ec3
Fix typo in exportPipelining Key description 2023-06-07 13:21:00 -04:00
Matthias Kurz 7256fb2725
sbtn 1.9.0 2023-06-06 17:12:41 +02:00
Adrien Piquerez dd00e143f2 Fix #7285: use legacy Maven style on publishLocal 2023-06-05 21:24:20 +02:00
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