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

Unable to install md2roff-bin binary, locally or in CI/CD. #2610

Open
davidnewhall opened this issue Sep 10, 2020 · 7 comments
Open

Unable to install md2roff-bin binary, locally or in CI/CD. #2610

davidnewhall opened this issue Sep 10, 2020 · 7 comments
Labels

Comments

@davidnewhall
Copy link

Command attempted:

$ go get -u github.com/github/hub/md2roff-bin

What happened:

$ go get -u github.com/github/hub/md2roff-bin
# github.com/github/hub/md2roff
/go/src/github.com/github/hub/md2roff/renderer.go:16:21: undefined: blackfriday.NoIntraEmphasis
/go/src/github.com/github/hub/md2roff/renderer.go:17:3: undefined: blackfriday.FencedCode
/go/src/github.com/github/hub/md2roff/renderer.go:18:3: undefined: blackfriday.SpaceHeadings
/go/src/github.com/github/hub/md2roff/renderer.go:19:3: undefined: blackfriday.AutoHeadingIDs
/go/src/github.com/github/hub/md2roff/renderer.go:20:3: undefined: blackfriday.DefinitionLists
/go/src/github.com/github/hub/md2roff/renderer.go:55:57: undefined: blackfriday.Node
/go/src/github.com/github/hub/md2roff/renderer.go:58:57: undefined: blackfriday.Node
/go/src/github.com/github/hub/md2roff/renderer.go:61:56: undefined: blackfriday.Node
/go/src/github.com/github/hub/md2roff/renderer.go:61:89: undefined: blackfriday.WalkStatus
/go/src/github.com/github/hub/md2roff/renderer.go:150:24: undefined: blackfriday.Node
/go/src/github.com/github/hub/md2roff/renderer.go:150:24: too many errors

More info:

$ go version
go version go1.14.3 darwin/amd64

I used to be able to go run and go get and go install this CLI tool from my mac's terminal as well as in Jenkins CI pipelines. Lately, my builds have been failing with the error shown above. I've tried a few different things, but I'm just not sure what I'm missing. How do I build and install the md2roff-bin binary in a CI environment if this method is no longer going to work? Perhaps this is a bug? I'm really just not sure what happened. Thank you!

@mislav
Copy link
Owner

mislav commented Sep 11, 2020

I'm not sure what happened either! But I also did not know that anyone was using these packages externally in their projects.

@davidnewhall
Copy link
Author

davidnewhall commented Sep 11, 2020

I use this tool to convert markdown files to man pages. example: https://github.com/golift/application-builder/blob/master/Makefile#L71-L79

I think the changes to /v2 and go modules broke the version of blackfriday being referenced. I think you need to update your go.mod in this repo to reference a newer version of blackfriday, specifically v2+. https://github.com/github/hub/blob/master/go.mod#L13

EDIT: Just ideas ^. I also saw your comments about the future of this project in other threads, so I wonder if I should just fork that app into another repo and maintain it myself. Thoughts?

@mislav
Copy link
Owner

mislav commented Sep 14, 2020

@davidnewhall I think your hunch is correct! I'll look into fixing the blackfriday dependency.

Would it help you if I had extracted md2roff into a separate repository and maintained it there?

@davidnewhall
Copy link
Author

I think maintaining that binary as a separate project would be very useful. I'll be using this app for years to come.

@davidnewhall
Copy link
Author

I forked the app here because most of my builds were failing, and I needed to move forward: https://github.com/davidnewhall/md2roff

The fix was to change the black friday import path to github.com/russross/blackfriday/v2 and update go.mod accordingly.

@davidnewhall
Copy link
Author

Would still like to push this package back to github. Should I crack open a PR?

@mislav
Copy link
Owner

mislav commented Jan 17, 2023

You're welcome to submit a PR to this repo 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants