rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

Enable using `experimental_index_url` without having hashes in the lock file

Open aignas opened this issue 1 year ago • 0 comments

🚀 feature request

Relevant Rules

pip.parse with experimental_index_url set to a non-empty value.

Description

Quite often the users create a requirements.txt file by just using pip freeze. This is not ideal, but it is the reality.

Describe the solution you'd like

Supporting the setting up of the select statements with all available wheels would be beneficial in making the code more robust. It would also enable to more easily support a niche usecase where bazel is used in an integration test where the latest package, so in there we have no version number and no hashes at all.

Describe alternatives you've considered

Do not do it and error without hashes specified. This might not work in cases where the hashes might not be required:

  • VCS URL. The sha is the hash, but we should instead just support the direct download URLs better in the experimental_index_url code path.
  • Direct download URL. The hash is something that we don't strictly need and bazel could just print a warning message that the hash needs to be added.

aignas avatar Jul 01 '24 07:07 aignas