Skip to content

invalid user-provided repo name crash #2828

Closed

Description

@baxelrod-bdai

🐞 bug report

Affected Rule

pip.parse

Is this a regression?

maybe? I get different errors in 1.3.0. but i think this worked in previous versions.

Description

When i specify a repository in my requirements.in file, i get a "invalid user-provided repo name" crash.

🔬 Minimal Reproduction

requirements.in has this:

efficientvit @ git+https://github.com/mit-han-lab/efficientvit.git@4cc0a75fb5225f2986fa5733f5bfe7c8b9ad4813

requirements.lock has stuff like:

efficientvit @ git+https://github.com/mit-han-lab/efficientvit.git@4cc0a75fb5225f2986fa5733f5bfe7c8b9ad4813
    # via -r requirements.in
tinyneuralnetwork @ git+https://github.com/alibaba/TinyNeuralNetwork.git@c9d0ac571086212b4a62d2bacf6bfe12d92556e1
    # via efficientvit

🔥 Exception or Error


ERROR: /home/baxelrod/.cache/bazel/_bazel_baxelrod/223f490fa0c2f2ec38707ddac3dd6272/external/rules_python+/python/private/pypi/extension.bzl:617:20: Traceback (most recent call last):
	File "/home/baxelrod/.cache/bazel/_bazel_baxelrod/223f490fa0c2f2ec38707ddac3dd6272/external/rules_python+/python/private/pypi/extension.bzl", line 617, column 20, in _pip_impl
		whl_library(name = name, **args)
Error in repository_rule: invalid user-provided repo name 'pip_u2204_310__TinyNeuralNetwork_git@c9d0ac571086212b4a62d2bacf6bfe12d92556e1': valid names may contain only A-Z, a-z, 0-9, '-', '_', '.', and must start with a letter
ERROR: error evaluating module extension @@rules_python+//python/extensions:pip.bzl%pip

🌍 Your Environment

Operating System:

  
linux x86_64
  

Output of bazel version:

  
8.1.1
  

Rules_python version:

  
1.4.0-rc2
  

Activity

  1. added this to the v1.4 milestone on Apr 27, 2025
  2. added theissue type on Apr 27, 2025
  3. neyo8826 commented on Apr 28, 2025

    @neyo8826

    the same happens with

    torch @ https://download.pytorch.org/whl/cpu/torch-2.6.0%2Bcpu-cp311-cp311-linux_x86_64.whl#sha256=5b6ae523bfb67088a17ca7734d131548a2e60346c622621e4248ed09dd0790cc
    

    bazel 8.2.1

    it works with rules_python 1.2.0 but fails with 1.3.0 and 14.0-rc2 (bcr)

    Error in repository_rule: invalid user-provided repo name 'pip_311_torch_2_6_0%2bcpu_cp311_cp311_sdist_5b6ae523': valid names may contain only A-Z, a-z, 0-9, '-', '_', '.', and must start with a letter
    
  4. aignas commented on Apr 29, 2025

    @aignas
    Collaborator

    This is probably still an issue with 1.4.0-rc3.

  5. added a commit that references this issue on Apr 29, 2025
    9a3596e
  6. aignas commented on Apr 29, 2025

    @aignas
    Collaborator

    Could you please check if the PR #2843 helps with the issues you are both seeing?

  7. added a commit that references this issue on Apr 29, 2025
    a79bbfa
  8. added a commit that references this issue on Apr 29, 2025
    f2b6747
  9. baxelrod-bdai commented on Apr 29, 2025

    @baxelrod-bdai
    ContributorAuthor

    I still get the same error with 1.4.0-rc3

  10. baxelrod-bdai commented on Apr 29, 2025

    @baxelrod-bdai
    ContributorAuthor

    Fixed in 1.4.0-rc4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions