-
Notifications
You must be signed in to change notification settings - Fork 9
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
Decouple from codemap
#7
Comments
Note that this would be a breaking change versus the current version, while a version that abstracts |
It's currently version 0.1 with 5000 total downloads. I wouldn't mind releasing 0.2 with a more flexible API rather than getting stuck with the current design for backwards compatibility. On the other thread, @stepancheg pointed out a drawback of the current API that would be solved by making each
|
Also worth considering annotate-snippets-rs (#9) before we spend too much time redesigning this. |
|
The data structure defined in the
codemap
crate isn't for everyone. This library should use traits to make it agnostic to the codemap / span implementation, and the dependency oncodemap
should be made an optional cargo feature. Looking through the source, its interaction with theCodeMap
API surface is actually pretty minimal.Prior art: The language-reporting crate defines traits for a similar purpose. I think we can go further than this by removing the
code_map
field from theEmitter
completely, and making the API deal with spans that are already decomposed intofile
,line
,column
.Something like:
The text was updated successfully, but these errors were encountered: