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

Simplify the project #2

Merged
merged 7 commits into from
May 31, 2017
Merged

Simplify the project #2

merged 7 commits into from
May 31, 2017

Conversation

smarter
Copy link
Member

@smarter smarter commented May 31, 2017

No description provided.

Do not add extra settings, this is not how people usually do
cross-compilation, they simply use val for that.
@smarter smarter requested a review from nicolasstucki May 31, 2017 12:10
@@ -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
Copy link

@DarkDimius DarkDimius May 31, 2017

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

We should

Copy link
Member Author

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.")
Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Member Author

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",

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.

Copy link
Member Author

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
Copy link
Contributor

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

Copy link
Member Author

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.
Copy link
Contributor

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

@nicolasstucki nicolasstucki merged commit de59ac3 into scala:master May 31, 2017
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.

3 participants