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

The outdated mod dependency would cause the version mismatch error. #14

Open
Calvin-Huang opened this issue May 26, 2023 · 2 comments
Open

Comments

@Calvin-Huang
Copy link
Contributor

Here is the error message when the project's go.mod mismatch to gorm-cli's gorm version.

> gorm-cli db:create_migration change_partner_store_id_typepanic: Open plugin filed. (plugin.Open("./migration/.plugins/connection"): plugin was built with a different version of package gorm.io/gorm/clause)
goroutine 1 [running]:
github.com/iKala/gorm-cli/migrate.NewDB()
        /Users/..../go/pkg/mod/github.com/i!kala/gorm-cli@v0.0.0-20230308011807-f9e560bab2f6/migrate/init_db.go:11 +0x9c
main.main()
        /Users/..../go/pkg/mod/github.com/i!kala/gorm-cli@v0.0.0-20230308011807-f9e560bab2f6/main.go:153 +0xb68

You have no choice but refer to this repo and verify the GORM version in the go.mod. I believe the project shouldn't stick to the CLI-tool's dependency version. It would be more efficient for me if there were auto-update feature or other method to disregard the underlying effort needed to keep up with the version.

@oxr463
Copy link
Contributor

oxr463 commented Oct 17, 2023

Can you please provide reproduction steps?

@tkennedy13
Copy link

Same issue. I'm running Go 1.23.2 with Gorm v1.9.16 (latest). All I had to do to reproduce this problem was install gorm-cli, create the .gorm-cli.yaml and run gorm-cli db:create_migration create_user or any other gorm-cli command.

$ gorm-cli db:create_migration create_user
panic: Open plugin filed. (plugin.Open("./migration/.plugins/connection"): plugin was built with a different version of package gorm.io/gorm/clause)

goroutine 1 [running]:
github.com/iKala/gorm-cli/migrate.NewDB()
        /go/pkg/mod/github.com/i!kala/gorm-cli@v0.0.0-20231019125029-0936e0e62ebc/migrate/init_db.go:11 +0x89
main.main()
        /go/pkg/mod/github.com/i!kala/gorm-cli@v0.0.0-20231019125029-0936e0e62ebc/main.go:153 +0xbda

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

3 participants