google / google/pdl

Use relative file path in `pdl` proc macro attribute

Open
#63 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.