-
Notifications
You must be signed in to change notification settings - Fork 44
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
Accessors for private members of Message
, Snippet
, and friends
#151
Comments
Our intention for annotate-snippets is that it isn't an application-level data type for diagnostics but a way to describe a printed message. That would imply that (1) and (2) would be out of scope unless something changes. As for (3), that depends on more context. |
So your suggestion would be to define my own message types (with the same information as
I have a middleware, I guess would be a good term, that adds a |
I would recommend creating your own diagnostic type that meets the needs of your application and convert that to annotate-snippet types when rendering. You may choose to provide higher level, programmatic access to the information that eventually gets rendered. Thats up to your code's needs. |
Gotcha, thanks! |
In a recent version of annotate_snippets, its developers decided to make all of the internals private. In [0], they affirmed that this was intentional and that the library isn't meant to be used as "application-level data type[s]", so here we are I guess. [0]: rust-lang/annotate-snippets-rs#151
In a recent version of annotate_snippets, its developers decided to make all of the internals private. In [0], they affirmed that this was intentional and that the library isn't meant to be used as "application-level data type[s]", so here we are I guess. [0]: rust-lang/annotate-snippets-rs#151
Hey!
I currently use annotate-snippets 0.9.1 (I'm a little behind 😅) to render messages for a markdown linting tool. The tool has a few features that depend on inspecting the contents of structs. For example, it:
Would you be open to a pull request making these fields public (possibly with a
#[non_exhaustive]
attribute on the struct for future extensions)?The text was updated successfully, but these errors were encountered: