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

rwynn/mgo module causes build error #186

Closed
chanpl opened this issue Mar 14, 2019 · 8 comments
Closed

rwynn/mgo module causes build error #186

chanpl opened this issue Mar 14, 2019 · 8 comments

Comments

@chanpl
Copy link

chanpl commented Mar 14, 2019

Hi rwynn,

Our company's artifactory is recently pointing to GoCenter for better security and immutability. However, I found your own rwynn/mgo module has problem in publishing to GoCenter (See: https://gocenter.jfrog.com/github.com~2Frwynn~2Fmgo/versions). If this is not allowed by GoCenter, can we just use github.com/globalsign/mgo directly?

Basically, I'm asking to remove this line from go.mod:

replace github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 => github.com/rwynn/mgo v0.0.0-20190130173337-9b1257fb3190

@chanpl chanpl changed the title Personal mgo module causes build error rwynn/mgo module causes build error Mar 14, 2019
@rwynn
Copy link
Owner

rwynn commented Mar 14, 2019

Hi @chanpl,

I would like to remove the replace directive but currently it serves the purpose of fixing what I consider some critical issues/limitations with change streams in globalsign/mgo. The replace is just a fork of globalsign/mgo where I have applied the following PR that is yet to be merged:

globalsign/mgo#326

The reason I did not change the import statements is that I would hope this PR gets merged and the fork is not necessary going in the future.

Do you know why this could be failing in GoCenter? The go tooling does not have a problem with it so I'm curious why it doesn't work with GoCenter.

One option for you until this gets sorted out would be to use a specific version of monstache before this change. It think that would be v4.13.3 or v3.20.3.

@chanpl
Copy link
Author

chanpl commented Mar 17, 2019

Hi @rwynn

I am sorry that I don't know why that was failing in GoCenter, but I am asking, hopefully will be answered. It's also good to hear that you're planning to drop the replace. Since the root cause of error in GoCenter is still unknown, it might be failing again after merging. But this shouldn't a reason to block the merge :-)

Thanks man, v4.13.3 works for me at this moment.

@chanpl
Copy link
Author

chanpl commented Mar 18, 2019

Hi @rwynn

From JFrog's reply: jfrog/gocenter#7

I guess, we need to include "github.com/globalsign/mgo" in the go.mod. I also try to get the module locally, it returns the same error:

$ export GO111MODULE=on
$ go get github.com/rwynn/[email protected] go: finding github.com/rwynn/mgo v0.0.0-20190203195949-55e8fd85e7e2 go: github.com/rwynn/[email protected]: parsing go.mod: unexpected module path "github.com/globalsign/mgo" go: error loading module requirements

@rwynn
Copy link
Owner

rwynn commented Mar 18, 2019

Do you mean change it to match rwynn/mgo?

I think it’s already pointed to globalsign since I didn’t change go.mod.

@rwynn
Copy link
Owner

rwynn commented Mar 18, 2019

@chanpl when you get a chance can you try to build master again? I think it might be ok now since I changed the go.mod file in the replace directive's target to be module path github.com/rwynn/mgo instead of globalsign.

@chanpl
Copy link
Author

chanpl commented Mar 20, 2019

Hi @rwynn,

The latest commit in master is working now, could you release a new version for that?

Actually, it didn't work at first because GoCenter only uploads commit hash for the first time. After that, they just detect new tags. Thanks for the help from JFrog, the latest commit of rwynn/mgo is now also available on GoCenter. Detail: jfrog/gocenter#7

@rwynn
Copy link
Owner

rwynn commented Mar 21, 2019

@chanpl please try the latest release. Thanks.

@chanpl
Copy link
Author

chanpl commented Mar 21, 2019

Hi @rwynn
Yea, it works, thanks.

@chanpl chanpl closed this as completed Mar 21, 2019
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