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

feat(examples): use protobufjs with multiple proto targets #3544

Closed
wants to merge 2 commits into from

Conversation

Katee
Copy link
Contributor

@Katee Katee commented Aug 30, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Currently examples/protobufjs/defs.bzl does not support building multiple different protos.

What is the new behavior?

Multiple different protos can be combined in one protobufjs_library target.

Does this PR introduce a breaking change?

  • Yes
  • No

All usages of protobufjs_library have been updated so that proto (a single label) is now protos (a list of labels). I believe this is not a breaking change because projects that include bazelbuild/rules_nodejs do not have access to examples/protobufjs/defs.bzl.

Other information

It seems likely there is a library function that does the same thing as _sanitize_label.

The changes here and in #3543 are compatible.

@Katee Katee changed the title feat(examples): use protobufjs with multiple proto targetts feat(examples): use protobufjs with multiple proto targets Aug 30, 2022
Copy link
Collaborator

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

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

Thanks, nice fix!

@alexeagle
Copy link
Collaborator

hm, CI failure looks like

ERROR: /tmp/tmp-75897rhMmdBigy881/BUILD.bazel:47:11: Compiling TypeScript project //:app [tsc -p tsconfig.json] failed: (Exit 2): tsc.sh failed: error executing command bazel-out/k8-opt-exec-2B5CBBC6/bin/external/npm/typescript/bin/tsc.sh --project tsconfig.json --outDir bazel-out/k8-fastbuild/bin --rootDir . ... (remaining 1 argument skipped)

Use --sandbox_debug to see verbose messages from the sandbox
app.ts(1,27): error TS2307: Cannot find module './car_pb'.

@github-actions
Copy link

This Pull Request has been automatically marked as stale because it has not had any activity for 6 months. It will be closed if no further activity occurs in 30 days. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!

@github-actions github-actions bot added the Can Close? We will close this in 30 days if there is no further activity label Mar 30, 2023
@github-actions
Copy link

This PR was automatically closed because it went 30 days without any activity since it was labeled "Can Close?"

@github-actions github-actions bot closed this Apr 30, 2023
@alexeagle alexeagle reopened this Apr 30, 2023
@github-actions
Copy link

This PR was automatically closed because it went 30 days without any activity since it was labeled "Can Close?"

@github-actions github-actions bot closed this May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can Close? We will close this in 30 days if there is no further activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants