Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow license_text=None in license declaration #162

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adam-azarchs
Copy link

Fixes #31

There are many situations where the license kind is known but no license
file is available, e.g. some wheels downloaded from PyPi.

There are good reasons why one might want to prohibit that from a policy
perspective, but enforcing that policy is not the job of the license
rule itself, and the provided error message is not especially helpful
(and clearly not the intended outcome).

This doesn't alter the macro wrapper. Any target that would be affected
by this change would have already been failing to build.

This causes the build (or cquery) to fail with

    every rule of type _license implicitly depends upon the target '//rules:LICENSE',
    but this target could not be found because of: no such target '//rules:LICENSE'

Relates-to bazelbuild#31
There are many situations where the license kind is known but no license
file is available, e.g. some wheels downloaded from PyPi.

There are good reasons why one might want to prohibit that from a policy
perspective, but enforcing that policy is not the job of the license
rule itself, and the provided error message is not especially helpful
(and clearly not the intended outcome).

This doesn't alter the macro wrapper.  Any target that would be affected
by this change would have already been failing to build.

Closes bazelbuild#31
":hello_cc_copyrights.txt",
":hello_licenses.json",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I debated reverting these off-target changes that were made by buildifier, but... they were made by buildifier, so probably best to leave them in anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

license_text should not be mandatory
1 participant