Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bufimagemodify exports #2668

Merged
merged 2 commits into from
Dec 15, 2023
Merged

Conversation

oliversun9
Copy link
Contributor

@oliversun9 oliversun9 commented Dec 15, 2023

This PR makes two changes that unblocks other repos that depend on bufimagemodify:

  • Add ModifyXYZ to bufimagemodify to allow modifying only some options.
    • Technically this can be done by exposing some GetDisablesForOtherOptions and the caller can call GetDisablesForOtherOptions(fileOpionA, fileOpionB) to modify only A and B, but this operates on the assumption that no new file options will be added to the list of file options in managed mode.
  • Add option ModifyPreserveExisting (this was a flag in v1, but not used by the CLI), which tells Modify[XYZ] not to modify an option if it's already set in the proto file.

TODO: Testing in this package needs to be revamped, especially after these functions are added.

@oliversun9 oliversun9 merged commit e93e015 into bufmod Dec 15, 2023
@oliversun9 oliversun9 deleted the osun/update-bufimagemodify-exports branch December 15, 2023 20:10
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