Skip to content

Regression caused by #655 #677

Closed

Description

@UebelAndre

🐞 bug report

Affected Rule

The issue is caused by the rule:

pip_repository breaks if BUILD_WORKING_DIRECTORY is set where the requirements.bzl file is not written.

Is this a regression?

This is a regression caused by #655 (comment)

Description

A clear and concise description of the problem...

pip_repository should always write a requirements.bzl file. Printing the contents should be a sideeffect.

🔬 Minimal Reproduction

From the root of rules_python:

cd examples/pip_parse && export BUILD_WORKING_DIRECTORY=$(pwd) && bazel test //...

🔥 Exception or Error

pip_parse % bazel test //...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 9b05ae6c-b5e9-42f6-9820-376b018e7233
ERROR: error loading package '': cannot load '@pypi//:requirements.bzl': no such file
INFO: Elapsed time: 6.276s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)

Activity

  1. UebelAndre commented on Mar 31, 2022

    @UebelAndre
    ContributorAuthor
  2. rahul-theorem commented on Apr 19, 2022

    @rahul-theorem

    I also hit this error specifically when switching between branches that had different requirements. We resolved this by downgrading to rules_python 0.7.0, but hopefully a fix for this will make it into the next release.

  3. alexeagle commented on Apr 20, 2022

    @alexeagle
    Contributor

    Sorry about that, I'm trying to fix in #679 but got stuck there

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions