-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support paths relative to the current file in query_file!()
#11
Comments
You can also make it work on nightly by using That still can't support stable, but atleast it doesn't require all transitive reverse dependencies to build with It doesn't seem nice to introduce behavioural differences in the same macro between stable and nightly though. If it's important enough, it might be better to add the functionality to a separate macro only available on nightly, possibly with a feature. |
The current paths are at least cargo workspace relative.. for me, that's good enough to not want to do anything until we can do it properly. |
It looks like we can support this soon once rust-lang/rust#69041 lands |
That doesn't give us a stable way to get the path still. |
This doesn't seem like its going to happen in Rust in the near future so I'm going to mark this postponed and close. We just need to make sure our work-arounds are well documented and we're fine I think. |
This would require
proc_macro::SourceFile
to be stabilized (or a similar API): rust-lang/rust#54725Probably would require fixing rust-lang/rust#62892
We could make it work on nightly using
--cfg procmacro2_semver_exempt
but that's a half-measure.The text was updated successfully, but these errors were encountered: