Skip to content

Fix compileStdLib test #1872

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

Merged
merged 1 commit into from
Jan 3, 2017

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Jan 3, 2017

The issue was that all the files stdlib files where copied in partest-generated/pos/compileStdLib directly (i.e. directories flattend). This implies that files with the same names would overwrite each other (like package.scala and Set.scala).

@nicolasstucki nicolasstucki force-pushed the fix-compileStdLib-test branch 2 times, most recently from 49376d3 to 61985a1 Compare January 3, 2017 11:00
@@ -245,7 +245,7 @@ class tests extends CompilerTest {
}


@Test def compileStdLib = compileList("compileStdLib", stdlibFiles, "-migration" :: "-Yno-inline" :: scala2mode)
@Test def compileStdLib = compileList("compileStdLib", stdlibFiles.map(_.replace("../scala-scala/src/library/", "")), "-migration" :: "-Yno-inline" :: scala2mode, Directory("../scala-scala/src/library/"))
@Test def compileMixed = compileLine(
Copy link
Contributor

Choose a reason for hiding this comment

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

This line looks a little strange, it seems the change can cancel each other? Otherwise, LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated with a less intrusive change.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've a minor question here: for other calls of compileList, we ignore the option sourceDir. It would be nice to add a comment for compileList to document the condition when this option can be ignored.

@nicolasstucki nicolasstucki force-pushed the fix-compileStdLib-test branch 2 times, most recently from 0060241 to e0e1730 Compare January 3, 2017 13:15
The issue was that all the files stdlib files where
copied in partest-generated/pos/compileStdLib direclty
(i.e. directories flattend). This implies that files with
the same names would overwrite eachother (like `package.scala` and
`Set.scala`).
@nicolasstucki nicolasstucki force-pushed the fix-compileStdLib-test branch from e0e1730 to 25d4f8e Compare January 3, 2017 13:16
@liufengyun
Copy link
Contributor

LGTM

@liufengyun liufengyun merged commit 7997ca5 into scala:master Jan 3, 2017
@liufengyun liufengyun deleted the fix-compileStdLib-test branch January 3, 2017 20:50
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