Skip to content

Add test of pickling positions under -Ytest-pickler #1541

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

Conversation

OlivierBlanvillain
Copy link
Contributor

@OlivierBlanvillain OlivierBlanvillain commented Sep 27, 2016

This PR adds a test under -Ytest-pickler to verify that Position#start and Position#end are identical before and after pickling. Position#point is ignored as it's not pickled.

@smarter could you have a look?

@smarter
Copy link
Member

smarter commented Sep 27, 2016

/rebuild

1 similar comment
@smarter
Copy link
Member

smarter commented Sep 28, 2016

/rebuild

@smarter
Copy link
Member

smarter commented Sep 28, 2016

@SethTisue : All of our recent PRs are failing in Jenkins with:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: download failed: org.scala-sbt#main;0.13.11!main.jar
download failed: org.scala-sbt#actions;0.13.11!actions.jar
download failed: org.scala-sbt#io;0.13.11!io.jar
download failed: org.scala-sbt#completion;0.13.11!completion.jar
download failed: org.scala-sbt#collections;0.13.11!collections.jar
download failed: org.scala-sbt#api;0.13.11!api.jar
download failed: org.scala-sbt#incremental-compiler;0.13.11!incremental-compiler.jar
download failed: org.scala-sbt#compile;0.13.11!compile.jar
download failed: org.scala-sbt#ivy;0.13.11!ivy.jar
download failed: org.scala-sbt#main-settings;0.13.11!main-settings.jar
download failed: org.scala-sbt#command;0.13.11!command.jar
download failed: org.scala-sbt#compiler-interface;0.13.11!compiler-interface.jar

Any idea what's going on?

@SethTisue
Copy link
Member

@smarter I saw some errors like that in some Scala builds yesterday too, but they stopped — probably some transient problem with bintray? if rebuilding today doesn't make them go away, let me know

@smarter
Copy link
Member

smarter commented Sep 28, 2016

/rebuild

@smarter
Copy link
Member

smarter commented Sep 28, 2016

@SethTisue
Copy link
Member

@eed3si9n these are sbt jars on repo.typesafe.com. do we want to report this somewhere, either within Lightbend, or to Bintray?

@SethTisue
Copy link
Member

@smarter
Copy link
Member

smarter commented Sep 28, 2016

[warn]  [FAILED     ] org.scala-sbt#compiler-interface;0.13.11!compiler-interface.jar:
The HTTP response code for https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.11/jars/compiler-interface.jar
did not indicate a success. See log for more detail. (648ms)

And yet this works locally:

% wget https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.11/jars/compiler-interface.jar
--2016-09-28 17:21:29--  https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.11/jars/compiler-interface.jar
Resolving repo.typesafe.com (repo.typesafe.com)... 52.203.61.63, 54.165.237.90
Connecting to repo.typesafe.com (repo.typesafe.com)|52.203.61.63|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.11/jars/compiler-interface.jar [following]
--2016-09-28 17:21:30--  https://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.11/jars/compiler-interface.jar
Resolving dl.bintray.com (dl.bintray.com)... 5.153.35.248
Connecting to dl.bintray.com (dl.bintray.com)|5.153.35.248|:443... connected.
HTTP request sent, awaiting response... 302 
Location: https://akamai.bintray.com/9a/9aac6cd27c09179722d2b8c680cff03da1754c8ed0d96d7778c4f0c64cfc470f?__gda__=exp=1475076811~hmac=0f39fe43c92c3f0915cfb9c4741f9819131f2b71131009adba22ef111bc4772e&response-content-disposition=attachment%3Bfilename%3D%22compiler-interface.jar%22&response-content-type=application%2Fjava-archive&requestInfo=U2FsdGVkX19nGVdF15P4uKviB5l_MHrcI5HCKRixmgV35Bqc317SAf1Yp8nOWrZfKfZkHzFyxjxek4E_bu3bwvle_IsidSWTwwnwxrNrpxOE7fOarQy5iM4x1yw4EyG9wR5gU9n5faNfQTjKVf0BF4DOvQ9yXJCcEJr45vH3jXU [following]
--2016-09-28 17:21:31--  https://akamai.bintray.com/9a/9aac6cd27c09179722d2b8c680cff03da1754c8ed0d96d7778c4f0c64cfc470f?__gda__=exp=1475076811~hmac=0f39fe43c92c3f0915cfb9c4741f9819131f2b71131009adba22ef111bc4772e&response-content-disposition=attachment%3Bfilename%3D%22compiler-interface.jar%22&response-content-type=application%2Fjava-archive&requestInfo=U2FsdGVkX19nGVdF15P4uKviB5l_MHrcI5HCKRixmgV35Bqc317SAf1Yp8nOWrZfKfZkHzFyxjxek4E_bu3bwvle_IsidSWTwwnwxrNrpxOE7fOarQy5iM4x1yw4EyG9wR5gU9n5faNfQTjKVf0BF4DOvQ9yXJCcEJr45vH3jXU
Resolving akamai.bintray.com (akamai.bintray.com)... 104.99.161.109
Connecting to akamai.bintray.com (akamai.bintray.com)|104.99.161.109|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 250237 (244K) [application/java-archive]
Saving to: ‘compiler-interface.jar’

compiler-interface.jar                                100%[======================================================================================================================>] 244,37K  --.-KB/s    in 0,1s    

2016-09-28 17:21:31 (2,02 MB/s) - ‘compiler-interface.jar’ saved [250237/250237]

I wish I knew where these mysterious logs containing "more details" that the error message refers to were so that I could look at them.

@smarter
Copy link
Member

smarter commented Sep 28, 2016

@SethTisue Can you ssh on the machine and wget a jar from the repo?

@smarter
Copy link
Member

smarter commented Sep 28, 2016

Looks like https://scala-ci.typesafe.com/job/dotty-master-validate-junit/2194/console managed to download everything so the issue may be hard to reproduce

@eed3si9n
Copy link
Member

@SethTisue I've been noticing Travis is having problem getting sbt artifacts too. I opened sbt/sbt#2758 to track this.

@OlivierBlanvillain
Copy link
Contributor Author

/rebuild

@smarter
Copy link
Member

smarter commented Oct 4, 2016

This should be rebased on top of #1492 which contains a fix for positions: 333ec27

@smarter
Copy link
Member

smarter commented Oct 6, 2016

Inline has been merged so you should be able to just rebase on master

@OlivierBlanvillain OlivierBlanvillain force-pushed the test-pickling-positions branch 2 times, most recently from ed7aeeb to 828b2c5 Compare October 7, 2016 14:50
@OlivierBlanvillain
Copy link
Contributor Author

@smarter following your suggestion I've changed what I did to instead compare pretty printer trees with positions. This revealed that many nodes are unpickled with <no position> or incorrect ones :/

@felixmulder
Copy link
Contributor

/rebuild

@OlivierBlanvillain OlivierBlanvillain deleted the test-pickling-positions branch October 12, 2016 16:17
@OlivierBlanvillain OlivierBlanvillain restored the test-pickling-positions branch October 12, 2016 16:17
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