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

refactor: make source generic #1352

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

baszalmstra
Copy link
Contributor

This refactors parsing code slightly to accept a generic SourceCode. This allows for the propagation of source code information from the input to errors and diagnostics. Miette provides source code information in the errors. However, the input for any parsing function is always &str which doesn't provide any information about the input file. This refactor changes that type to SourceCode.

This is especially useful in pixi-build where we can use that information to provide more contextual errors. It should not change anything for the rattler-build CLI besides that the error will indicate the filename (recipe.yaml).

@baszalmstra baszalmstra requested a review from wolfv January 18, 2025 22:59
@wolfv wolfv merged commit 7eaf988 into prefix-dev:main Jan 20, 2025
15 checks passed
@wolfv
Copy link
Member

wolfv commented Jan 20, 2025

Awesome, thanks 👍 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants