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

.bazelignore the modules/ dir. #2270

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Conversation

lalten
Copy link
Contributor

@lalten lalten commented Jun 14, 2024

With the addition of overlays (#1566) it now can make sense to have BUILD and .bzl files inside the module version directories. However they don't necessarily make sense on their own. They are only supposed to work in the context of the source archive they overlay.

To prevent issues like not being able to load() from a //:def.bzl that does not exist in the registry repo, let's just .bazelignore the modules/ dir.

With the addition of overlays (bazelbuild#1566) it now can make sense to have
BUILD and .bzl files inside the module version directories.
However they don't necessarily make sense on their own.
They are only supposed to work in the context of the source archive
they overlay.

To prevent issues like not being able to load() from a //:def.bzl that
does not exit in the registry repo, let's just .bazelignore the modules/
dir.
@fmeum fmeum merged commit a509083 into bazelbuild:main Jun 14, 2024
7 checks passed
@alexeagle
Copy link
Contributor

We had Bazel test targets to validate the metadata.json files against the metadata.schema.json file. These are no longer functional because the glob at https://github.com/bazelbuild/bazel-central-registry/blob/main/BUILD#L3 no longer finds any inputs :(

I think we need a more nuanced answer. In other repos I use --deleted_packages in .bazelrc to mark certain BUILD files as "not denoting a Bazel package in this folder". I'm going to send a PR to switch to that.

@alexeagle
Copy link
Contributor

And of course while the tests were disabled, two new packages were added that violate the schema:

FAIL: //:test_metadata.modules/marisa-trie (see /private/var/tmp/_bazel_alexeagle/76616cfd9dcc8a6cdc22c2cc69d5859f/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/test_metadata.modules/marisa-trie/test.log)
INFO: From Testing //:test_metadata.modules/marisa-trie:
==================== Test output for //:test_metadata.modules/marisa-trie:
modules/marisa-trie/metadata.json invalid
[
  {
    instancePath: '/maintainers',
    schemaPath: '#/properties/maintainers/minItems',
    keyword: 'minItems',
    params: { limit: 1 },
    message: 'must NOT have fewer than 1 items'
  }
]
================================================================================
FAIL: //:test_metadata.modules/libcpuid (see /private/var/tmp/_bazel_alexeagle/76616cfd9dcc8a6cdc22c2cc69d5859f/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/test_metadata.modules/libcpuid/test.log)
INFO: From Testing //:test_metadata.modules/libcpuid:
==================== Test output for //:test_metadata.modules/libcpuid:
modules/libcpuid/metadata.json invalid
[
  {
    instancePath: '/maintainers',
    schemaPath: '#/properties/maintainers/minItems',
    keyword: 'minItems',
    params: { limit: 1 },
    message: 'must NOT have fewer than 1 items'
  }
]
================================================================================

alexeagle added a commit to aspect-build/bazel-central-registry that referenced this pull request Aug 28, 2024
They were accidentally disabled by bazelbuild#2270

Also fix the two broken metadata files which were added during the lapse.
alexeagle added a commit to aspect-build/bazel-central-registry that referenced this pull request Aug 28, 2024
They were accidentally disabled by bazelbuild#2270

Also fix the two broken metadata files which were added during the lapse.
alexeagle added a commit to aspect-build/bazel-central-registry that referenced this pull request Aug 28, 2024
They were accidentally disabled by bazelbuild#2270

Also fix the two broken metadata files which were added during the lapse.
Wyverald pushed a commit that referenced this pull request Aug 29, 2024
They were accidentally disabled by #2270

Also fix the two broken metadata files which were added during the
lapse.
Alternative to #2691
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