Skip to content

Regression caused by #655 #677

@UebelAndre

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)

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