-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
"could not load export data" on SECOND and future runs only #646
Comments
Ah, got it. I can reproduce by adding e.g. To reproduce again, change the integer, reinstall, rerun make lint, etc. |
If I add
The linter also succeeds - no errors. Please let me know if I need to report this upstream, I'm not sure where exactly the issue lies. |
Here's the contents of pkg: &packages.Package{
ID: "github.com/meterup/provision/src",
Name: "provision",
PkgPath: "github.com/meterup/provision/src",
Errors: nil,
GoFiles: nil,
CompiledGoFiles: nil,
OtherFiles: nil,
ExportFile: "",
Imports: {
},
Types: (*types.Package)(nil),
Fset: &token.FileSet{
mutex: sync.RWMutex{},
base: 131075,
files: {
&token.File{
set: &token.FileSet{(CYCLIC REFERENCE)},
name: "$GOROOT/src/internal/nettrace/nettrace.go",
base: 1,
size: 65536,
mutex: sync.Mutex{},
lines: {0},
infos: nil,
},
&token.File{
set: &token.FileSet{(CYCLIC REFERENCE)},
name: "$GOROOT/src/unicode/utf8/utf8.go",
base: 65538,
size: 65536,
mutex: sync.Mutex{},
lines: {0},
infos: nil,
},
},
last: &token.File{
set: &token.FileSet{(CYCLIC REFERENCE)},
name: "$GOROOT/src/unicode/utf8/utf8.go",
base: 65538,
size: 65536,
mutex: sync.Mutex{},
lines: {0},
infos: nil,
},
},
IllTyped: true,
Syntax: nil,
TypesInfo: (*types.Info)(nil),
TypesSizes: &types.StdSizes{WordSize:8, MaxAlign:8},
} |
I can reproduce the problem locally. I'll let you know once I know more. |
What triggers the problem is the fact that your Go package doesn't have any files that aren't In either case, using the dummy file sounds like a decent enough workaround right now; I'm planning on having the bug fixed one way or another next week. |
Ok is there an x/tools or golang/go issue I can also follow? |
There is not. In the meantime, I'll work around the issue in staticcheck. |
I have a package that only contains these files:
src/required_dependencies.go
And this file:
src/regression_test.go
The first time I recompile Go, install staticcheck, and install x/tools,
staticcheck ./...
passes.The second time I run
staticcheck ./...
it fails.Frustratingly, I've been trying to reproduce the exact conditions where I can get it to pass, and it's difficult. It's some combination of:
The text was updated successfully, but these errors were encountered: