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

license_text should not be mandatory #31

Closed
adam-azarchs opened this issue Mar 2, 2022 · 2 comments · Fixed by #162
Closed

license_text should not be mandatory #31

adam-azarchs opened this issue Mar 2, 2022 · 2 comments · Fixed by #162
Assignees
Labels

Comments

@adam-azarchs
Copy link
Contributor

Expected Behavior

It should be possible to create a license that does not set a license_text.

While it's certainly not a great idea to not have a license_text for a license, that's something that should be enforced (at the user's discretion) in compliance rules, rather than in the structure of the rule declarations. There are many situations where there isn't a practical alternative, e.g. downloading a python wheel where you know the SPDX ID of the license but the file isn't included in the zip file.

Actual Behavior

The macro wrapper sets license_text to LICENSE. This may be convenient in some cases, but at the same time that kind of invisible, implicit source file dependency is generally not the way most things work in bazel.

@aiuto
Copy link
Collaborator

aiuto commented Oct 26, 2023

II think this is fixed, but I'll investigage

@aiuto aiuto self-assigned this Oct 26, 2023
@aiuto aiuto added the P1 label Oct 26, 2023
@adam-azarchs
Copy link
Contributor Author

This is definitely still not fixed. The macro still defaults license_text to "LICENSE". That would be ok if you could just explicitly set it to None, but if you do that then you still have the underlying rule setting default = "LICENSE" which is a problem because that results in the error

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

adam-azarchs added a commit to adam-azarchs/rules_license that referenced this issue Oct 22, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants