-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feature request: YAML as compile-time only dependency #1416
Comments
I was also thinking along these lines, but after reading Specifying Dependencies -> Build dependencies, don't they only apply to |
@Kage-Yami is right here, |
We can actually make a proc-macro that parses |
The main concern with a proc-macro that parser Can we use serde to change something about how we can load the yml during compile time? NOTE: I looked at the related code, and it looks like current yaml is a run time dependency because it's loading yaml from the |
We can't exactly point there indeed, just because files included via |
Yeah, but can we create a span with the line, column info? That would make the error reporting easy |
We can't create a span with a custom line/column info since the only ways are Could you explain what you expect from such API? The error cannot be rendered for files that are not part of a crate. |
I wanted to make up Span. For files that can not be token streams, but we still want to parse, I wanted to make up Span when I get error and let So, I looked into it and proc_macro2 stores the source map locally and thus we can't fool it by making up |
Is |
@pickfire Nope, since yaml loader is not |
See #3087. I expect any effort in this direction would be in an independent crate. |
I think that the YAML dependency could be a compile-time only dependency. That would be the best of both world IMO - keep the source neat and tidy, no need for runtime parsing of the parser, and no runtime YAML dependency!
build-scripts
code generation / build-dependencies
The text was updated successfully, but these errors were encountered: