-
Notifications
You must be signed in to change notification settings - Fork 39
Fix wrongly identified circular dependencies #2113
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
Draft
harrysarson
wants to merge
4
commits into
apache:master
Choose a base branch
from
harrysarson:harry/loader-bugs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f87dc2d
Adapt override-self test to show a nested-link bug
harrysarson b77c859
Still ensure fully loaded if reference is via link
harrysarson 17a9b3d
Include from nested junction in include-complex
harrysarson 98833a0
add fix for crash on project load bug
harrysarson 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
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -593,10 +593,17 @@ def test_override_twice(cli, tmpdir, datafiles): | |||||
| @pytest.mark.parametrize( | ||||||
| "target,expected_result", | ||||||
| [ | ||||||
| ("target.bst", "pony"), | ||||||
| ("self-junction.bst:target.bst", "horsy"), | ||||||
| ("subproject.bst:target.bst", "pony"), | ||||||
| ("subproject.bst:self-junction.bst:target.bst", "horsy"), | ||||||
| ("link.bst", "pony"), | ||||||
| ("nested-link.bst", "horsy"), | ||||||
| ], | ||||||
| ids=[ | ||||||
| "direct-target", | ||||||
| "override-target", | ||||||
| "link-target", | ||||||
| "link-override-target", | ||||||
| ], | ||||||
| ids=["direct-target", "override-target"], | ||||||
| ) | ||||||
| def test_override_self(cli, datafiles, target, expected_result): | ||||||
| project = os.path.join(str(datafiles), "override-self") | ||||||
|
|
@@ -922,7 +929,7 @@ def test_include_vars_optional(cli, datafiles, use_species, expected_result): | |||||
| @pytest.mark.datafiles(DATA_DIR) | ||||||
| @pytest.mark.parametrize( | ||||||
| "target", | ||||||
| ["target.bst", "subproject.bst:target.bst"], | ||||||
| ["target.bst", "subproject.bst:target.bst", "intermediate-project.bst:subproject.bst:target.bst"], | ||||||
| ids=["toplevel-target", "subproject-target"], | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New ID is missing, blocking pytest.
Suggested change
|
||||||
| ) | ||||||
| @pytest.mark.parametrize( | ||||||
|
|
||||||
1 change: 1 addition & 0 deletions
1
tests/format/junctions/include-complex/alternative-placeholder.bst
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 @@ | ||
| kind: stack |
12 changes: 12 additions & 0 deletions
12
tests/format/junctions/include-complex/intermediate-project.bst
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,12 @@ | ||
| kind: junction | ||
|
|
||
| sources: | ||
| - kind: local | ||
| path: intermediate-project | ||
|
|
||
| config: | ||
| overrides: | ||
| subproject.bst:placeholder.bst: alternative-placeholder.bst | ||
|
|
||
| options: | ||
| animal: '%{animal}' |
15 changes: 15 additions & 0 deletions
15
tests/format/junctions/include-complex/intermediate-project/project.conf
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,15 @@ | ||
| name: intermediate-project | ||
| min-version: 2.0 | ||
|
|
||
| (@): | ||
| - subproject.bst:include.yml | ||
|
|
||
| options: | ||
| animal: | ||
| type: enum | ||
| description: the animal | ||
| values: | ||
| - pony | ||
| - horsy | ||
| default: pony | ||
| variable: animal |
9 changes: 9 additions & 0 deletions
9
tests/format/junctions/include-complex/intermediate-project/subproject.bst
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,9 @@ | ||
| kind: junction | ||
| sources: | ||
| - kind: local | ||
| path: subproject | ||
|
|
||
| config: | ||
|
|
||
| options: | ||
| target_animal: '%{animal}' |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
tests/format/junctions/include-complex/intermediate-project/subproject/placeholder.bst
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 @@ | ||
| kind: stack |
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 |
|---|---|---|
|
|
@@ -9,3 +9,4 @@ options: | |
| - pony | ||
| - horsy | ||
| default: pony | ||
| variable: target_animal | ||
File renamed without changes.
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,8 +1,4 @@ | ||
| kind: junction | ||
| sources: | ||
| - kind: local | ||
| path: subproject | ||
| kind: link | ||
|
|
||
| config: | ||
| options: | ||
| target_animal: '%{animal}' | ||
| target: intermediate-project.bst:subproject.bst |
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,4 @@ | ||
| kind: link | ||
|
|
||
| config: | ||
| target: subproject.bst:target.bst |
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,4 @@ | ||
| kind: link | ||
|
|
||
| config: | ||
| target: subproject.bst:self-junction.bst:target.bst |
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,6 +1,6 @@ | ||
| name: test | ||
| min-version: 2.0 | ||
|
|
||
| junctions: | ||
| internal: | ||
| - self-junction.bst | ||
|
|
||
| (@): | ||
| - subproject.bst:self-junction.bst:include.yml |
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,4 @@ | ||
| kind: junction | ||
| sources: | ||
| - kind: local | ||
| path: subproject |
File renamed without changes.
Empty file.
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,9 @@ | ||
| name: subproject | ||
| min-version: 2.0 | ||
|
|
||
| junctions: | ||
| internal: | ||
| - self-junction.bst | ||
|
|
||
| # (@): | ||
| # - self-junction.bst:include.yml |
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 |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ sources: | |
| - kind: local | ||
| path: . | ||
|
|
||
|
|
||
| config: | ||
| overrides: | ||
| target.bst: alternative.bst | ||
File renamed without changes.
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.
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.
Unfortunately, this loading is too eager, resulting in a regression of #1686.
I'm trying to find an alternative fix that avoids that regression.
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.
I've opened #2114, which fixes this issue in a different way. It includes and passes your tests from this branch (adjusted to keep the previous tests without changes).