Skip to content
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

Allow calling splices in the same project #7138

Closed
odersky opened this issue Aug 30, 2019 · 3 comments
Closed

Allow calling splices in the same project #7138

odersky opened this issue Aug 30, 2019 · 3 comments

Comments

@odersky
Copy link
Contributor

odersky commented Aug 30, 2019

Staging is hampered by the requirement that code called in a splice has to be in an upstream project. We should try to avoid that restriction.

@liufengyun
Copy link
Contributor

This may potentially kill incremental compilation for a project if it executes code defined in the same project (see #7042).

Just a reminder, not a reason to stop from doing it --- programmers just need to do a clean build when they run/package, the same as they do for macros today (there two projects are involved instead of one project).

@nicolasstucki
Copy link
Contributor

The problematic part for incremental compilation with macros is that any call to a macro needs to be recompiled if the code of the macro (or whitebox inline) or any method it calls has changed. This is clearly more complex that keeping track of signatures for for normal calls. This is the same as in Scala 2 macros.

To support macros expanding in the same project we will need to first check that all the code that a macro needs to execute does not use the macro itself. This would require some some kind of abstract interpreter or call graph analysis. The information that we would get from that analysis could fix (or improve) the incremental compilation issues as well.

@odersky
Copy link
Contributor Author

odersky commented Oct 26, 2019

This is implemented now, right? Can we close the issue?

@odersky odersky closed this as completed Oct 26, 2019
anatoliykmetyuk added a commit that referenced this issue Oct 28, 2019
Fix #7138: Suspend callers of macros compiled in the same run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants