10000 add a Scala 3 seed to the sbt new menu by SethTisue · Pull Request #7354 · sbt/sbt · GitHub
[go: up one dir, main page]

Skip to content

add a Scala 3 seed to the sbt new menu #7354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

SethTisue
Copy link
Member
@SethTisue SethTisue commented Aug 13, 2023

seems like probably just an oversight that this wasn't included in the first place

@@ -172,6 +172,7 @@ private[sbt] object TemplateCommandUtil {
ScalaToolkitSlug -> "Scala Toolkit (beta) by Scala Center and VirtusLab",
TypelevelToolkitSlug -> "Toolkit to start building Typelevel apps",
SbtCrossPlatformSlug -> "A cross-JVM/JS/Native project",
"scala/scala3.g8" -> "Scala 3 seed template",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't Scala Toolkit template effectively function as Scala 3 seed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I guess you couuuuuld argue it that way, but I actually wouldn't. The menu offers a plain Scala 2 seed even though the toolkit supports both 2 and 3. And I think there are probably many people who either don't know what the toolkit is or know what it is and don't want it.

I mean, it's kinda tough because there's a whole big space of possibilities here: 2 or 3, toolkit or not, cross built or not, and so on. But the UI we have is a linear list of templates; that list isn't excessively long, even with the addition I'm suggesting; and most importantly, I think a plain, toolkit-less Scala 3 template would probably be literally the single most popular option it were offered.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it comes down to who the target audience and intended usages. I am guessing that most of the builds are initially for noodling purpose, maybe by first-time Scala users, maybe by someone experienced but want to quickly try some code out. The idea of the Toolkit, like Python, is to include basic things like JSON and HTTP whether you need it or not. So my claim is that scala/toolkit.local is a superset of scala/scala3.g8, and we should let people use it even for writing hello world, at least for now. /cc @adpi2

Copy link
Member Author
@SethTisue SethTisue Aug 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we follow that thinking to its logical conclusion, we'd want to add the toolkit to the plain 2 and 3 templates and not bother having any toolkit-specific templates at all.

I believe the current 2 and 3 templates both add MUnit, so there is some precedent for including at least one default library.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the Toolkit is still experimental I think we should have both seeds (toolkit and scala3). After we release a stable version of the Toolkit we can open this discussion again and maybe merge the Toolkit into the scala2 and scala3 seeds.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @adpi2 . We want to move toward making Toolkit the default wherever possible, so it would be a good idea to put it in the scala2 and 3 seeds. However, before making it appear transparently without any notice, we should stabilize it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the overall consensus seems to be that sbt init should list "scala/scala3.g8" regardless then.

Copy link
Member
@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SethTisue!

@eed3si9n eed3si9n merged commit f5e0838 into sbt:1.9.x Aug 16, 2023
@SethTisue SethTisue deleted the add-scala-3-template branch August 16, 2023 17:53
cwienberg referenced this pull request in cwienberg/spark-sorting-helpers Aug 25, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sbt/sbt](https://togithub.com/sbt/sbt) | patch | `1.9.3` -> `1.9.4` |

---

### Release Notes

<details>
<summary>sbt/sbt (sbt/sbt)</summary>

### [`v1.9.4`](https://togithub.com/sbt/sbt/releases/tag/v1.9.4): 1.9.4

[Compare Source](https://togithub.com/sbt/sbt/compare/v1.9.3...v1.9.4)

##### CVE-2022-46751

[CVE-2022-46751](https://togithub.com/advisories/GHSA-2jc4-r94c-rp7h) is
a security vulnerability discovered in Apache Ivy, but found also in
Coursier.

With coordination with Apache Foundation, Adrien Piquerez
([@&#8203;adpi2](https://togithub.com/adpi2)) from Scala Center
backported the fix to both our Ivy 2.3 fork and Coursier. sbt 1.9.4
updates them to the fixed versions.

#### Other updates

- Fixes `sbt_script` lookup by replacing all spaces with `%20` (not only
the first one) in the path. by
[@&#8203;arturaz](https://togithub.com/arturaz) in
[https://github.com/sbt/sbt/pull/7349](https://togithub.com/sbt/sbt/pull/7349)
- Fixes
[scala-debug-adapter#543](https://togithub.com/scala-debug-adapter/sbt/issues/543):
Maintain order of internal deps by
[@&#8203;adpi2](https://togithub.com/adpi2) in
[https://github.com/sbt/sbt/pull/7347](https://togithub.com/sbt/sbt/pull/7347)
- Removes `conscriptConfigs` task, not used and needed(?) anymore by
[@&#8203;mkurz](https://togithub.com/mkurz) in
[https://github.com/sbt/sbt/pull/7353](https://togithub.com/sbt/sbt/pull/7353)
- Adds a Scala 3 seed to the `sbt new` menu by
[@&#8203;SethTisue](https://togithub.com/SethTisue) in
[https://github.com/sbt/sbt/pull/7354](https://togithub.com/sbt/sbt/pull/7354)

#### new contributors

- [@&#8203;arturaz](https://togithub.com/arturaz) made their first
contribution in
[https://github.com/sbt/sbt/pull/7349](https://togithub.com/sbt/sbt/pull/7349)

**Full Changelog**: sbt/sbt@v1.9.3...v1.9.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/cwienberg/spark-sorting-helpers).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzYuNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0