-
Notifications
You must be signed in to change notification settings - Fork 19
fix: if a spec is source, don't merge but force the source #405
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
Merged
ruben-arts
merged 10 commits into
prefix-dev:main
from
ruben-arts:fix/prio_source_deps_on_merge
Oct 14, 2025
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
412b792
fix: if a spec is source, don't merge but force the source
ruben-arts 8609c3f
fix: mypy warning
ruben-arts b34de6e
fix: cleanup and add test
ruben-arts ca0d73b
fix: cleanup and add test
ruben-arts 099f4f5
misc: improve dev UX as `pixi-build` didn't give the right ux for dev…
ruben-arts 333abb2
update lockfile
ruben-arts c25c4b8
use py-pixi-build-backend from channel
ruben-arts a2bce1d
extend robostack.yaml
ruben-arts 1eebb4c
Merge remote-tracking branch 'upstream/main' into fix/prio_source_dep…
ruben-arts f75f9a5
use development version of `py-pixi-build-backends`
ruben-arts 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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,6 +1,6 @@ | ||
import pytest | ||
from pixi_build_backend.types.item import ItemPackageDependency | ||
from pixi_build_ros.ros_generator import merge_unique_items | ||
from pixi_build_ros.utils import merge_unique_items | ||
|
||
|
||
def test_with_star_items(): | ||
|
@@ -40,3 +40,17 @@ def test_specs_with_spaces(): | |
with pytest.raises(ValueError) as exc: | ||
merge_unique_items(list1, list2) | ||
assert "contains spaces" in str(exc) | ||
|
||
|
||
def test_specs_with_none(): | ||
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. can we maybe add a test with source usecase? 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. I added one |
||
list1 = [ItemPackageDependency("ros-noetic")] | ||
list2 = [ItemPackageDependency("ros-noetic <=2.0,<3.0")] | ||
result = merge_unique_items(list1, list2) | ||
assert result[0].concrete.binary_spec == list2[0].concrete.binary_spec | ||
|
||
|
||
def test_specs_with_source(): | ||
list1 = [ItemPackageDependency('ros-noetic[url="https://blabla"]')] | ||
list2 = [ItemPackageDependency("ros-noetic <=2.0,<3.0")] | ||
result = merge_unique_items(list1, list2) | ||
assert str(result[0].concrete.source_spec.spec) == str(list1[0].concrete.source_spec.spec) |
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.
I wonder if it should be also lowercase like py_rattler?
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
conda-forge
maintainers asked me to use-
s