Use relative file path in `pdl` proc macro attribute
Open
- Dominant language
- Rust
- Stars
- 86
- Forks
- 18
- Avg merge
- 20h 49m
- Merged PRs (30d)
- 1
Description
The API `Span::source_file` is currently nightly (https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.source_file), and there is no alternate way to get the path to the file a proc macro attribute runs on.
This means the `pdl` proc_macro attribute cannot use a relative file path similarly to `include_str!`.
This should be updated when the API becomes stable.
Contributor guide
Assessment
This issue has not been assessed yet.