-
Notifications
You must be signed in to change notification settings - Fork 0
Fix: Resolve YAML include paths relative to parent file instead of CWD #112
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
Closed
Closed
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f7298e0
Initial plan
Copilot d9b07a4
Implement relative path resolution for YAML includes
Copilot fece575
Update test YAML files to use correct relative paths
Copilot 80f820f
Fix error message formatting consistency
Copilot 036d62e
Task completed: YAML include path resolution fix
Copilot d8157aa
Fix test YAML files in tests/src/assets directory
Copilot 8da72d3
Fix memory leak in ut_kvp_openMemory
Copilot 52fcd01
Fix heap-buffer-overflow in ut_kvp_openMemory
Copilot c5bb4a9
Revert test YAML files in include/ to use CWD-relative paths
Copilot 0013261
Revert test YAML files to use parent-relative paths
Copilot 9917bd7
Rename parent_dir to base_dir for clarity throughout
Copilot f1441cc
Add base_dir parameter to ut_kvp_openMemory() for include resolution
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| --- | ||
| "2": | ||
| value: true | ||
| include: assets/include/3d.yaml | ||
| include: 3d.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| --- | ||
| "3": | ||
| value: true | ||
| include: assets/include/4d.yaml | ||
| include: 4d.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| --- | ||
| "4": | ||
| value: true | ||
| include: assets/include/5d.yaml | ||
| include: 5d.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| --- | ||
| "1": | ||
| value: true | ||
| include: assets/include/2d.yaml | ||
| include: 2d.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,23 @@ | ||
| --- | ||
| "1": | ||
| value: true | ||
| include_0: assets/include/2s.yaml | ||
| include_1: assets/include/3s.yaml | ||
| include_2: assets/include/4s.yaml | ||
| include_3: assets/include/5s.yaml | ||
| include_4: assets/include/6s.yaml | ||
| include_5: assets/include/7s.yaml | ||
| include_6: assets/include/8s.yaml | ||
| include_7: assets/include/9s.yaml | ||
| include_8: assets/include/10s.yaml | ||
| include_9: assets/include/11s.yaml | ||
| include_10: assets/include/12s.yaml | ||
| include_11: assets/include/13s.yaml | ||
| include_12: assets/include/14s.yaml | ||
| include_13: assets/include/15s.yaml | ||
| include_14: assets/include/16s.yaml | ||
| include_15: assets/include/17s.yaml | ||
| include_16: assets/include/18s.yaml | ||
| include_17: assets/include/19s.yaml | ||
| include_18: assets/include/20s.yaml | ||
| include_19: assets/include/21s.yaml | ||
| include_0: 2s.yaml | ||
| include_1: 3s.yaml | ||
| include_2: 4s.yaml | ||
| include_3: 5s.yaml | ||
| include_4: 6s.yaml | ||
| include_5: 7s.yaml | ||
| include_6: 8s.yaml | ||
| include_7: 9s.yaml | ||
| include_8: 10s.yaml | ||
| include_9: 11s.yaml | ||
| include_10: 12s.yaml | ||
| include_11: 13s.yaml | ||
| include_12: 14s.yaml | ||
| include_13: 15s.yaml | ||
| include_14: 16s.yaml | ||
| include_15: 17s.yaml | ||
| include_16: 18s.yaml | ||
| include_17: 19s.yaml | ||
| include_18: 20s.yaml | ||
| include_19: 21s.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| # A single scalar value included from an external source | ||
| configItem: | ||
| value: !include assets/include/2s.yaml | ||
| value: !include include/2s.yaml | ||
|
|
||
| # A list of values, each included from a separate external source | ||
| listConfig: | ||
| valueList: | ||
| - !include assets/include/3s.yaml | ||
| - !include assets/include/4s.yaml | ||
| - !include include/3s.yaml | ||
| - !include include/4s.yaml |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
why is include directory added here? @copilot
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.
@copilot please check this review comment.
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.
The
includedirectory is added because with the new relative path resolution, paths are resolved relative to the parent YAML file's location. Sinceyaml_tags.yamlis intests/src/assets/, and the included files are in the subdirectorytests/src/assets/include/, the correct relative path isinclude/2s.yaml. The old pathassets/include/2s.yamlwas relative to CWD, which is now deprecated.