-
Notifications
You must be signed in to change notification settings - Fork 43
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
use gopkg.in to make buildable with go modules and dep #20
Conversation
Thanks for reporting this and sending the PR. (Please ignore the CI failure, it happens due to a current Travis CI issue.) I'd like to investigate and understand the issue better. Can you post the commands for building this with modules in Go 1.11 and the output you get? Is it just
According to https://github.com/russross/blackfriday#versions, the canonical import path of blackfriday v1 is |
I'm still trying to get a simple reproducible test case for modules. They don't quite work in what I could predictable way yet. :) When working on getting Buffalo to use Go modules I do occasionally get this:
Again, still working on a small repo test case. As for package main
import _ "github.com/shurcooL/github_flavored_markdown"
func main() {} $ dep init $ go build
# github.com/gobuffalo/gfmd/vendor/github.com/shurcooL/github_flavored_markdown
vendor/github.com/shurcooL/github_flavored_markdown/main.go:71:7: const initializer blackfriday.EXTENSION_NO_INTRA_EMPHASIS | blackfriday.EXTENSION_TABLES | blackfriday.EXTENSION_FENCED_CODE | blackfriday.EXTENSION_AUTOLINK | blackfriday.EXTENSION_STRIKETHROUGH | blackfriday.EXTENSION_SPACE_HEADERS | blackfriday.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK is not a constant
vendor/github.com/shurcooL/github_flavored_markdown/main.go:71:20: undefined: blackfriday.EXTENSION_NO_INTRA_EMPHASIS
vendor/github.com/shurcooL/github_flavored_markdown/main.go:72:2: undefined: blackfriday.EXTENSION_TABLES
vendor/github.com/shurcooL/github_flavored_markdown/main.go:73:2: undefined: blackfriday.EXTENSION_FENCED_CODE
vendor/github.com/shurcooL/github_flavored_markdown/main.go:74:2: undefined: blackfriday.EXTENSION_AUTOLINK
vendor/github.com/shurcooL/github_flavored_markdown/main.go:75:2: undefined: blackfriday.EXTENSION_STRIKETHROUGH
vendor/github.com/shurcooL/github_flavored_markdown/main.go:76:2: undefined: blackfriday.EXTENSION_SPACE_HEADERS
vendor/github.com/shurcooL/github_flavored_markdown/main.go:77:2: undefined: blackfriday.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK
vendor/github.com/shurcooL/github_flavored_markdown/main.go:93:2: undefined: blackfriday.Html |
The intention is to make it so that it's possible to import and use this package from within Go modules (in addition to the well-supported GOPATH workspace mode), and have it build without users having to manually specify that github_flavored_markdown requires blackfriday v1. Use the recently created v1.5.2 tag. Only specify the blackfriday version in go.mod and go.sum; others are unspecified to avoid the added burden of maintaining and updating them. Closes #20.
Okay, I can reproduce with modules. I have an alternate fix in mind, please take a look at #22 and let me know what you think. |
That fixes it for modules, but not for dep.
…--
Mark Bates
On Sep 23, 2018, 7:18 PM -0400, Dmitri Shuralyov ***@***.***>, wrote:
Okay, I can reproduce with modules. I have an alternate fix in mind, please take a look at #22 and let me know what you think.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The intention is to make it so that it's possible to import and use this package from within Go modules (in addition to the well-supported GOPATH workspace mode), and have it build without users having to manually specify that github_flavored_markdown requires blackfriday v1. Use the recently created blackfriday v1.5.2 tag. Only specify the blackfriday version in go.mod and go.sum; others are unspecified to avoid the added burden of maintaining and updating them. Fixes #12. Closes #20.
Wouldn't a [[constraint]]
name = "github.com/russross/blackfriday"
version = "<2.0.0" |
The intention is to make it so that it's possible to import and use this package from within Go modules (in addition to the well-supported GOPATH workspace mode), and have it build without users having to manually specify that github_flavored_markdown requires blackfriday v1. Use the recently created blackfriday v1.5.2 tag. Only specify the blackfriday version in go.mod and go.sum; others are unspecified to avoid the added burden of maintaining and updating them. Updates #12. Updates #20.
Currently when trying to use this package with either Go modules in
1.11
or in adep
environment, the package doesn't build. This change uses thegopkg.in
version of therussross/blackfriday
project to ensure that the correct version ofblackfriday
is used.