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 using go mod #7

Closed
jasin opened this issue Jun 17, 2019 · 4 comments
Closed

error using go mod #7

jasin opened this issue Jun 17, 2019 · 4 comments

Comments

@jasin
Copy link

jasin commented Jun 17, 2019

I'm getting an error while using go mod with an import declaration for bfchroma
From what I can tell go.mod file contains the line

require "github.com/russross/blackfriday v2.0.0+incompatible

this is obvious not version 2.0.1. I don't understand what's wrong exactly. If this is a blackfriday issue, I will gladly take it up with them. Figured I'd start here since this is the package that is causing the error.

2019/06/17 12:21:53 ERROR ▶ 0066 Failed to build the application: go: downloading gopkg.in/russross/blackfriday.v2 v2.0.1 go: gopkg.in/russross/blackfriday.v2@v2.0.1: go.mod has non-....v2 module path "github.com/russross/blackfriday/v2" at revision v2.0.1

@Depado
Copy link
Owner

Depado commented Jun 18, 2019

Hey,
So first of all I've had a whole bunch of issues related to this.
Now bfchroma uses this directive in the go.mod file:

replace gopkg.in/russross/blackfriday.v2 => github.com/russross/blackfriday/v2 v2.0.1

So in the bfchroma code I'm using the gopkg.in notation so that people that are not using modules can still go get the code. People using go modules should see no difference though, so I don't understand why you're facing an issue now.

Can I see your go.mod file? Or at least the section that requires both bfchroma and blackfriday?
Note that blackfriday developers recommend using the gopkg.in notation. I don't know why though.

@Depado
Copy link
Owner

Depado commented Jun 18, 2019

So I've just tested it again, and indeed the error shows up.
Simply add the directive

replace gopkg.in/russross/blackfriday.v2 => github.com/russross/blackfriday/v2 v2.0.1

to your go.mod and tell me if that works.

@jasin
Copy link
Author

jasin commented Jun 18, 2019

Yeah that works, I really have no idea why that is required, seems like maybe an issue with blackfriday. But thanks for the help

@jasin jasin closed this as completed Jun 18, 2019
@Depado
Copy link
Owner

Depado commented Jun 18, 2019

Honestly I thought that was not needed since I already put that in the go.mod of bfchroma.
Guess I still have to learn some things about go modules 🤷‍♂️

Thanks for reporting the issue anyway, have a gif

hello

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

2 participants