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

Error when go get github.com/posener/gitfs/cmd/gitfs #28

Closed
koddr opened this issue Jan 13, 2020 · 3 comments
Closed

Error when go get github.com/posener/gitfs/cmd/gitfs #28

koddr opened this issue Jan 13, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@koddr
Copy link

koddr commented Jan 13, 2020

Catch strange bug on v1.1.0 (I use Go v1.13.5):

$ go get github.com/posener/gitfs/cmd/gitfs

# github.com/posener/gitfs/fsutil
../.go/src/github.com/posener/gitfs/fsutil/diff.go:171:18: too many arguments in call to diff.Format
../.go/src/github.com/posener/gitfs/fsutil/diff.go:171:49: undefined: diff.OptSuppressCommon

Ok. Go to github.com/posener/gitfs/fsutil/diff.go:171:49 (link) and see:

// ...
d := diff.Format(string(aData), string(bData), diff.OptSuppressCommon())
// ...

Third arg for function diff.Format() is diff.OptSuppressCommon() and probably it's wrong.

@posener
Copy link
Owner

posener commented Jan 13, 2020

Thanks for reporting this!

It was supposed to be replaced with a forked version of the diff package.
I need to understand why this replace statement didn't work.

@posener posener added the bug Something isn't working label Jan 13, 2020
@posener posener changed the title [Bug] Error when go get github.com/posener/gitfs/cmd/gitfs Error when go get github.com/posener/gitfs/cmd/gitfs Jan 13, 2020
@posener
Copy link
Owner

posener commented Jan 13, 2020

Hey,
I think it might be Go module issue, I couldn't find anything in the docs. In the github issues, it seems like the replace directive should be only used for development: golang/go#31173.

I might make a fix on this repo, meanwhile you can use this workaround:

$ cd /tmp
$ git clone https://github.com/posener/gitfs
$ cd gitfs
$ go install ./cmd/gitfs

Sorry about that! :-)

@posener
Copy link
Owner

posener commented Jan 17, 2020

@koddr please update to v1.2.0, this is fixed now (worked around by changing posener/diff to its own module"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants