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 path information to parse errors originating from included files. #815

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

squell
Copy link
Member

@squell squell commented Jan 10, 2024

Closing #806

@squell squell linked an issue Jan 10, 2024 that may be closed by this pull request
@squell squell force-pushed the improve-diagnostic branch from 8cf284a to 7fcc153 Compare January 11, 2024 11:59
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 31 lines in your changes are missing coverage. Please review.

Comparison is base (2fa9234) 57.36% compared to head (a392c00) 57.27%.
Report is 2 commits behind head on main.

Files Patch % Lines
src/sudoers/mod.rs 39.47% 23 Missing ⚠️
src/sudo/mod.rs 0.00% 6 Missing ⚠️
src/visudo/mod.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #815      +/-   ##
==========================================
- Coverage   57.36%   57.27%   -0.10%     
==========================================
  Files          74       74              
  Lines       10559    10583      +24     
==========================================
+ Hits         6057     6061       +4     
- Misses       4502     4522      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@squell squell force-pushed the improve-diagnostic branch from 7fcc153 to a392c00 Compare January 11, 2024 12:06
@squell squell marked this pull request as ready for review January 11, 2024 12:06
@squell
Copy link
Member Author

squell commented Jan 11, 2024

Note: there are still a few places where we don't provide "location information" (i.e. semantic errors, that pop up during semantic analysis). Providing those would require adding positional information to the AST in a few place. We could do that, but that should be a separate issue.

Copy link
Collaborator

@japaric japaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes look good to me. it would be nice to have an e2e-test that checks that the error message does contain the expected information (file location)

@squell squell mentioned this pull request Feb 3, 2024
@rnijveld rnijveld added this pull request to the merge queue Feb 4, 2024
Merged via the queue into main with commit c136211 Feb 4, 2024
15 checks passed
@rnijveld
Copy link
Collaborator

rnijveld commented Feb 4, 2024

I've added an issue (#827) to add the tests later

@japaric japaric deleted the improve-diagnostic branch February 26, 2024 17:03
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.

unexpected error with sudo-rs with rust-coreutils on debian
3 participants