Support passing arguments to run_binary via param file#492
Open
vejbomar wants to merge 1 commit intobazelbuild:mainfrom
Open
Support passing arguments to run_binary via param file#492vejbomar wants to merge 1 commit intobazelbuild:mainfrom
vejbomar wants to merge 1 commit intobazelbuild:mainfrom
Conversation
Allows to use run_binary in the case when the size of the command line can grow longer than the maximum size allowed by the system.
e59f67b to
454d517
Compare
comius
requested changes
Jul 12, 2024
Comment on lines
+100
to
+107
| "param_file_format": attr.string( | ||
| doc = "If provided, Bazel can pass command-line arguments to the tool via file.\n\n" + | ||
| "Should be used when the size of the command line can grow longer than the " + | ||
| "maximum size allowed by the system. The format is the same as the format of " + | ||
| "`param_file_arg` in [`Args.param_file_arg`](https://bazel.build/rules/lib/builtins/Args#use_param_file). " + | ||
| "The `tool` has to support reading arguments from the file for this to work.", | ||
| default = "", | ||
| ), |
Collaborator
There was a problem hiding this comment.
I had hard time understanding this and I needed to open Bazel's documentation. Although I used the functionality before.
I'd suggest just pasting the Bazel's doc here. Maybe adding that param files are only used if the attribute is set.
A format string with a single "%s". If the args are spilled to a params file then they are replaced with an argument consisting of this string formatted with the path of the params file.
For example, if the args are spilled to a params file "params.txt", then specifying "--file=%s" would cause the action command line to contain "--file=params.txt".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows to use
run_binaryin the case when the size of the command line can grow longer than the maximum size allowed by the system. We're currently hitting command line limits in our build setup.Implementation inspired from Scala rules.