-
Notifications
You must be signed in to change notification settings - Fork 78
Revert "Revert "Fix syntax and semantic error detection in yaml_edit. (#2284)"" #2299
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
base: main
Are you sure you want to change the base?
Conversation
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request reverts a previous revert, re-introducing a fix for syntax and semantic error detection in yaml_edit. The changes in _performEdit are a significant improvement. The previous implementation had several issues: it mutated the editor's state before validation, didn't correctly handle parsing errors for invalid YAML modifications, and failed to update alias tracking information after a change. The new implementation fixes all these issues by using a temporary variable for the updated YAML, validating both syntax and semantic correctness within try-catch blocks, and only updating the internal state after all checks have passed. This makes the editing process much more robust and reliable. The code is clean, well-commented, and follows Dart best practices. The change looks great.
PR HealthLicense Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with Breaking changes ✔️
This check can be disabled by tagging the PR with Coverage ✔️
This check for test coverage is informational (issues shown here will not fail the PR). This check can be disabled by tagging the PR with Changelog Entry ❗
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with |
Reverts #2295 which reverted #2284
Before we can land this we need to fix/disable/skip the test in analysis_server that this caused when rolling into Dart SDK, see #2289
test logs