Skip to content

Add forward compat tests for macros #14302

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

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@prolativ
Copy link
Contributor

For _c suffix you should specify the full version of the compiler, e.g. _c3.0.2.
Patch version is skipped only for _r, e.g. _r3.0.

@nicolasstucki nicolasstucki force-pushed the add-macro-forward-compat-tests branch from 725e71a to d4d077d Compare January 20, 2022 10:56
@nicolasstucki
Copy link
Contributor Author

tests/pos-macros/backwardCompat-3.1 is failing and I can't figure out why because the error is not shown (see #14303).

@nicolasstucki
Copy link
Contributor Author

nicolasstucki commented Jan 20, 2022

I reproduced it manually and got

error while loading Macros$,
class file out2/Macros.class is broken, reading aborted with class dotty.tools.tasty.UnpickleException
TASTy signature has wrong version.
 expected: {majorVersion: 28, minorVersion: 1}
 found   : {majorVersion: 28, minorVersion: 2 [unstable release: 1]}

This TASTy file was produced by an unstable release.
To read this TASTy file, your tooling must be at the same version.
The TASTy file was produced by Scala 3.1.2-RC1-bin-SNAPSHOT-nonbootstrapped-git-c3eaadd.

Minimized in #14306

@nicolasstucki nicolasstucki marked this pull request as ready for review January 21, 2022 09:15
Copy link
Contributor

@prolativ prolativ left a comment

Choose a reason for hiding this comment

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

LGTM in general but shouldn't we actually swap the naming of forward/backward-compat tests? Generally when we test forward binary/TASTy compatibility we should check that the compilation output from a newer compiler can be consumed by an older compiler (which is the case if we add no compiler version suffix to the first file but we specify the older compiler for the second file)

@nicolasstucki nicolasstucki merged commit 50970c1 into scala:master Jan 26, 2022
@nicolasstucki nicolasstucki deleted the add-macro-forward-compat-tests branch January 26, 2022 12:04
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.

2 participants