Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow macro annotations to recover from suspension #21969

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

hamzaremmal
Copy link
Member

This changes makes the execution of the test case in #20353 stable across different run

@hamzaremmal
Copy link
Member Author

When using the example in #20353, without the proposed fix, the compiler won't crash with the proposed fix here:

compiling suspended tests/pos-macros/i20353/Test_2.scala
  tests/pos-macros/i20353/Test_2.scala at inlining: suspension triggered by macro call to method $anonfun in class OuterClass in tests/pos-macros/i20353/Test_2.scala, suspension triggered by macro call to method makeImplicitValue in object ImplicitValue in tests/pos-macros/i20353/Macro_1.scala
Cyclic macro dependencies in tests/pos-macros/i20353/Test_2.scala.
Compilation stopped since no further progress can be made.

To fix this, place macros in one set of files and their callers in another.
1 error found

@hamzaremmal hamzaremmal merged commit 8dd7187 into scala:main Nov 19, 2024
26 checks passed
@hamzaremmal hamzaremmal deleted the hr/recover-from-suspension branch November 19, 2024 03:59
@WojciechMazur WojciechMazur added this to the 3.6.3 milestone Nov 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants