pixi
pixi copied to clipboard
fix: trim channel url when filter packages_for_prefix_mapping
Fixes: #1384
I found if any the key of mapping_url
or RepoDataRecord.channel
end with '/' will make packages_for_prefix_mapping
always filter all packages
https://github.com/prefix-dev/pixi/blob/1ec1b90a4df20fa5555d431869e6335837bbf5ee/src/pypi_mapping/custom_pypi_mapping.rs#L102-L120
Looks very good! Thanks for spotting this.
Could you please add a small test for this usecase?
Looks very good! Thanks for spotting this.
Could you please add a small test for this usecase?
I don't know how to add a test for this usecase, can you provide some suggestions?
Looks very good! Thanks for spotting this. Could you please add a small test for this usecase?
I don't know how to add a test for this usecase, can you provide some suggestions?
sure!
you can take a look at this test:
https://github.com/prefix-dev/pixi/pull/1335/files#diff-a0d6a55fba5932c0cafe2e60f8573b8d7861f51c77e19b93100dfa8685f0ce5aR302
and add the same in tests/solve_group_tests.rs
where you add some record with ending /
:
https://github.com/prefix-dev/pixi/pull/1335/files#diff-a0d6a55fba5932c0cafe2e60f8573b8d7861f51c77e19b93100dfa8685f0ce5aR333
but your mapping url don't have the /
in channel.
So you will verify if we filter them right
Let me know if you need any help
@nichmor test is done
@nichmor test is done
Thanks for your work!
I've fixed the conflicts with main and changed a little the test to assert that we record qualifer for purl ( https://github.com/prefix-dev/pixi/pull/1391/files#diff-a0d6a55fba5932c0cafe2e60f8573b8d7861f51c77e19b93100dfa8685f0ce5aR409 )
Looks very good - I'm merging it.