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

propose bazel type for Bazel modules #317

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions PURL-TYPES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@ apk
pkg:apk/alpine/[email protected]?arch=x86
pkg:apk/alpine/[email protected]?arch=x86

bazel
-----
``bazel`` for Bazel modules as specified at ``https://bazel.build/external/module``:

- The default repository is the Bazel Central Registry (BCR) ``https://bcr.bazel.build``.
- The ``name`` is the module name.
- The ``version`` is the module version in `Bazel's relaxed semver format
<https://bazel.build/external/module#version_format>`_.
- The optional ``repository_url`` can be used to specify the URL of an
alternative registry.
- The optional ``subpath`` can refer to a particular Bazel package in the
module.
- Examples::

pkg:bazel/[email protected]
pkg:bazel/[email protected]
pkg:bazel/[email protected]?repository_url=https://example.org/bazel-registry
pkg:bazel/[email protected]
pkg:bazel/[email protected]#java/runfiles
pkg:bazel/[email protected]#go

bitbucket
---------
``bitbucket`` for Bitbucket-based packages:
Expand Down
72 changes: 72 additions & 0 deletions test-suite-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,5 +622,77 @@
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "bazel module with default registry",
"purl": "pkg:bazel/[email protected]?registry_url=https://bcr.bazel.build/",
"canonical_purl": "pkg:bazel/[email protected]",
"type": "bazel",
"namespace": null,
"name": "rules_java",
"version": "7.8.0",
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "bazel module with custom registry",
"purl": "pkg:bazel/[email protected]?registry_url=https://example.org/bazel-registry/",
"canonical_purl": "pkg:bazel/[email protected]?registry_url=https://example.org/bazel-registry",
"type": "bazel",
"namespace": null,
"name": "rules_java",
"version": "7.8.0",
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "bazel module with relaxed semver version",
"purl": "pkg:bazel/[email protected]",
"canonical_purl": "pkg:bazel/[email protected]",
"type": "bazel",
"namespace": null,
"name": "curl",
"version": "8.8.0.bcr.1",
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "bazel module names are actually all lowercased, but this is not enforced by the PURL type spec for reasons",
"purl": "pkg:bazel/[email protected]",
"canonical_purl": "pkg:bazel/[email protected]",
fmeum marked this conversation as resolved.
Show resolved Hide resolved
"type": "bazel",
"namespace": null,
"name": "Curl",
"version": "8.8.0.bcr.1",
"qualifiers": null,
"subpath": null,
"is_invalid": false
},
{
"description": "bazel module with multi-segment package",
"purl": "pkg:bazel/[email protected]#java/runfiles",
"canonical_purl": "pkg:bazel/[email protected]#java/runfiles",
"type": "bazel",
"namespace": null,
"name": "rules_java",
"version": "8.5.0",
"qualifiers": null,
"subpath": "java/runfiles",
"is_invalid": false
},
{
"description": "bazel module with single-segment package",
"purl": "pkg:bazel/[email protected]#go",
"canonical_purl": "pkg:bazel/[email protected]#go",
"type": "bazel",
"namespace": null,
"name": "rules_go",
"version": "0.48.0",
"qualifiers": null,
"subpath": "go",
"is_invalid": false
}
]