-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Macro in path attribute on module results in file not found error #48250
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
Comments
There is a new RFC that aims to provide a way to solve this issue: rust-lang/rfcs#2320. |
@pietroalbini can you clarify how #2320 addresses this issue? Would built-in attributes such as |
@durka it doesn't directly mention it, but it provides the tools to implement it. |
It would be cleaner to yield the compiled files OUT_DIR, but that gets ugly very fast because of rust-lang/rust#48250.
It would be cleaner to yield the compiled files OUT_DIR, but that gets ugly very fast because of rust-lang/rust#48250.
It would be cleaner to yield the compiled files OUT_DIR, but that gets ugly very fast because of rust-lang/rust#48250.
It would be cleaner to yield the compiled files OUT_DIR, but that gets ugly very fast because of rust-lang/rust#48250.
It would be cleaner to yield the compiled files OUT_DIR, but that gets ugly very fast because of rust-lang/rust#48250.
I believe this should be closed now. The diagnostic issue was fixed in #88680, which also added a suitable test. For the feature request of actually making this work there's #87681. |
When using a build script to generate code I tried to include it in a submodule in the following way:
However this results in
error[E0583]: file not found for module generated
. The error does not display the actual path it tried to access.The closes related issue I could find are #18849 and rust-lang/rfcs#1516 (related rust-lang/cargo#824). However all of these talk about the compile error being a parse error, while I'm getting an error about file not being found.
For reference, here's the build script: (abridged, I apologize if this doesn't compile but you get the idea)
The
include!
macro works mostly but has one annoying problem that top-level inner attributes causes a compile error: #18810The unexpected and reason why I don't think this is a duplicate issue is that the compile error has changed. From the error rust reports it appears I've made a simple typo in the
path
when in fact this feature is simply not supported.The text was updated successfully, but these errors were encountered: