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
{{ message }}
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.
I can run pkger -o some/nested/path and everything works just fine, generating some/nested/path/pkged.go with package main. However, if I run pkger -include /some/nested/path -o some/nested/path, I get errors because it doesn't correctly resolve that the /v10 suffix on the module declared in the go.mod file is the current directory, so it tries to go to github to get it.
2021/02/04 15:06:08 exit status 1: go: finding module for package github.com/thisisme/somerepo/v10
can't load package: package github.com/thisisme/somerepo/v10: module github.com/thisisme/somerepo@latest found (v7.0.23+incompatible), but does not contain package github.com/thisisme/somerepo/v10
From version 8, we have been explicitly declaring the module with the path element containing the major version, so the most recent version it can find without a /vN suffix is v7.0.23, which is tagged, but still uses the bare name for the module declaration. Since this module has a lot of directories and many files, running pkger without -include in order to include a single text file takes a remarkably long time. It's not the end of the world, but it would be better if it worked correctly with path-based go module versioning.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you are using go modules with versions specified via path and tag, pkger -include fails.
go.mod:
some/nested/path/main.go:
some/nested/path/file.txt:
I can run
pkger -o some/nested/path
and everything works just fine, generating some/nested/path/pkged.go with package main. However, if I runpkger -include /some/nested/path -o some/nested/path
, I get errors because it doesn't correctly resolve that the /v10 suffix on the module declared in the go.mod file is the current directory, so it tries to go to github to get it.From version 8, we have been explicitly declaring the module with the path element containing the major version, so the most recent version it can find without a /vN suffix is v7.0.23, which is tagged, but still uses the bare name for the module declaration. Since this module has a lot of directories and many files, running pkger without -include in order to include a single text file takes a remarkably long time. It's not the end of the world, but it would be better if it worked correctly with path-based go module versioning.
The text was updated successfully, but these errors were encountered: