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: load providers from //:providers.bzl #953

Closed
wants to merge 4 commits into from

Conversation

manekinekko
Copy link

BREAKING CHANGE: @build_bazel_rules_nodejs//:declaration_provider.bzl has been deleted; load from @build_bazel_rules_nodejs//:providers.bzl instead. See bazel-contrib/rules_nodejs@cc64818

BREAKING CHANGE: `@build_bazel_rules_nodejs//:declaration_provider.bzl` has been deleted; load from `@build_bazel_rules_nodejs//:providers.bzl` instead.
See bazel-contrib/rules_nodejs@cc64818
@google-cla google-cla bot added the cla: yes label Sep 22, 2021
@UebelAndre
Copy link
Collaborator

Thanks for fixing this! I think you'll also need to update the docs/BUILD.bazel:

bzl_library(
name = "docs_deps",
srcs = [
"@bazel_tools//tools:bzl_srcs",
"@build_bazel_rules_nodejs//internal/providers:bzl",
"@com_google_protobuf//:bzl_srcs",
],
deps = [
"@bazel_skylib//lib:paths",
"@rules_proto//proto:defs",
"@rules_proto//proto:repositories",
],
)

@UebelAndre UebelAndre self-requested a review September 22, 2021 16:07
docs/BUILD.bazel Outdated Show resolved Hide resolved
@UebelAndre
Copy link
Collaborator

UebelAndre commented Sep 22, 2021

It seems the rolling release builds are unable to start? Doesn't seem like this change would impact that.
cc @hlopko @philwo

edit: Understanding they're non-fatal for a PR, but they should still run so we can maintain a sense of what's working and what's not. Also, (tiny feature request) it would be fantastic to have these run in a separate job all-together. I didn't realize they were failing and I don't think anyone else will since they're hidden behind the green checkmark.

@philwo
Copy link
Member

philwo commented Sep 22, 2021

macOS workers do not yet have a new enough version of Bazelisk yet to support rolling releases. Will fix that next week.

RBE Rolling Bazel seems like some issue with the container config maybe. @coeuvre any idea?

Co-authored-by: UebelAndre <github@uebelandre.com>
@UebelAndre
Copy link
Collaborator

@manekinekko Seems like providers.bzl is not publicly visible?

in bzl_library rule //:docs_deps: target '@build_bazel_rules_nodejs//:providers.bzl' is not visible from target '//:docs_deps'. Check the visibility declaration of the former target if you think the dependency is legitimate. To set the visibility of that source file target, use the exports_files() function

Maybe that's an oversight in rules_nodejs?

@manekinekko
Copy link
Author

Weird! I am using v4.2.0. Maybe that's why it's working for me.

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "4e1a5633267a0ca1d550cced2919dd4148575c0bafd47608b88aea79c41b5ca3",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.2.0/rules_nodejs-4.2.0.tar.gz"],
)

cc @alexeagle @gregmagolan

@alexeagle
Copy link
Contributor

Hi @manekinekko nice to see you again :)

ERROR: /workdir/docs/BUILD.bazel:7:12: in bzl_library rule //:docs_deps: target '@build_bazel_rules_nodejs//:providers.bzl' is not visible from target '//:docs_deps'. Check the visibility declaration of the former target if you think the dependency is legitimate. To set the visibility of that source file target, use the exports_files() function

this is because you're referencing the providers.bzl file directly, instead you should use some filegroup target in that package that exposes all the files (probably named "bzl")

@manekinekko
Copy link
Author

Thank you for the hint @alexeagle ❤️

@UebelAndre looks the bzl_library rule needs to be updated as well. Do you need to fix that?

bzl_library(
name = "docs_deps",
srcs = [
"@bazel_tools//tools:bzl_srcs",
"@build_bazel_rules_nodejs//internal/providers:bzl",
"@com_google_protobuf//:bzl_srcs",

@UebelAndre
Copy link
Collaborator

Thank you for the hint @alexeagle ❤️

@UebelAndre looks the bzl_library rule needs to be updated as well. Do you need to fix that?

bzl_library(
name = "docs_deps",
srcs = [
"@bazel_tools//tools:bzl_srcs",
"@build_bazel_rules_nodejs//internal/providers:bzl",
"@com_google_protobuf//:bzl_srcs",

I would expect the bzl_library to be updated if the .bzl files being used changes. I'd expect there to be some filegroup like what Alex mentioned but am not confident in my ability to read rules_nodejs since the releases are different from what I see in the actual repo.

@coeuvre
Copy link
Member

coeuvre commented Sep 29, 2021

RBE Rolling Bazel issue is fixed by #958.

@UebelAndre
Copy link
Collaborator

UebelAndre commented Nov 8, 2021

Closing this in favor of #984

Thanks for putting this together!

@UebelAndre UebelAndre closed this Nov 8, 2021
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 this pull request may close these issues.

5 participants