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

Automatically choose proper compiler bridge for dotty #2902

Merged
merged 1 commit into from
Jan 11, 2017

Conversation

smarter
Copy link
Contributor

@smarter smarter commented Jan 10, 2017

Before this commit, using dotty in your sbt project required to add:

  scalaCompilerBridgeSource := ("ch.epfl.lamp" % "dotty-sbt-bridge" %
    scalaVersion.value % "component").sources()

in your build.sbt. We might as well automatically do this, this reduces
the boilerplate for using dotty in your project to:

  scalaOrganization := "ch.epfl.lamp"
  scalaVersion := "0.1.1-SNAPSHOT"
  scalaBinaryVersion := "2.11" // dotty itself is only published as a
                               // 2.11 artefact currently

Note: I did not add a test for this since there is no released version of dotty yet, we could have a test that depends on a nightly build of dotty (http://central.maven.org/maven2/ch/epfl/lamp/dotty_2.11/) but I'm not sure if maven keeps old nightly builds around forever.

@eed3si9n eed3si9n added the ready label Jan 10, 2017
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

I'll defer to @eed3si9n, as he understands how compiler bridges are meant to be used and customized.

@smarter
Copy link
Contributor Author

smarter commented Jan 10, 2017

The single test failure appears to be spurious and is unrelated to this PR:

[info] Could not create file /tmp/sbt_ecf6163e/java-mixed/target/streams/$global/ivySbt/$global/streams/outjava.io.IOException: No such file or directory

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.

I think it's generally ok, but could you add release notes in https://github.com/sbt/sbt/tree/0.13/notes/0.13.14 and clarify in there that Dotty support in sbt is an experimental feature that's controlled by EPFL, plz?

@smarter
Copy link
Contributor Author

smarter commented Jan 11, 2017

Release notes added!

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!

@dwijnand
Copy link
Member

->compile,default here vs ->default(compile) in #2903... which one should it be?

@smarter
Copy link
Contributor Author

smarter commented Jan 11, 2017

Oops, that commit should not be there

Before this commit, using dotty in your sbt project required to add:
  scalaCompilerBridgeSource := ("ch.epfl.lamp" % "dotty-sbt-bridge" %
    scalaVersion.value % "component").sources()
in your build.sbt. We might as well automatically do this, this reduces
the boilerplate for using dotty in your project to:
  scalaOrganization := "ch.epfl.lamp"
  scalaVersion := "0.1.1-SNAPSHOT"
  scalaBinaryVersion := "2.11" // dotty itself is only published as a
                               // 2.11 artefact currently
@smarter
Copy link
Contributor Author

smarter commented Jan 11, 2017

Fixed

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.

None yet

3 participants