Skip to content
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

Add location metadata to Element API #898

Open
desaikd opened this issue Jan 17, 2025 · 0 comments
Open

Add location metadata to Element API #898

desaikd opened this issue Jan 17, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@desaikd
Copy link
Contributor

desaikd commented Jan 17, 2025

Purpose:

Customers that use Ion Rust’s Element API to manipulate Ion data can benefit from having more precise row-column information regarding the element. This helps identify the exact place of the element and can be useful for error messaging as well as debugging.
Some general usecases:

  • Within ion-schema-rust library for better violation message with location to the Element that generated error in validation and to the schema constraint that was violated.
  • Use with ion-cli for schema related subcommands as well as for code generation.

Implementation:

Requires a change in the TextBuffer to have properties for row and column data based on offset and whitespace. This then can be pulled to higher abstraction layers like LazyValue and eventually to Element API. This might require a cargo flag for people to opt-in to this feature.

@desaikd desaikd added the enhancement New feature or request label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant