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

Patches that change packages or imports only #5

Open
abhinav opened this issue Apr 21, 2021 · 0 comments
Open

Patches that change packages or imports only #5

abhinav opened this issue Apr 21, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@abhinav
Copy link
Contributor

abhinav commented Apr 21, 2021

gopatch requires exactly one entity after the package name (if any) and imports.
Patches that affect only imports are not supported.

This fails:

@@
@@
-import "example.com/foo-go"
+import "example.com/foo"

We can work around this by "using" foo in the patch without changing it.

@@
@@
-import "example.com/foo-go"
+import "example.com/foo"

 foo

We should not have this requirement, and instead support patches that don't affect code beyond the imports and packages.

This is likely related to #4 where we plan to add support for multiple entities in a single diff.

@abhinav abhinav added the enhancement New feature or request label Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant