Skip to content

Fix dotr/dotc scripts #1957

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 8 commits into from
Feb 10, 2017
Merged

Conversation

OlivierBlanvillain
Copy link
Contributor

This PR fixes the dotr/dotc scripts.

@felixmulder Do you have a better idea than the added line in .drone.yml? It looks a bit brutal, but this comment in Build.scala suggests that these tests need to be run in isolation.

.drone.yml Outdated
@@ -34,6 +34,7 @@ pipeline:
matrix:
TEST:
- test
- dotty-bin-tests/test
Copy link
Member

Choose a reason for hiding this comment

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

Not super-nice, but you could do ;test;dotty-bin-tests/test

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I agree with Guillaume here - no need for this to be a separate process.

@felixmulder
Copy link
Contributor

felixmulder commented Feb 7, 2017

Would you mind adding a test that verifies correct behaviour on incorrect .packages file?

I believe that if we change versions, the .packages becomes invalid. Perhaps the clean command should also delete the .packages file?

@OlivierBlanvillain
Copy link
Contributor Author

@felixmulder I know nothing of .packages, but I'm guessing this is not the "correct behaviour on incorrect .packages file":

$ bin/dotc
find: `/home/yolo/workspace/dotty/bin/../interfaces/target/dotty-interfaces-0.1.1-SNAPSHOT.jar': No such file or directory
find: `/home/yolo/workspace/dotty/compiler/target/scala-2.11/dotty-compiler_2.11-0.1.1-SNAPSHOT.jar': No such file or directory
find: `/home/yolo/workspace/dotty/bin/../library/target/scala-2.11/dotty-library_2.11-0.1.1-SNAPSHOT.jar': No such file or directory
find: `/home/yolo/workspace/dotty/library/target/scala-2.11/dotty-library_2.11-0.1.1-SNAPSHOT-tests.jar': No such file or directory
Error: Could not find or load main class dotty.tools.dotc.Main

@felixmulder
Copy link
Contributor

So the scripts create a file called .packages in the root of the project with a format that the scripts read. If you delete the .packages file and re-run the script, it should create a valid one.

@OlivierBlanvillain
Copy link
Contributor Author

@felixmulder something like this: ca6563a?

Copy link
Contributor

@felixmulder felixmulder left a comment

Choose a reason for hiding this comment

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

I would rather it intentionally corrupted the packages file so we can check that the find commands don't fail.

Would you mind working that into the test?

@felixmulder
Copy link
Contributor

One option would be to screw with the version numbers in the packages file.

@OlivierBlanvillain
Copy link
Contributor Author

I manually corrupted the file with sed -i s/olivier/yolo/g .packages and the script failed (this was #1957 (comment))

@OlivierBlanvillain
Copy link
Contributor Author

@felixmulder ec1011a handls .package corruption

Copy link
Contributor

@felixmulder felixmulder left a comment

Choose a reason for hiding this comment

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

Very nice! @liufengyun - do you want to add your fixes to $HOME before we merge this?

@liufengyun
Copy link
Contributor

liufengyun commented Feb 10, 2017

@felixmulder : Sure, I think it's better to have that change in:

+      - ln -s /var/cache/drone/ivy2 $HOME/.ivy2
        - ./scripts/update-scala-library
-      - sbt -J-Xmx4096m -J-XX:ReservedCodeCacheSize=512m -J-XX:MaxMetaspaceSize=1024m -Ddotty.drone.mem=4096m -ivy /var/cache/drone/ivy2 "${TEST}"
+      - sbt -J-Xmx4096m -J-XX:ReservedCodeCacheSize=512m -J-XX:MaxMetaspaceSize=1024m -Ddotty.drone.mem=4096m "${TEST}"

@OlivierBlanvillain could you please add that?

Copy link
Contributor

@felixmulder felixmulder left a comment

Choose a reason for hiding this comment

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

The .drone.yml file needs to be signed using drone sign lampepfl/dotty on any changes

@OlivierBlanvillain
Copy link
Contributor Author

$ drone sign lampepfl/dotty
Error: you must provide the Drone server address.
$ export DRONE_SERVER=dotty-ci.epfl.ch
$ drone sign lampepfl/dotty
Error: you must provide your Drone access token.

@felixmulder felixmulder merged commit b5a9c8c into scala:master Feb 10, 2017
@felixmulder felixmulder deleted the fix-dotc-dotr-scripts branch February 10, 2017 16:51
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.

4 participants