-
Notifications
You must be signed in to change notification settings - Fork 0
Feature request: YAML as compile-time only dependency #113
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 |
Sunday Feb 17, 2019 at 14:54 GMT
Originally opened as clap-rs/clap#1416
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: