-
Notifications
You must be signed in to change notification settings - Fork 602
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
go.mod in 1.5.2 is broken #491
Comments
Where? I don't see it: https://github.com/russross/blackfriday/blob/v1.5.2/go.mod#L1
The canonical import path of blackfriday v1 is |
I must have gotten the go.mod files confused. I think the repo encourages the use of gopkg.in, see: https://github.com/russross/blackfriday#installation I don't need blackfriday directly, but packr imports it: https://github.com/gobuffalo/packr/blob/master/go.sum#L105 I also tried
|
Thanks for providing additional information @F21, it's helpful.
I know it does for v2, but I didn't think that applied for v1. It's possible that something about v1.5.2 is incompatible with using
I've looked at packr source code, and I'm not seeing blackfriday imported anywhere in it. The only mention seems to be those 2 lines in go.sum file. @markbates, do you know why it's showing up there? Perhaps it was used before, but isn't now, and /cc @rtfb @markbates |
@dmitshur Thanks for investigating! I also went through packr's directly imported dependencies but was not able to find any references to blackfriday. However, even if it was not used, I am still baffled why go mod breaks: |
It’s not being used by packer but it could be coming in through a transitive dep somewhere. |
It seems to be required through: |
I had posted this to @F21 in slack earlier, but also posting here. It looks like blackfriday is coming in via The
From
And https://github.com/gobuffalo/github_flavored_markdown/blob/v1.0.0/main.go#L30 |
So hopefully that answers the question from @dmitshur:
In general, as far as I understand, I think the go tooling in 1.11 will complain if there is a mis-match between the import path used in an import statement (e.g., |
And sorry for the multiple posts, but as far as I understand it, the module path (as used in the In this case, it sounds like at least v1.5.2 of blackfriday wants to be known as |
We only maintain a fork because this repo doesn’t build cleanly with go get, dep, and go modules. Using gopkin has solved the problem for us. I don’t understand why it became a problem suddenly. Things were working earlier today just fine. It’s Sunday so I don’t know if there’s been a release of this library that could’ve caused the problem or if it’s something else. |
Sorry, apologies. We maintain a fork of Black Friday because it doesn’t build cleaning against this repo. We don’t use this repo directly. Apologies for the confusion. There are many issues talking about the same thing. |
One other tidbit. Note that:
I suspect this is likely because @F21 did a @markbates on the other hand is not seeing any issue on v1.5.1 of blackfriday, as far as I understand the comments here so far. v1.5.1 of blackfriday does not have a which means v1.5.1 would be more liberal about an unexpected import path used by a consumer. In other words, the As far as I am understanding things, if those are correct observations, then that would explain all the behaviors reported here, I think? |
Here's a ticket that helps explain the back story a bit more shurcooL/github_flavored_markdown#12 Basically it's this:
So we're importing |
@thepudds to solve the issue, for now, on our end we ventured blackfriday at the version that works as an That seems to fix the issue with the gobuffalo fork of GFM. |
Maybe the doc should recommend to import |
* russross/blackfriday#491 (comment) * updated deps * udpated deps * updated events * fixed race condition
Definitely. Import path The docs surely need updating, with explicit instructions on what to do with which tool. But if I'm reading this tread correctly, |
With Go1.11 Before Go1.11 we could use https://github.com/rsc/quote did the opposite, the import path must be I believe every app that use an import path with Last minor version of @thepudds you confirm ? |
Here is my personal understanding:
All that said:
CC @myitcv |
Two other more general comments. In general, there’s a special exemption in Go 1.11 modules system so that existing code that uses import paths starting with gopkg.in (such as gopkg.in/yaml.v1 and gopkg.in/yaml.v2) can continue to use those forms for their module paths and import paths even when opting in to modules. Also related to this general discussion here is the pre-existing convention of “import comments” and their relationship to modules, which is spelled out at the end of this quote from the documentation here: https://golang.org/cmd/go/#hdr-Import_path_checking
|
And sorry again for the multiple posts here, but regarding the comment #491 (comment) above from @rtfb:
I just wanted to also mention that Go versions 1.9.7+, 1.10.3+ and 1.11 have been updated so that code built with those releases can properly consume v2+ modules without requiring modification of pre-existing code. (I'm making a general comment here, and am setting aside for the moment any particular considerations or exceptions for |
Yeah, sorry for uneducated assertions. I wasn't aware that Go team did these compatibility changes, that comes as a very pleasant surprise. |
In my case I found that setting replace did it as a workaround:
My original build error was |
Here is the command:
|
Can a new v1 (1.5.3?) version be released to update |
Making that change would break far too many people. I don’t think it’s a change we can make. We should update the README to reflect the current reality better. |
The go.mod in 1.5.2 has the suffix
v1
, however, modules v1 and below do not need any version suffixes.I have a transitive dependency on v1.5.1, but go mod breaks:
The text was updated successfully, but these errors were encountered: