-
Notifications
You must be signed in to change notification settings - Fork 399
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
[modules] Dependent command packages can now be built with ko #154
Conversation
cc #152 |
I'm not sure I understand what this is trying to achieve. Is the effect that you can |
whoops needs a rebase - one minute |
Thus if you have a (in)direct command package as a dependency say `myhost.com/go/package/cmd/run` you can now publish this with the following ko command ko publish myhost.com/go/package/cmd/run
Failure in CI is go1.12
1.12 is EOL so I made #156 |
@imjasonh If I'm reading the description correctly, this is the |
modules.deps[info.Path] = &info | ||
|
||
if info.Main { | ||
modules.main = &info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't we hit N of these? Which one wins?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there's only one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main != package main
but specifically "main module" = root module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's not confusing at all 🙄
Ok, so reading through the change, I want to make sure I understand... With my change, a vendored main module Since in @dprotaso is that right? |
This unblocks |
I wonder, would simply having |
🤷♂️ |
This just makes me want to deprecated non- |
Thus if you have a (in)direct command package as a dependency
say
myhost.com/go/package/cmd/run
you can now publish thiswith the following ko command
This follows go's module/vendor semantics. Thus go1.14 by default will use vendored modules. With go1.13 you need the explicit flags to use vendored deps
$ GOFLAGS="-mod=vendor" ko publish myhost.com/go/package/cmd/run
Subsequently in yaml files you can drop the superfluous prefixes
ie. this (in a non-module world)
becomes this in the module world