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

Wrong package name gives infinite errors #4

Closed
llimllib opened this issue Aug 11, 2022 · 3 comments
Closed

Wrong package name gives infinite errors #4

llimllib opened this issue Aug 11, 2022 · 3 comments

Comments

@llimllib
Copy link
Contributor

If you use package main instead of package build in a go file in app/pkg, while the server is running in dev mode, I get an infinite list of:

build/cmd/myproject/main.go:18:2: import "example/myproject/build" is a program, not an importable package
build/cmd/myproject/main.go:18:2: import "example/myproject/build" is a program, not an importable package
build/cmd/myproject/main.go:18:2: import "example/myproject/build" is a program, not an importable package
  • Is it possible for us to generate a better error?
  • The dev server should throw the error once and then not throw it again until something has changed
@paulsmith
Copy link
Contributor

Right now any user-contributed code in app/pkg has to be package build by convention. Will open a new issue to track either documenting this or making it configurable.

@paulsmith
Copy link
Contributor

Is it possible for us to generate a better error?

Currently, building the generated Pushup app is a black box - would like to wrap it, perhaps by inspecting stderr.

The dev server should throw the error once and then not throw it again until something has changed

Agreed, basically any error causes this loop.

@paulsmith
Copy link
Contributor

I think recent changes (specifically baa912f) fixed this. I am no longer able to recreate original buggy infinite loop errors by supplying the wrong package name in dev reload mode.

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

2 participants