-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Move all macro tests to macro test folders #17990
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
Why is that? Having to bootstrap the compiler just to understand and fix a macro bug seems like needless overhead. |
Tests with macros can be problematic when re-bootstraping on a new minor version. In those situations, the TASTy generated in the Now, the tests that I moved happen not to be problematic, but they incite contributors to add macro tests in |
We should only execute macro tests on the bootstrap compiler.
a731660
to
e6e1401
Compare
It doesn't sound like something that is outside the realm of things a "Scala release manager" should be ready to handle. Now, everything we can do to help that situation is great. But let's try something that makes both things work. Can we not have these tests in a place, maybe even neg-macro/etc works, with a one-liner that you can comment out / comment in to affect if it's only run in bootstrapped or not. With the hope/ideal that the commented code would be discoverable when the bootstrap issue occurs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
A secondary reason to move these tests is to be able to tests all macro related tests using |
I did not understand the idea. Could you elaborate? |
Vulpix understands pragmas, e.g., It would be nice for the framework to enforce macro tests reside in the desired dirs, too. |
For example: move all the macro tests from |
The point is that we should never tests macros on non bootstrapped compiler. Commenting out I also remembered that there are other situations where the non-bootstrapped version of the compiler can lead into issues with macros. One of them is as simple as fixing or changing the behavior of a method in the stdlib. This one is much trickier for contributors to pinpoint. |
Why?
If my understanding is correct, the change is in how the scala3-compiler code is compiled that's different: with non-bootstrapped the file Tuple.scala, for example, is compiled with the reference compiler and that bytecode+tasty is present during non-boostrap test compilation. It's annoying to deal and think about these subtleties, but it's also annoying to have a test feedback loop be ~twice as long. But you're at the frontier of that battle, so your preference should rule. |
Backports #17990 to the LTS branch. PR submitted by the release tooling. [skip ci]
We should only execute macro tests on the bootstrap compiler.
Also, remove
scala.quoted
imports in tests that do not use it, such asinline
tests.