Skip to content

Use py_binary with constants file, instead of arguments - #253

Open
furtib wants to merge 4 commits into
Ericsson:mainfrom
furtib:py-bin-per-file
Open

Use py_binary with constants file, instead of arguments#253
furtib wants to merge 4 commits into
Ericsson:mainfrom
furtib:py-bin-per-file

Conversation

@furtib

@furtib furtib commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Why:
I want to create a more organized, easily understandable alternative to #199.
The goal is to choose one of these two.

Since there is a limit on the length of the arguments we can pass to our scripts, and passing many arguments makes things complicated, I decided to replace expand_template with a bazel_constants.json file.
This way, we can pass any number of arguments in an organized manner to the Python script.

What:

  • Replaced the functionality of expand_template with a bazel_constant.json file for the per_file rule.

Addresses:
none

@furtib furtib self-assigned this Jun 29, 2026
@furtib furtib changed the title Use py_binary with constans file, instead of arguments Use py_binary with constants file, instead of arguments Jun 30, 2026
@furtib
furtib force-pushed the py-bin-per-file branch 2 times, most recently from a63caf3 to fc5b580 Compare July 4, 2026 16:40
@furtib
furtib marked this pull request as ready for review July 4, 2026 16:40
@furtib furtib added the enhancement New feature or request label Jul 4, 2026
@furtib
furtib requested a review from Szelethus July 4, 2026 16:41
@furtib
furtib force-pushed the py-bin-per-file branch from fc5b580 to a7129a3 Compare July 5, 2026 14:13
@furtib

furtib commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

It seems for this to work I will have rewrite the plist resolution test as a bazel py_test target, which depend on the py_binary from src.

@furtib
furtib force-pushed the py-bin-per-file branch from a483122 to 2279680 Compare July 20, 2026 11:19

@Szelethus Szelethus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not convinced by the superiority of this solution against #199. For one, constructing a json file for testing purposes sounds more troublesome.

What is your view on this? Which one would you prefer to see landed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants