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

go mod and replace directive does not work well when consumed as library #334

Closed
ramonskie opened this issue Mar 7, 2019 · 7 comments
Closed

Comments

@ramonskie
Copy link

when we consume om in our own go library above version 0.51.0
go mod will fail. because it won't inherent the replace directive.
which then result in a compile error due to a missing dependency
see line: https://github.com/pivotal-cf/om/blob/master/go.mod#L44

i think this can be solved by
removing the replace directive and use the folowing instead
go mod edit https://github.com/graymeta/stow@TheCommitHasYouWantToUse

refrence: golang/go#30354

@jtarchie
Copy link
Contributor

jtarchie commented Mar 8, 2019

I don't believe that would help at all. As upstream dependency's go.mod files don't appear to be honored at all.

So if you go get github.com/pivotal-cf/om, even though it has a go.mod file, the go get does nothing with it with you go.mod file.

@jtarchie
Copy link
Contributor

jtarchie commented Mar 8, 2019

Why are you inheriting om as a dependency, too? At the moment we make no library guarantees about the source code. Just the CLI.

@ramonskie
Copy link
Author

we are building an easy way to configure opsman+tiles
https://github.com/starkandwayne/om-configurator

@kcboyle
Copy link
Contributor

kcboyle commented Mar 8, 2019

It would really help us, you, (and other om consumers out!) if y'all could bug the stow team by giving a shout out to this issue (graymeta/stow#197). If we can get the associated PR accepted, this should solve your problem. As we don't seem to be able to get around the go.mod bug (that they don't see as a bug), this seems like a good solution) @ramonskie

@ramonskie
Copy link
Author

they have merged it.
can you update you go.mod as well?

@kcboyle
Copy link
Contributor

kcboyle commented Apr 25, 2019

we can. We are in the middle of fixing the CI at the moment, so feel free to submit a PR, or we should be able to get to it either today, tomorrow, or, at worst, sometime early next week.

@ramonskie
Copy link
Author

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

3 participants