You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Go package containing "expr.go" and "expr_test.go" In the test, all references to symbols in "expr.go" are unresolved.
This is using a single-module package with the content root at $GOPATH and one src directory named "src". Previously I had a module's content root at the same directory as the source files, and it worked.
The text was updated successfully, but these errors were encountered:
That's how it should work. Unfortunately it was tedious to have the completion / resolving work based only on existing *.a packages. Right now for this to work we need the sources. And the sources should be in the proper places usually.
Oops, let me explain better. My source files have always been in the right places, relative to $GOPATH. The difference is just in the IntelliJ module configuration.
When I select File->Project Structure and click on a Go module, I would expect that I can click "Add content root" and put it anywhere I want. Then browse in the directory tree (on the right hand side) to find the "src" directory, right-click and select "Sources". Then when resolving Go symbols, IntelliJ should look for directories marked "Sources" or "Test Sources" and resolve paths from there. (This is based on how it works for Java modules.)
I think what might be happening instead is that it starts from content roots and source root settings are ignored?
I have a Go package containing "expr.go" and "expr_test.go" In the test, all references to symbols in "expr.go" are unresolved.
This is using a single-module package with the content root at $GOPATH and one src directory named "src". Previously I had a module's content root at the same directory as the source files, and it worked.
The text was updated successfully, but these errors were encountered: