-
Notifications
You must be signed in to change notification settings - Fork 133
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
Deprecate latest
for toolkit
& add a relevant actionable diagnostic
#2426
Comments
related: #2394 |
FYI the official Scala Toolkit is now also broken. |
it appears that 1.0.5 is imminent: #2469 was a suitable fix already merged, such that it will be included in the release? |
Probably there will be the band-aid fix in that release (i.e. bump to latest Scala Native toolchain). But we will keep hitting this problem unless a more permanent solution is arrived at (which could be as simple as releasing a new scala-cli every time there is a new Scala Native or Scala.js release). |
or Scala release |
looks like in #2465 it is specifically now testing toolkit:latest compatibility with default platform versions |
The biggest problem with this is that if we release Scala CLI with certain default versions, we don't want people to have them suddenly updated, which might also break things. This is why |
even if someone doesnt change their Scala CLI version and then toolkit:latest suddenly breaks from a newer version, I guess there's not really a record anywhere of which version it used to resolve to before it broke, (so should we add lock files?) |
For the love of everything that is good and beautiful in this world, please don't solve a self-inflicted problem (
Edit: elaborating at @bishabosha's request. I've said this before, in a number of occasions: there should be no reason to get to the place where I want to write "latest". Either I'm in a command line, and I type in //> using toolkit and there the IDE's autocompletion suggests to complete into //> using toolkit 1.2.3 There's no reasonable workflow where I would even write the word "latest". The tools should preemptively get the actual latest version and write it for me. |
translation: code should not compile if it says |
Cross-linking to my other open issue 🙂 |
If we follow this thread (and I think it's a good thread to follow) then it seems to me that we need to encourage a lot more version pinning besides the toolkit version? We must pin either the version of scala-cli itself, or if not that, then the versions of Scala and Scala.js and Scala Native. Because otherwise even with pinned toolkit, the rug could be pulled under your feet by upgrading scala-cli. |
Ok, so out approach would be to deprecate
|
latest
for toolkit
& add a relevant actionable diagnostic
super useful, yes, and very useful when simply firing up a REPL. (but yes, sure, totally okay to change it to defaulting to "default" semantics rather than "latest" semantics) |
|
In that case, do we care about the latest version of toolkit staying compatible with the current release of scala-cli? The issue is primarily with Scala.js and Native, which is probably not a priority for REPL or one-use scripts. In theory it does also affect Scala versions, but I guess that breakage happens less frequently and can be better coordinated. |
Coming back to this ... So we release the Typelevel Toolkit every time one of the libraries bundled in the toolkit is updated. IMHO that's the point: an easy dependency to bring in the latest stuff. So far the Scala Toolkit hasn't really done this, but it might consider this strategy as well. Following from there: arguably scala-cli is morally a "toolkit" itself. It's not bundling libraries, but it is bundling compilers, toolchains, and plugins. So it should release frequently to keep this bundle up-to-date. |
We should release more frequently for sure,we've been just having some issues with the CI recently. |
Version(s)
1.0.4
Describe the bug
The default versions of Scala Native (and Scala.js) are behind the latest releases. Because they are not guaranteed to be forward-compatible, that means that libraries and toolkits built with the latest Native/JS releases may not work with scala-cli out-of-the-box.
To Reproduce
Adding
//> using nativeVersion 0.4.15
fixes it.Expected behaviour
IMHO a latest toolkit should Just Work:tm: with latest scala-cli. If a user has to explicitly lookup and add a version then it undermines the convenience factor and generally breaks user expectation.
scala.MatchError
typelevel/toolkit#49There are two possible strategies to address this.
scala-cli should update its defaults to latest Scala.js and Scala Native versions as soon as they are released.
Toolkits should not release with libraries that require newer Native/JS versions than what scala-cli ships by default. In practice, this means the libraries aggregated in toolkits should also hold back on JS/Native updates, otherwise it might be impossible to release a toolkit with an important bug fix to one of those libraries.
cc @TonioGela
The text was updated successfully, but these errors were encountered: