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

amalgomate operation fails using Go 1.20 #186

Closed
nmiyake opened this issue Feb 9, 2023 · 1 comment · Fixed by #187
Closed

amalgomate operation fails using Go 1.20 #186

nmiyake opened this issue Feb 9, 2023 · 1 comment · Fixed by #187

Comments

@nmiyake
Copy link
Contributor

nmiyake commented Feb 9, 2023

  • Set local version of Go to be version 1.20
  • Clone the repository github.com/palantir/godel-okgo-asset-compiles
  • Run amalgomate with the arguments --config check.yml --output-dir generated_src --pkg amalgomatedcheck in that directory

What happened?

Failed with output:

Error: amalgomate failed for compiles: failed to repackage files specified in configuration: failed to rewrite imports for module &{Path:github.com/palantir/go-compiles Dir:/Volumes/git/go/src/github.com/palantir/godel-okgo-asset-compiles/vendor/github.com/palantir/go-compiles}: failed to walk directory /Volumes/git/go/src/github.com/palantir/godel-okgo-asset-compiles/generated_src/internal: failed to unmarshal JSON: go: finding module for package golang.org/x/tools
{
        "ImportPath": "golang.org/x/tools",
        "Match": [
                "golang.org/x/tools"
        ],
        "Incomplete": true,
        "Error": {
                "ImportStack": [],
                "Pos": "",
                "Err": "cannot query module due to -mod=vendor"
        }
}
: invalid character 'g' looking for beginning of value

What did you want to happen?

Operation should succeed (as it does when local Go version is set to 1.19).

@nmiyake
Copy link
Contributor Author

nmiyake commented Feb 9, 2023

This is due to a combination of 2 different issues caused by a change to go list in Go 1.20:

nmiyake added a commit that referenced this issue Feb 9, 2023
Handle behavior changes to "go list" that were made in Go 1.20
that broke amalgomate.

Fixes #186
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

Successfully merging a pull request may close this issue.

1 participant