Skip to content

feat: implement mutate command#199

Open
thesayyn wants to merge 4 commits intovbatts:mainfrom
thesayyn:update
Open

feat: implement mutate command#199
thesayyn wants to merge 4 commits intovbatts:mainfrom
thesayyn:update

Conversation

@thesayyn
Copy link
Contributor

No description provided.

@thesayyn
Copy link
Contributor Author

thesayyn commented Oct 24, 2023

@vbatts This is a pretty gross version of implementing the update command. Looking for feedback. I wish there was an API that would allow me to mutate the tree and understand the semantics of a mtree more.

@alexeagle
Copy link

@vbatts I'm interested in getting this released so Bazel users have a strip_prefix feature, have any time to give some feedback on this one? 🙇🏻

@vbatts
Copy link
Owner

vbatts commented Nov 4, 2023

@vbatts This is a pretty gross version of implementing the update command. Looking for feedback. I wish there was an API that would allow me to mutate the tree and understand the semantics of a mtree more.

understood. I'm trying to understand if the output of the --strip-prefix is acting as expected.
As a first feedback on the experience, perhaps if you would update this OP message to describe the expected behaviour.
Additionally, in likeness to the validate command, can we default to output the mutated hierarchy to os.Stdout, and maybe add a flag to write to a file if provided? (it's a bit unexpected that it just in-place modifies the file provided.

@vbatts
Copy link
Owner

vbatts commented Nov 4, 2023

And I'm brainstorming about your comment on how to help understand the semantics of the mtree better.

@alexeagle
Copy link

Ping! @thesayyn I think it's your turn here :)

@thesayyn
Copy link
Contributor Author

thesayyn commented Dec 12, 2023

Sorry this slipped away.

@alexeagle
Copy link

I think @thesayyn is too underwater to get back to this at any point. Also the maintainer of bazel's rules_pkg found a new spot at Google so it's not going away. That means the urgency here got lower.

I've tried to sell @rickvanprim on the idea of picking up the PR, but I know it's an obscure hobby project.

Maybe we should just close this and open an issue or discussion to suggest the feature without "licking the cookie" of attempting an implementation.

@vbatts
Copy link
Owner

vbatts commented Mar 8, 2024

ah sorry. things have been so busy on my side as well, else I would've taken this over

@alexeagle
Copy link

Sahin suggested that maybe on the Bazel side we can just hook up a fixture to run hermetic awk interpreter, then write the mtree mutations in awk scripts

@vbatts
Copy link
Owner

vbatts commented Mar 14, 2024

doing things with awk sounds involved...
looking again, and this branch builds fine locally, and all the checks pass with act. I'm not see a way to rerun the checks on GH.
I may carry this to a new PR to check again.

@vbatts vbatts mentioned this pull request Mar 14, 2024
@alexeagle
Copy link

If you imagine an engineer is equally comfortable coding in AWK and Go, then I think the former is the more expressive language that's purpose-built for basic manipulation of lines in a file. The problem for us is simply that we want to be hermetic in Bazel, and don't already have a toolchain to get a specific release of awk we can rely on everywhere.

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.

3 participants