Skip to content

Fix inline scripted #4857

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 3 commits into from
Aug 2, 2018
Merged

Fix inline scripted #4857

merged 3 commits into from
Aug 2, 2018

Conversation

allanrenucci
Copy link
Contributor

With the introduction of transparent, an implicit conversion from Double
to Int kicked in. We change the type to String to prevent this

@allanrenucci
Copy link
Contributor Author

@nicolasstucki Can you have a look. source-dependencies/value-class is failing with:

Tasty UUID (00000000-0000-0000-0000-0000049963e0) file did not correspond the tasty UUID declared in the classfile (00000000-0000-0000-0000-000003100f80).

@smarter
Copy link
Member

smarter commented Jul 28, 2018

Setting prio:blocker because this is preventing the nightly builds from being published.

@nicolasstucki
Copy link
Contributor

nicolasstucki commented Jul 29, 2018

source-dependencies/value-class/test can be minimized to

$ copy-file changes/A0.scala src/main/scala/A.scala
$ copy-file changes/B0.scala src/main/scala/B.scala
$ copy-file changes/C0.scala src/main/scala/C.scala

> compile

$ copy-file changes/A1.scala src/main/scala/A.scala

-> compile

$ copy-file changes/A0.scala src/main/scala/A.scala
$ copy-file changes/B1.scala src/main/scala/B.scala
$ copy-file changes/C1.scala src/main/scala/C.scala

> compile

The issue seems to be that in the third compile we try to load A from the classfile of the first compilation and the tasty of the second compilation. It looks like after the failure to compile in the second compile the classfile is reverted but the tasty file is kept.

@smarter where is the logic in that takes care of emitted classfiles?

With the introduction of transparent, an implicit conversion from Double
to Int kicked in. We change the type to String to prevent this
We cannot delegate to the default class file manager. In some
situations, when an incremental compilation fails, we need to restore
tasty files from previous compilation. These tasty files must be backed
up in a tmp directory which is different from the one of the default
class file manager.
@allanrenucci
Copy link
Contributor Author

Scripted tests pass at http://dotty-ci.epfl.ch/lampepfl/dotty/6640

The change to the class file manager seems to cause over compilation in
some cases.

It is better than having tasty files and class files out of sync
@allanrenucci
Copy link
Contributor Author

I'll look into the newly failing test source-dependencies/restore-classes. But I think we can merge this to unblock nightly releases

@nicolasstucki nicolasstucki merged commit 38c066f into scala:master Aug 2, 2018
@Blaisorblade Blaisorblade deleted the fix-scripted branch August 2, 2018 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants