Skip to content

Rewrite Build.scala for readability #968

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
wants to merge 3 commits into from

Conversation

hubertp
Copy link

@hubertp hubertp commented Nov 22, 2015

No description provided.

val dottyJars = Seq("dotty.jar",
(packageBin in Compile).value.getAbsolutePath) ++
getJarPaths(partestDeps.value, ivyPaths.value.ivyHome) ++
Seq("dotty.jar")
Copy link
Member

Choose a reason for hiding this comment

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

Looks like you have "dotty.jar" twice in dottyJars

@hubertp hubertp force-pushed the feature/project-cleanups branch from b08c3d9 to 8d48ef2 Compare November 24, 2015 23:45
@hubertp
Copy link
Author

hubertp commented Nov 24, 2015

@smarter I must have pushed the outdated stuff. Thanks for comments. Corrected now.

@smarter
Copy link
Member

smarter commented Nov 25, 2015

/rebuild

@hubertp
Copy link
Author

hubertp commented Nov 26, 2015

I will take it offliine. I seem to be getting compilation errors with scala stdlib (scala-scala?). Sorry for the fuss. I'm rewriting large parts of test-suite so that we can reduce the amount of output in a more convenient way.

@smarter
Copy link
Member

smarter commented Nov 26, 2015

I seem to be getting compilation errors with scala stdlib (scala-scala?

scala-scala is setup like this (from https://github.com/lampepfl/dotty/wiki/Getting-Started):

git clone -b dotty-library [email protected]:DarkDimius/scala.git scala-scala

No idea where your compilation errors come from.

@hubertp hubertp force-pushed the feature/project-cleanups branch from 8d48ef2 to 9fe459a Compare November 26, 2015 23:07
@hubertp
Copy link
Author

hubertp commented Nov 26, 2015

My fork wasn't in sync, rebase helped.

@smarter
Copy link
Member

smarter commented Nov 27, 2015

LGTM.

"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.scala-lang" % "scala-library" % scalaVersion.value % "test"),
partestDeps :=
Seq("me.d-d" % "scala-compiler" % scalaCompilerVersion,
Copy link
Contributor

Choose a reason for hiding this comment

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

bin/dotc script currenlty detect versions of dependencies by looking for the line containing scala-compiler and looking for the last string constant on this line.

Either scalaCompilerVersion needs to be inlined here, or bin/dotc script needs to be changed.

@hubertp
Copy link
Author

hubertp commented Dec 13, 2015

@DarkDimius thanks.

@@ -20,7 +20,7 @@ function getLastStringOnLineWith {
# Configuration
SCALA_VERSION=$(getLastStringOnLineWith "scalaVersion in")
SCALA_BINARY_VERSION=2.11
SCALA_COMPILER_VERSION=$(getLastStringOnLineWith "scala-compiler")
SCALA_COMPILER_VERSION=$(getLastStringOnLineWith "scalaCompilerVersion")
Copy link
Member

Choose a reason for hiding this comment

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

This now returns two lines:

$ grep "scalaCompilerVersion" "project/Build.scala"|sed -n 's/.*\"\(.*\)\".*/\1/'p
2.11.5-20151022-113908-7fb0e653fd
scala-compiler

You can avoid this by doing getLastStringOnLineWith "def scalaCompilerVersion", optionally, you could also change the definition of getLastStringOnLineWith so that it only returns one line:

grep "$PATTERN" "$DOTTY_ROOT/project/Build.scala"|sed -n 's/.*\"\(.*\)\".*/\1/'p|head -n1

@odersky
Copy link
Contributor

odersky commented May 18, 2016

Delta got too large to merge with confidence now.

@odersky odersky closed this May 18, 2016
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.

5 participants