-
Notifications
You must be signed in to change notification settings - Fork 991
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 lockfile-overrides-bug #16235
Merged
czoido
merged 12 commits into
conan-io:release/2.3
from
memsharded:fix/lockfile_overrides_bug
May 16, 2024
Merged
fix lockfile-overrides-bug #16235
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bdafa80
solved bad merge
memsharded 4639b25
wip
memsharded 072d64c
fix tests
memsharded d05455b
fix
memsharded 80e71d5
wip
memsharded 7f22022
wip
memsharded e0e9c7b
fixes
memsharded dd5aab0
Merge branch 'release/2.3' into fix/lockfile_overrides_bug
memsharded d7b59ce
review
memsharded 70e58cf
new test with replace_requires
memsharded bdb8bd0
wip
memsharded 21c01a4
avoid duplicated depends in build-order
memsharded 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -29,6 +29,9 @@ def __init__(self, ref, *, headers=None, libs=None, build=False, run=None, visib | |
self._direct = direct | ||
self.options = options | ||
# Meta and auxiliary information | ||
# The "defining_require" is the require that defines the current value. If this require is | ||
# overriden/forced, this attribute will point to the overriding/forcing requirement. | ||
self.defining_require = self # if not overriden, it points to itself | ||
self.overriden_ref = None # to store if the requirement has been overriden (store old ref) | ||
self.override_ref = None # to store if the requirement has been overriden (store new ref) | ||
self.is_test = test # to store that it was a test, even if used as regular requires too | ||
|
@@ -518,16 +521,6 @@ def build_require(self, ref, raise_if_duplicated=True, package_id_mode=None, vis | |
raise ConanException("Duplicated requirement: {}".format(ref)) | ||
self._requires[req] = req | ||
|
||
def override(self, ref): | ||
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. This was dead code. |
||
req = Requirement(ref) | ||
old_requirement = self._requires.get(req) | ||
if old_requirement is not None: | ||
req.force = True | ||
self._requires[req] = req | ||
else: | ||
req.override = True | ||
self._requires[req] = req | ||
|
||
def test_require(self, ref, run=None, options=None, force=None): | ||
""" | ||
Represent a testing framework like gtest | ||
|
This file contains 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 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 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
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.
This was a not related small bug fix.