-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Fix to give back error when path not found #194
Conversation
**What this PR does / why we need it**: Currently it panics if you give non-existence yaml-path to Event watcher. This is happing due to go-yaml's issue. So I sent a PR to fix them: goccy/go-yaml#194 Until merging it, I just settled on parsing an AST node ourselves as a workaround. **Which issue(s) this PR fixes**: Fixes #1470 **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. --> ```release-note NONE ``` This PR was merged by Kapetanios.
Thank you for the great PR ( and Issue ) ! Only one point, the error list is written here, can you add an error like |
Thank you for the quick response. Okay, let me do so. |
Codecov Report
@@ Coverage Diff @@
## master #194 +/- ##
=======================================
Coverage 76.20% 76.20%
=======================================
Files 11 11
Lines 2937 2937
=======================================
Hits 2238 2238
Misses 468 468
Partials 231 231 |
@goccy I addressed it. PTAL 😄 |
Thank you for the contribution ! I will merge it ! |
**What this PR does / why we need it**: Since goccy/go-yaml#194 has been merged and released, we can close #1531. Besides, goccy/go-yaml#196 is soon-to-be-released, hence we can also close #1530. **Which issue(s) this PR fixes**: **Does this PR introduce a user-facing change?**: <!-- If no, just write "NONE" in the release-note block below. --> ```release-note NONE ``` This PR was merged by Kapetanios.
Fixes #193
This is happening because
Path.Read()
assumes it's going to have a non-nil Node if no error returned. But it could give back a nil Node even if no error was given.I little poked around the codebase and most of the callers of
Path.FilterFile()
assume the same does.It would be great if you could give me any feedback.