Skip to content

Add ShInfo and ShBinaryInfo providers#47

Merged
fmeum merged 4 commits intobazel-contrib:mainfrom
UebelAndre:provider
Mar 8, 2026
Merged

Add ShInfo and ShBinaryInfo providers#47
fmeum merged 4 commits intobazel-contrib:mainfrom
UebelAndre:provider

Conversation

@UebelAndre
Copy link
Copy Markdown
Contributor

closes #16

@UebelAndre
Copy link
Copy Markdown
Contributor Author

@fmeum you mentioned wanting a separate provider for binaries, do you have any preferences for names? And the provider is currently empty, I'm not sure what would make the most sense to put in that. Curious what you think!

@fmeum
Copy link
Copy Markdown
Member

fmeum commented Mar 8, 2026

ShInfo and ShBinaryInfo perhaps? They can be empty for now, but we can already replace allow_rules with them.

@UebelAndre UebelAndre changed the title Add ShInfo provider Add ShInfo and ShBinaryInfo providers Mar 8, 2026
@UebelAndre
Copy link
Copy Markdown
Contributor Author

ShInfo and ShBinaryInfo perhaps? They can be empty for now, but we can already replace allow_rules with them.

Done!

@UebelAndre
Copy link
Copy Markdown
Contributor Author

(20:53:06) ERROR: /Users/buildkite/builds/bk-macos-intel-c3vz/bazel/rules-shell/tests/bcr/BUILD:12:10: in sh_binary rule //:bin:
/private/var/tmp/_bazel_buildkite/ee54915b9d2878a6f7884176de4ecfb4/external/rules_shell+/shell/private/sh_executable.bzl:29:5: rule advertised the 'ShInfo' provider, but this provider was not among those returned
(20:53:06) ERROR: /Users/buildkite/builds/bk-macos-intel-c3vz/bazel/rules-shell/tests/bcr/BUILD:12:10: Analysis of target '//:bin' (config: aaed0a7) failed
(20:53:06) ERROR: Analysis of target '//:bin' failed; build aborted

I think for backward compatibility we might need to leave allow_rules.

Comment thread shell/private/sh_executable.bzl Outdated
Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
@UebelAndre
Copy link
Copy Markdown
Contributor Author

I think for backward compatibility we might need to leave allow_rules.

Disregard!

ShInfo and ShBinaryInfo perhaps? They can be empty for now, but we can already replace allow_rules with them.

Done!

I missed a spot, thakn you @fmeum !

@UebelAndre UebelAndre requested a review from fmeum March 8, 2026 20:09
Comment thread shell/private/sh_library.bzl Outdated
runfiles = runfiles,
),
instrumented_files_info,
ShInfo(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As a memory optimization, could you extract this into a private constant?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done!

@UebelAndre UebelAndre requested a review from fmeum March 8, 2026 20:48
@fmeum fmeum merged commit 5132dd4 into bazel-contrib:main Mar 8, 2026
2 checks passed
@UebelAndre UebelAndre deleted the provider branch March 8, 2026 21:10
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.

Add unique provider for sh_* rules

2 participants