Skip to content
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

Consider stdlib additions for dotty cross-compilation #449

Closed
1 task
adriaanm opened this issue Nov 23, 2017 · 17 comments
Closed
1 task

Consider stdlib additions for dotty cross-compilation #449

adriaanm opened this issue Nov 23, 2017 · 17 comments

Comments

@adriaanm
Copy link
Contributor

@adriaanm adriaanm added this to the 2.13.0-M4 milestone Nov 23, 2017
@szeiger
Copy link

szeiger commented Nov 28, 2017

type AnyConstr[_] = Any would be useful

@smarter
Copy link
Member

smarter commented Dec 1, 2017

See https://github.com/lampepfl/dotty/tree/master/library/src for everything that could be added. For stuff that does not require compiler support, we could also consider cross-compiling a modified version of dotty-library to scalac.

@SethTisue SethTisue modified the milestones: 2.13.0-M4, 2.13.0-M5 May 9, 2018
@smarter
Copy link
Member

smarter commented Aug 5, 2018

A very useful addition for cross-compiling would be https://github.com/lampepfl/dotty/blob/master/library/src/scala/implicits/Not.scala for implicit negation, see the documentation inside to understand the rationale.

@SethTisue
Copy link
Member

time is running short for PRs in this area

@smarter
Copy link
Member

smarter commented Aug 7, 2018

But additions could go in post-2.13.0, no?

@SethTisue SethTisue modified the milestones: 2.13.0-M5, 2.13.0-RC1 Aug 7, 2018
@adriaanm
Copy link
Contributor Author

adriaanm commented Aug 7, 2018

No, we're impose forwards and backwards bin compat for the std lib.

@smarter
Copy link
Member

smarter commented Aug 7, 2018

What's the purpose of forward bin compat?

@lrytz
Copy link
Member

lrytz commented Aug 7, 2018

Libraries compiled with 2.N.(x+1) can safely be used on 2.N.x.

@smarter
Copy link
Member

smarter commented Aug 7, 2018

Isn't sbt going to select the biggest version anyway?

@adriaanm
Copy link
Contributor Author

adriaanm commented Aug 7, 2018

not everyone uses sbt -- it's good to re-evaluate this before we release 3.0, but the 2.x cycle probably can't change its bin compat policy

@dwijnand
Copy link
Member

dwijnand commented Aug 7, 2018

I'd argue this is a legacy policy that can be changed in a major version change (e.g 2.13). scala-library is a transitive dependency, and the latest in a dependency graph should be picked, whatever the tool used to build the software is.

@jvican
Copy link
Member

jvican commented Aug 7, 2018

Related discussion in https://contributors.scala-lang.org/t/question-about-changes-in-the-scalac-release-cycle/1093/11?u=jvican, where I argue how forward bincompat is useful to sbt plugin authors and software with similar plugin systems.

@Jasper-M
Copy link

Jasper-M commented Aug 7, 2018

I'd argue this is a legacy policy that can be changed in a major version change (e.g 2.13). scala-library is a transitive dependency, and the latest in a dependency graph should be picked, whatever the tool used to build the software is.

As a possible counterargument: when you have a Spark installation on your cluster, its Scala version might be fixed to 2.11.8 (let's hope 2.12.6 soon...), which means that every Spark job will have Scala 2.11.8 on its classpath. Without forward compatibility, using libraries compiled with a more recent version could break at runtime. Correct me if this is a brainfart.

@dwijnand
Copy link
Member

dwijnand commented Aug 7, 2018

Correct me if this is a brainfart.

No, your example is like Jorge's: a managed runtime (sbt/spark) where custom software (sbt plugins/spark jobs) that depends on a newer, backwards-compatible scala-library doesn't use the newer jar.

It's a bit of chicken-and-egg problem.

@Jasper-M
Copy link

Jasper-M commented Aug 7, 2018

Related discussion in https://contributors.scala-lang.org/t/question-about-changes-in-the-scalac-release-cycle/1093/11?u=jvican

Something that seemed to be missing from that discussion is using libraries in a sbt plugin / spark / ... situation. Theoretically you could ask every spark developer to compile against 2.11.8 (which already means they might have to miss out on possible improvements or fixes in the compiler), but you can't ask them to make sure that every library they're (transitively) using was compiled against 2.11.[0-8].

@SethTisue SethTisue modified the milestones: 2.13.0-RC1, 2.14 Feb 6, 2019
@SethTisue
Copy link
Member

tentatively reassigned to 2.14 milestone

@SethTisue
Copy link
Member

note that https://github.com/scala/scala-library-next is now open for business

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

No branches or pull requests

8 participants