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

undefined: *.twirp.go #236

Closed
nhurwitz opened this issue May 7, 2020 · 4 comments
Closed

undefined: *.twirp.go #236

nhurwitz opened this issue May 7, 2020 · 4 comments

Comments

@nhurwitz
Copy link

nhurwitz commented May 7, 2020

(this might be related to #169)

I'm running go 1.13 using go mod. I see in my go vendor and go src the compiled *.twirp.go and *.pb.go files in the same package. However, when I try to build my source code, I'm able to use *.pb.go but not *.twirp.go even though they're colocated and should be available through the same import statement.

@nhurwitz
Copy link
Author

nhurwitz commented May 7, 2020

to elaborate, this will run

package main

import (
	"fmt"
	"github.com/foo-organization/schema/go/bar"
)

func main() {
	fmt.Println(bar.GetBarRequest{})
}

but this will result in ./main.go:10:14: undefined: upload.BarPathPrefix

package main

import (
	"fmt"
	"github.com/foo-organization/schema/go/bar"
)

func main() {
	fmt.Println(bar.BarPathPrefix)
}

I can see the compiled bar.twirp.go both in the vendor/ folder and in my $GOPATH/src

@dpolansky
Copy link
Contributor

Could you possibly make a tiny github repository with the setup you describe as a reproducer for this issue?

@nhurwitz
Copy link
Author

I'll try to get to it this weekend

@dpolansky
Copy link
Contributor

Closing this for now. Please leave a comment if you would like to revisit this.

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