-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Release 3.0.0-RC2 #11929
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
Comments
When upgrading the scalaVersion in the example projects, I suggest also upgrading to sbt 1.5.0-RC2 and removing sbt-dotty: this way we'll get more people to test that sbt 1.5 works well with scala 3 by default. |
Oh wow... Wow so we can't use any "experimental" features any more... ok... Can't help but feel like this decision treat users like children who don't understand what "experimental" means. Ultimately it's going to prevent the Dotty team from getting a bunch of early, useful feedback from users trying this stuff out in RCs. Feels like a real shoot-yourself-in-the-foot move. How are features going to become non-experimental? Take erased classes for example, I would've tested the hell out of them but now will it just be the Dotty team testing it internally, to later remove the experimental status? If so when? What version? 3.0.0? or 3.0.1? Seeing as the announcement isn't out yet, it'd be really useful to clarify how this is going to work out. |
And if we allow experimental features in release builds, people complain that experimental is meaningless and we're just recklessly adding features to the language, there's no way to make everyone happy here: https://www.reddit.com/r/scala/comments/m50trg/martin_odersky_explains_the_motivations_behind/gqxj2zv/
By following the SIP process hopefully.
No, we very much want people to test these features themselves, we just require that they use a nightly build to do so, given that we provide nightly builds on Maven Central, I don't think this is a tall order, it's also very much inspired by the way Rust does thing which seems to have worked well for them so far.
Depends on when/if the feature is accepted by the SIP committee and the community. |
I strongly support this change. But I would like to add: Historically, it has been rather difficult to use Scala 2 nightlies on some codebases, namely if there are dependencies, perhaps transitive ones, that are fully cross-versioned (as opposed to only by major version): so e.g. kind-projector, Scalameta. I've struggled with this myself, even though I'm pretty well versed in sbt. In simple cases I'm sometimes able to resolve it adding an override or by publishing a dependency locally, but sometimes it gets tricky. (In other cases I use dbuild, but I'm almost the only person for whom that's a reasonable solution.) I assume users might run into comparable difficulties in testing Scala 3 nightlies with their codebases. If so, it remains a build tool issue and not a language issue, but: I believe this change will put some pressure on build tool maintainers to make nightlies convenient to use on more projects. Whether it's through documentation, or actual changes to the tool, or both. (Typically sbt leads on these sorts of issues and then the other tools try to catch up.) /cc @eed3si9n |
I'm not sure what build tool issue you have in mind, if you're using a project whose cross-version is the full compiler version, that means it relies on APIs which might change between every version, so you can't expect it to work with a nightly. If you're feeling brave you can always try replacing |
It might not, but often it does; and if it does, it's a win because now I can test something I couldn't have otherwise tested.
in my experience it's often not that simple, because of transitive dependencies |
Getting errors like: useScala3doc := true,
^
sbt.compiler.EvalException: Type error in expression And lazy val crossVersions = Seq(Option(rcVersion), dottyLatestNightlyBuild()).flatten
^
sbt.compiler.EvalException: Type error in expression I set |
scala3-example-project/build.sbt:2: error: not found: value dottyLatestNightlyBuild
lazy val crossVersions = Seq(Option(rcVersion), dottyLatestNightlyBuild()).flatten
^
scala3-example-project/build.sbt:11: error: not found: value useScala3doc
useScala3doc := true,
^
sbt.compiler.EvalException: Type error in expression
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r) It says the values are not found, so maybe the feature was dropped? Could you open an issue under sbt/sbt? We can continue the discussion there. |
@anatoliykmetyuk you should just remove the |
Oh and dottyLatestNightlyBuild doesn't exist in sbt either and should be removed from the example project (I don't think it should have ever been added, this is supposed to be a simple example you can copy-paste, it shouldn't include more advanced things like cross-compilation) |
Is the removal of these settings issue-worthy at sbt/sbt? |
No, not adding these settings was intentional |
Well in that case I'd be happy to help test the new features. I was already looking forward to anyway. The problem is it seems near impossible for me to do so because I'm not working on a dependency-free project, I'm working on a chain of libraries that depend on each other and I'm depending on other libraries that've been published for RC1 (and soon RC2) proper. I spent a limited amount of time trying to make that work and failed. If using nighties is going to become a more common practice then can we get some documentation on how to configure sbt? Ideally it would be alongside the RC2 release notes because this is the first release to force people on to nightlies, and I imagine many others are going to struggle with how to setup sbt to mix-and-match all different versions. |
Also FYI there's no nightly out that includes everything in RC2. The latest is |
To use a nighty, you just need to set the scalaVersion to that nightly version, no extra setup required since we publish nightlies on maven, it's also documented in https://github.com/scala/scala3-example-project
Now that RC2 is out, no more nightlies for it will be published, the next nightly will be for 3.0.1-RC1 but the one from last night failed because of #11946 |
Except if it doesn't fit with Scala 3's restrictions, like @lenses (from
Monocle)
By the way does that mean that to have code coverage in Scala 3 it will be
added to the compiler? What about other instrumentation, like
scalac-profiler (if I remember the name right)?
…On Tue, Mar 30, 2021, 1:15 PM Guillaume Martres ***@***.***> wrote:
I'm not sure what build tool issue you have in mind, if you're using a
project whose cross-version is the full compiler version, that means it
relies on APIs which might change between every version, so you can't
expect it to work with a nightly. If you're feeling brave you can always
try replacing "foo" %%% "bla" by "foo_specificversion" % "bla" in your
build, but a build tool shouldn't do that for you automatically since
there's no guarantee it will work. (I'd say the real solution here is:
don't use compiler plugins, implement your changes in the actual compiler
instead!).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11929 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAYAUGGV4RU5NMDE3ZMTQTTGIBJNANCNFSM4Z7PXN2A>
.
|
That would be for the best I think yes, there's already a prototype of that, but it needs someone to finish it: http://guillaume.martres.me/code_coverage.pdf
https://github.com/scalacenter/scalac-profiling appears to be abandoned, but yeah more profiling built into the compiler could be useful. |
@smarter A few follow up questions if you don't mind
How are we supposed to test the experimental features in RC2? The latest RC2 nightly is So RC2 has experimental features...
Either you didn't understand what I was saying about dependency chains, or I'm not understanding the situation properly. If I change library If I have to start using 3.0.1-RC1 nightlies to test the experimental features in RC2, do all downstream libraries now need to use Do you see what I mean? I don't understand how anyone can test the experimental stuff in RC2. |
Yeah, that's an issue for now that will be resolved after 3.0.0 is out and all suffixes are _3 (this should already be the case for nightlies right now but isn't due to #11952)
It's going to depend on the tasty version of the compilers involved, but I would recommend using the same nightly for the whole chain and we might end up enforcing that depending on a nightly-compiled artefact requires using a nightly compiler since otherwise one might accidentally transitively depend on experimental features without realizing it, but this is still all up in the air. |
Yeah ok cool thanks @smarter . The code I write tends to find lots of bugs pretty quickly so I was hoping to test erased-defs early and get it stable asap (because it's one of the most exciting features for me) but unfortunately I think I'll just hold off for a while, until it gets easier. Even updating and republishing everything for RC2 is proving to be a bit of a pain :( Really looking forward to those stable _3 suffixes. |
Uh oh!
There was an error while loading. Please reload this page.
master
to guarantee that all of the commits are propagated tomaster
3.0.0-RC2
frommaster
baseVersion
and tag it as3.0.0-RC2
master
, setbaseVersion
to the next version to be releasedscalaVersion
(and, if applicable, thesbt-dotty
version) in the Dotty ecosystem projects<rc-version>
Instructions on how to release
The text was updated successfully, but these errors were encountered: