Skip to content

Convert the compression level to a string before calling Args.add()#975

Merged
cgrindel merged 1 commit intobazelbuild:mainfrom
EdSchouten:eschouten/20250909-str
Sep 10, 2025
Merged

Convert the compression level to a string before calling Args.add()#975
cgrindel merged 1 commit intobazelbuild:mainfrom
EdSchouten:eschouten/20250909-str

Conversation

@EdSchouten
Copy link
Contributor

The documentation for Bazel's Args states that standard conversion rules are only specified for strings, Files, and Labels. For all other types the conversion to a string is done in an unspecified manner, which is why it should be avoided.

Let's stay away from this unspecified behaviour by explicitly converting the compression level to a string before calling Args.add().

The documentation for Bazel's Args states that standard conversion rules
are only specified for strings, Files, and Labels. For all other types
the conversion to a string is done in an unspecified manner, which is
why it should be avoided.

Let's stay away from this unspecified behaviour by explicitly converting
the compression level to a string before calling Args.add().
@EdSchouten EdSchouten force-pushed the eschouten/20250909-str branch from a71c3c1 to b11e021 Compare September 9, 2025 14:44
@EdSchouten EdSchouten requested a review from nacl as a code owner September 9, 2025 14:44
@cgrindel cgrindel merged commit 9c05cf6 into bazelbuild:main Sep 10, 2025
3 checks passed
@EdSchouten EdSchouten deleted the eschouten/20250909-str branch September 10, 2025 14:17
aiuto pushed a commit to aiuto/rules_pkg that referenced this pull request Sep 11, 2025
…azelbuild#975)

The documentation for Bazel's Args states that standard conversion rules
are only specified for strings, Files, and Labels. For all other types
the conversion to a string is done in an unspecified manner, which is
why it should be avoided.

Let's stay away from this unspecified behaviour by explicitly converting
the compression level to a string before calling Args.add().
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.

2 participants