gobuffalo / cli

The Buffalo CLI
19 stars 24 forks source link

`buffalo fix` omits dot import while it fix `grift` import (maybe for all?) #203

Closed sio4 closed 2 years ago

sio4 commented 2 years ago

Thank you @saurori for reporting the issue on buffalo fix for grift. I am filing the issue here to track them here.

1) Running buffalo fix replaces imports . "github.com/markbates/grift/grift" with "github.com/gobuffalo/grift/grift" missing the . 2) Documentation still refers to markbates repo: https://gobuffalo.io/documentation/guides/tasks/

Originally from slack channel: https://app.slack.com/client/T029RQSE6/C3MSAFD40/thread/C3MSAFD40-1658265859.981439

sio4 commented 2 years ago

Found the root cause. AddImport() should be replaced with AddNamedImport(). trying to find a test case for it...

https://github.com/gobuffalo/cli/blob/e5eb75486cde4174ef6a59d7d94a39e211899861/internal/genny/fix/imports.go#L104-L107

sio4 commented 2 years ago

Hi @saurori, fix for the issue is ready and waiting for review and merge.

Thanks again for finding and reporting the issue! also please kindly check the result once it is released!

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 5 days with no activity.

sio4 commented 2 years ago

For the document, see gobuffalo/docs#692