fix(uv): fix handling of versions containing plus characters#898
fix(uv): fix handling of versions containing plus characters#898jbedard merged 3 commits intoaspect-build:mainfrom
Conversation
|
This allows us to make the test a bit more realistic. Now the package version truly has a plus in it, as opposed to with cowsay, where we had to artifically introduce the plus sign in the uv.lock file.
Currently you get an error like this if your uv.lock contains a version with a '+' character in it: ``` Error in repository_rule: invalid user-provided repo name 'whl_install__mywheel__0_1+20260102': valid names may contain only A-Z, a-z, 0-9, '-', '_', '.', and must start with a letter or a number ``` This change fixes that by replacing '+' with an underscore in the name we generate. I tried to find all the places where this version-escaping logic occurs and update it to use a new helper function.
|
@jbedard Thanks! I see that pre-commit check is failing and it looks like perhaps that check expects me to have created a branch in this repo instead of in my own fork. Is that right? |
|
@acozzette I'm not sure what the error is, I haven't had a chance to investigate (feel free to look if you have a chance! 😅) But we shouldn't expect ever contributor in the world to have permission to commit to https://github.com/aspect-build/rules_py, so that would be a bug on our part if that's the issue. |

Update uv.lock logic to account for versions containing a '+' character
Currently you get an error like this if your uv.lock contains a version with a '+' character in it:
This change fixes that by replacing '+' with an underscore in the name we generate. I tried to find all the places where this version-escaping logic occurs and update it to use a new helper function.
Changes are visible to end-users: yes
Test plan