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

drive-gen doesn't work with modules (default in go 1.17) #1127

Open
draeath opened this issue Oct 19, 2021 · 2 comments
Open

drive-gen doesn't work with modules (default in go 1.17) #1127

draeath opened this issue Oct 19, 2021 · 2 comments

Comments

@draeath
Copy link

draeath commented Oct 19, 2021

Environment variable GO111MODULE=off must be set when running go for drive and drive-gen in order for this to work.

Note that drive itself builds and runs fine without this (using modules), but drive-gen has hardcoded paths it seems and falls over if you try to use it after building this way. (initial chdir fails, and if you try to get clever and use symlinks, it fails with an exit status but no error text)

@draeath
Copy link
Author

draeath commented Oct 19, 2021

Additionally, if you run drive-gen after building with the variable set, it pulls down release 0.4.0 for some reason:

[draeath@ginnungagap go]$ bin/drive-gen 
go: downloading github.com/odeke-em/drive v0.4.0

To avoid this, you must provide the variable when running drive-gen as well.

@draeath
Copy link
Author

draeath commented Oct 19, 2021

I do note that drive-gen seems to populate an incorrect version string though?

[draeath@ginnungagap drive]$ ~/go/bin/drive version
drive version: 0.3.9.1
Commit Hash: 'bede608f250a9333d55c43396fc5e72827e806fd'
Go Version: go1.17.2
OS: linux/amd64
BuildTime: 2021-10-19 16:43:54.610897106 -0400 EDT m=+0.007806792

[draeath@ginnungagap drive]$ pwd
/home/draeath/go/src/github.com/odeke-em/drive

[draeath@ginnungagap drive]$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

[draeath@ginnungagap drive]$ git rev-parse master
bede608f250a9333d55c43396fc5e72827e806fd

0.4.0 is old news, so where is this 0.3.9.1 coming from?

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

1 participant