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

Add @rules_license style license declarations #508

Merged
merged 30 commits into from
Feb 16, 2022
Merged

Conversation

aiuto
Copy link
Collaborator

@aiuto aiuto commented Jan 24, 2022

Add a first round of rules_license declarations to rules_pkg.

  • This depends on First cut at making a release binary rules_license#26 and the 0.0.1 release of rules_license.
  • Some buildifier reformatting made some non-behavioral format changes.
  • Next steps
    • to use rules_pkg to distribute a runtime only version of rules_license
    • update rules_pkg to point to rules_license 0.0.2
    • vendor rules_license into bazel
    • update bazel to use this new rules_license

RELNOTES: New dependency on @rules_license.

@aiuto aiuto requested a review from nacl as a code owner January 24, 2022 21:37
@aiuto aiuto marked this pull request as draft January 24, 2022 21:37
@aiuto
Copy link
Collaborator Author

aiuto commented Jan 24, 2022

cc: @danielmachlab

Copy link
Collaborator

@nacl nacl left a comment

Choose a reason for hiding this comment

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

The idea seems sound, but the question I'm wondering about is how this would be propagated to the other bazelbuild projects.

I don't deeply mind being the first one to consume rules_license, but I'm wary because the API might change and have ripple effects on downstream consumers.

See suggestions below.

BUILD Show resolved Hide resolved
BUILD Show resolved Hide resolved
BUILD Show resolved Hide resolved
doc_build/BUILD Outdated Show resolved Hide resolved
pkg/deps.bzl Outdated Show resolved Hide resolved
tests/BUILD Show resolved Hide resolved
tests/mappings/BUILD Outdated Show resolved Hide resolved
Copy link
Collaborator

@danielmachlab danielmachlab left a comment

Choose a reason for hiding this comment

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

Hi Tony, besides Andrew's comments, the changes you made look good to me. Just left one question

distro/BUILD Show resolved Hide resolved
@aiuto aiuto changed the title Add @rules_pkg style license declarations Add @rules_license style license declarations Jan 31, 2022
@aiuto aiuto marked this pull request as ready for review January 31, 2022 05:49
@aiuto aiuto removed the request for review from floriographygoth February 3, 2022 20:20
Copy link
Collaborator

@nacl nacl left a comment

Choose a reason for hiding this comment

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

LGTM, given the discussion.

The new dependency on rules_license should be documented in the release notes. We might need a tag for that.

@aiuto
Copy link
Collaborator Author

aiuto commented Feb 16, 2022

About being the first adopter: Yes. Since I am doing development on both rules, it is easier to quickly rev and iron out things before other teams start.

About possible changes: The API for license users is intended to be strictly backwards compatible forever. For the most part, there should only be one license target in any rule set. In general, they will always take the form we have used in this PR

license(
    name = "license",
    license_kinds = [
        "@rules_license//licenses/spdx:Apache-2.0"
    ],
    license_text = "LICENSE",
)

This declares that I am using an Apache-2.0 license and the text of it is in the file LICENSE. There may be backwards compatible additions over time.

The API for consuming these declarations to build audit trails and SBOMs will definitely change a lot in the next few months, but that will only impact organizations who want to establish their own audit policies.

@aiuto aiuto merged commit 3c0b364 into bazelbuild:main Feb 16, 2022
@aiuto aiuto deleted the license branch February 16, 2022 16:01
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.

3 participants