-
Notifications
You must be signed in to change notification settings - Fork 18
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
Simplify the project #2
Conversation
Do not add extra settings, this is not how people usually do cross-compilation, they simply use val for that.
@@ -1,2 +1,2 @@ | |||
name=Dotty Cross Compiled Project Template | |||
description=A template to demonstrate a minimal Dotty/Scala 2 cross compiled application | |||
name=Dotty Cross |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we keep a more expressive name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? As far as I can tell, this name only appears when you create the project:
sbt new lampepfl/dotty-cross.g8
A template to demonstrate a minimal Dotty/Scala 2 cross compiled
application
name [Dotty Cross Compiled Project Template]:
Template applied in ./dotty-cross-compiled-project-template
The default name being long means that the project directory ends up with a long name (and somewhat confusing: this is not a template, this is an instance of a template)
val defaultDottyVersion = "0.1.2-RC1" | ||
val defaultScala2Version = "2.12.2" | ||
|
||
val useLatestDottyNightly = settingKey[Boolean]("Use the latest Dotty nightly build.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should keep this one. it is used to test on nightly builds every day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI failed because of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This template is not an appropriate place to test nightly builds, this is not something that should be part of the build of everyone that tries to use dotty. If you really want to do so, you could inject a scalaVersion := latestDottyNightly... when running the tests.
@@ -3,8 +3,7 @@ val scala212Version = "2.12.2" | |||
|
|||
lazy val root = (project in file(".")). | |||
settings( | |||
name := "dotty-cross-template", | |||
description := "Template sbt project that is cross compiled using Dotty and Scala 2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while technically this is useless, it would be nice to provide some breadcrumbs for people who don't know sbt or g8 well to see what happens here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, but the previous description was incorrect: this is an instance of a template, not a template. I prefer to leave it empty since the user will choose his own description for his project, but if you have a better idea feel free to change it.
|
||
### Usage | ||
|
||
This is a normal sbt project, you can compile code with `sbt '+ compile'` and run it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the cross-compilation? It should be sbt +compile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When people compile/run their projects, most of the time they don't want to cross-compile, they just want to run with the main scalaVersion. This is what the instructions now say. I also added a link to the cross-compilation documentation of sbt so people know what to do when they want to cross-compile.
|
||
### Usage | ||
|
||
This is a normal sbt project, you can compile code with `sbt '+ compile'` and run it | ||
with `sbt '+ run'`, `sbt '+ console'` will start a Dotty REPL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with sbt +run
, sbt +console
No description provided.