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

Fake file generation breaks project #692

Closed
apexskier opened this issue Feb 17, 2020 · 1 comment
Closed

Fake file generation breaks project #692

apexskier opened this issue Feb 17, 2020 · 1 comment

Comments

@apexskier
Copy link
Contributor

If I change the interface of a module, I start getting build errors for the autogenerated fake implementations, as I'd expect. However, if I regenerate these files and proceed, the freshly generated files break the project.

A minimal reproduction:

From the cli directory

> cd cli

A build succeeds

> opctl run build

Don't make any real changes for this example.

Regenerate the fake clicolorer implementation (this also will reproduce similarly for other fake implementations)

> rm internal/clicolorer/fake.go
> opctl run -a path=internal/clicolorer/cliColorer.go generate

Now, building fails and cli/internal/clicolorer/fake.go has about 278 changed lines.

> opctl run build

import cycle not allowed
package github.com/opctl/opctl/cli
	imports github.com/opctl/opctl/cli/internal/clicolorer
	imports github.com/opctl/opctl/cli/internal/clicolorer
can't load package: import cycle not allowed
package github.com/opctl/opctl/cli
	imports github.com/opctl/opctl/cli/internal/clicolorer
	imports github.com/opctl/opctl/cli/internal/clicolorer
@apexskier
Copy link
Contributor Author

apexskier commented Feb 18, 2020

chrisdostert pushed a commit that referenced this issue Mar 11, 2020
Image.Ref model should now be `nilable`
chrisdostert pushed a commit that referenced this issue Mar 11, 2020
Image.Ref model should now be `nilable`
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

No branches or pull requests

1 participant