Skip to content

Adding function to execute Buildozer commands on a single in-memory file#1359

Merged
oreflow merged 3 commits intomainfrom
mini-dozer
May 30, 2025
Merged

Adding function to execute Buildozer commands on a single in-memory file#1359
oreflow merged 3 commits intomainfrom
mini-dozer

Conversation

@oreflow
Copy link
Collaborator

@oreflow oreflow commented May 5, 2025

A buildozer client are looking to execute the commands of buildozer on the content of a build file, in a service environment (without direct access to the file storage). The new function enables this by running the commands without accessing the file system.

@oreflow oreflow requested review from pmbethe09 and vladmos as code owners May 5, 2025 10:59
A buildozer client are looking to execute the commands of buildozer on the content of a build file, in a service environment (without direct access to the file storage). The new function enables this by running the commands without accessing the file system.
commands := commands.commands
_, _, absPkg, rule := InterpretLabelForWorkspaceLocation(opts.RootDir, target)
if label := labels.Parse(target); label.Package == stdinPackageName {
for _, cft := range commandsForFile.commands {
Copy link
Member

Choose a reason for hiding this comment

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

What's cft?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cft stands for commandsForTarget which is also the type of cft, so I believe it's the go-idiomatic name, though I'm not a big fan of the lack of information in it.

@oreflow oreflow enabled auto-merge (squash) May 30, 2025 09:13
@oreflow oreflow disabled auto-merge May 30, 2025 09:13
@oreflow oreflow merged commit 5199712 into main May 30, 2025
5 checks passed
@oreflow oreflow deleted the mini-dozer branch May 30, 2025 12:05
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