Skip to content

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

Closed
28 of 34 tasks
anatoliykmetyuk opened this issue Mar 29, 2021 · 20 comments
Closed
28 of 34 tasks

Release 3.0.0-RC2 #11929

anatoliykmetyuk opened this issue Mar 29, 2021 · 20 comments
Assignees
Labels
itype:meta Issues about process/similar

Comments

@anatoliykmetyuk
Copy link
Contributor

anatoliykmetyuk commented Mar 29, 2021

Instructions on how to release

@anatoliykmetyuk anatoliykmetyuk added the itype:meta Issues about process/similar label Mar 29, 2021
@anatoliykmetyuk anatoliykmetyuk self-assigned this Mar 29, 2021
@smarter
Copy link
Member

smarter commented Mar 29, 2021

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.

@japgolly
Copy link
Contributor

Experimental feature experimental.erasedDefinitions may only be used with nightly or snapshot version of compiler

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.

@smarter
Copy link
Member

smarter commented Mar 30, 2021

Can't help but feel like this decision treat users like children who don't understand what "experimental" means.

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/

How are features going to become non-experimental?

By following the SIP process hopefully.

will it just be the Dotty team testing it internally

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.

If so when? What version?

Depends on when/if the feature is accepted by the SIP committee and the community.

@SethTisue
Copy link
Member

SethTisue commented Mar 30, 2021

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

@smarter
Copy link
Member

smarter commented Mar 30, 2021

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!).

@SethTisue
Copy link
Member

SethTisue commented Mar 30, 2021

so you can't expect it to work with a nightly

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.

If you're feeling brave you can always try replacing "foo" %%% "bla" by "foo_specificversion" % "bla" in your build

in my experience it's often not that simple, because of transitive dependencies

@anatoliykmetyuk
Copy link
Contributor Author

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.

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 sbt.version=1.5.0-RC2 in project/build.properties and removed the SBT Dotty plugin on scala3-example-project. Any ideas on how to migrate those settings?

@eed3si9n
Copy link
Member

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.

@smarter
Copy link
Member

smarter commented Mar 30, 2021

@anatoliykmetyuk you should just remove the useScala3doc setting, it's no longer needed.

@smarter
Copy link
Member

smarter commented Mar 30, 2021

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)

@anatoliykmetyuk
Copy link
Contributor Author

Is the removal of these settings issue-worthy at sbt/sbt?

@smarter
Copy link
Member

smarter commented Mar 30, 2021

No, not adding these settings was intentional

@japgolly
Copy link
Contributor

japgolly commented Mar 30, 2021

No, we very much want people to test these features themselves, we just require that they use a nightly build to do

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.

@japgolly
Copy link
Contributor

Also FYI there's no nightly out that includes everything in RC2. The latest is 3.0.0-RC2-bin-20210328-cca5f8f-NIGHTLY which is a bunch of commits behind 3.0.0-RC2. A 20210329 nightly should've been out by now; maybe someone in the know can check?

@smarter
Copy link
Member

smarter commented Mar 30, 2021

can we get some documentation on how to configure sbt?

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

A 20210329 nightly should've been out by now

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

@nafg
Copy link

nafg commented Mar 31, 2021 via email

@smarter
Copy link
Member

smarter commented Mar 31, 2021

By the way does that mean that to have code coverage in Scala 3 it will be
added to the compiler?

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

scalac-profiler

https://github.com/scalacenter/scalac-profiling appears to be abandoned, but yeah more profiling built into the compiler could be useful.

@japgolly
Copy link
Contributor

japgolly commented Apr 6, 2021

@smarter A few follow up questions if you don't mind

Now that RC2 is out, no more nightlies for it will be published, the next nightly will be for 3.0.1-RC1

How are we supposed to test the experimental features in RC2? The latest RC2 nightly is 3.0.0-RC2-bin-20210328-cca5f8f-NIGHTLY which is a significant number of commits behind the final RC2. The next available nightly is 3.0.1-RC1-bin-20210330-3ebeaa9-NIGHTLY which, please correct me if I'm wrong, can't be used with any RC2 artifact for the same reasons that I can't use any RC1 stuff when I'm on RC2.

So RC2 has experimental features...
They can only be tested on nightly builds...
There's no nightly build that follows RC2...
The next nightly build is incompatible with RC2...
I think this is an impossible situation.

To use a nighty, you just need to set the scalaVersion to that nightly version, no extra setup required

Either you didn't understand what I was saying about dependency chains, or I'm not understanding the situation properly. If I change library A to depend on a nightly of RC2, great, that's easy enough. Now I publish that library and move on to library B which depends on library A, what's the compatibility story like? Do I have to use the exact same nightly version in library B as is used in library A? Will any RC2 build be compatible? If I use non-nightly RC2 in lib B are we expecting that to work?

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
3.0.1-RC1 as well?

Do you see what I mean? I don't understand how anyone can test the experimental stuff in RC2.

@smarter
Copy link
Member

smarter commented Apr 6, 2021

The next available nightly is 3.0.1-RC1-bin-20210330-3ebeaa9-NIGHTLY which, please correct me if I'm wrong, can't be used with any RC2 artifact for the same reasons that I can't use any RC1 stuff when I'm on 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)

Now I publish that library and move on to library B which depends on library A, what's the compatibility story like?

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.

@japgolly
Copy link
Contributor

japgolly commented Apr 7, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
itype:meta Issues about process/similar
Projects
None yet
Development

No branches or pull requests

6 participants