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

cobra/doc has some problems with dep (blackfriday major version change) #519

Closed
zevdg opened this issue Aug 24, 2017 · 5 comments
Closed

Comments

@zevdg
Copy link

zevdg commented Aug 24, 2017

The root cause of the problem is cpuguy83/go-md2man#28

The owner of blackfriday kindly left the master branch of the repo on the v1 API so it wouldn't break go get. However, dep tries to do the actual right thing and defaults by grabbing the latest tagged release (v2.0) instead of whatever is on the master branch unless there is a constraint somewhere that tells it not to. Since go-md2man doesn't support the 2.0 api yet, this causes breakage. I'm able to add a constraint in my own project to fix it, but obviously, we don't want every app to have to add this constraint. Ideally, the root issue above should be the place to fix this, but a constraint could be added here until the issue is resolved upstream.

@bpicode
Copy link
Contributor

bpicode commented Aug 25, 2017

Ran into the same problem. Have you tried the latest version of dep? They merged proper govend support in golang/dep#1040. In theory https://github.com/cpuguy83/go-md2man/blob/master/vendor.yml should pick the right revision of blackfriday.

@zevdg
Copy link
Author

zevdg commented Aug 26, 2017

oh wow. That was merged in earlier the same day. What timing. Fortunately, upstream is open to fixing this problem at its source, so I'll just withdraw this once cpuguy83/go-md2man#29 gets merged.

@bpicode
Copy link
Contributor

bpicode commented Aug 27, 2017

Cool. Maybe it is also worth starting a discussion on whether cobra should start caring about proper dependency management.

@zevdg
Copy link
Author

zevdg commented Aug 28, 2017

Agreed. Now is a pretty good time to jump on the dep bandwagon. The manifest and lock files have been declared officially stable, so there's no real reason not to. The only complication I can forsee for cobra is there is currently no great way to ensure that the user's cobra cli was built using the same version of cobra that their application is importing ( golang/dep#221 ). That said, you didn't have any way of ensuring that pre-dep either, so I wouldn't expect it to be a blocker for dep adoption.

Closing this particular issue now that blackfriday isn't a problem anymore.

@ncw
Copy link
Contributor

ncw commented Sep 21, 2018

I've been having this problem with rclone and go mod.

This is the solution just in case anyone else has the same problem

go get -u github.com/russross/blackfriday@v1.5.1  

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