-
Notifications
You must be signed in to change notification settings - Fork 96
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 not working (canonical imports wrong?) #127
Comments
Hmm; I partially solved this, but just realized I walked right into the fun v2/2.0.0 "problem" with modules. I'm going to need to move everything to a |
I've not been paying close attention - is it workable to tag a v1.0.4 ?
…On Tue, Sep 14, 2021 at 7:34 AM Phil Estes ***@***.***> wrote:
Hmm; I partially solved this, but just realized I walked right into the
fun v2/2.0.0 "problem" with modules. I'm going to need to move everything
to a v2/ and tag another v2 beta with those changes so you can actually go
get the v2.0.0 (main dev branch) content instead of the go tools picking
v1.0.3 (which doesn't have the redirect fix for urfave).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKWAVB53ZUNV4VVT4XOLADUB5MNXANCNFSM5D4SFZZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
So, I think I can do a I did make it possible for |
I wanted to list it as a dep of a module (via the tools.go hack), but if `go install` doesn't work, I am not sure if will work as I hope.
|
👋 wrote an answer that I later deleted since I missed the In any case, hope this could be useful somehow 🤷♂️ |
Update: Interestingly, if you add the same Just updated my sample repo to reflect this. |
It still doesn't work:
I added :( |
this works |
If you are wanting to rely on 1.0.x I can try and work up a The v1 code was still using |
I just want one that works - if you tell me that is v2, I'll try it :)
…On Wed, Sep 15, 2021 at 8:56 AM Phil Estes ***@***.***> wrote:
If you are wanting to rely on 1.0.x I can try and work up a go.mod there
and cut a v1.0.4 release; as @marcosnils <https://github.com/marcosnils>
said, so far I was focused on trying to fix it for the main branch which
is now the v2 codebase.
The v1 code was still using vndr and never supported Go modules properly
as that was several years ago.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKWAVEEQQG3UGH5YKGRBVTUCC62XANCNFSM5D4SFZZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Is there a root cause for this conflicting import name which could be
merged back to eliminate this `replace` ?
…On Wed, Sep 15, 2021 at 9:04 AM Tim Hockin ***@***.***> wrote:
I just want one that works - if you tell me that is v2, I'll try it :)
On Wed, Sep 15, 2021 at 8:56 AM Phil Estes ***@***.***>
wrote:
> If you are wanting to rely on 1.0.x I can try and work up a go.mod there
> and cut a v1.0.4 release; as @marcosnils <https://github.com/marcosnils>
> said, so far I was focused on trying to fix it for the main branch which
> is now the v2 codebase.
>
> The v1 code was still using vndr and never supported Go modules properly
> as that was several years ago.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#127 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABKWAVEEQQG3UGH5YKGRBVTUCC62XANCNFSM5D4SFZZA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
|
Hmm... The
But I am still missing something - how do I build it?
Other (non-v2) tools work:
|
^ if you run that command inside your |
I feel dumb. THanks.
…On Wed, Sep 15, 2021 at 9:31 AM Marcos Nils ***@***.***> wrote:
But I am still missing something - how do I build it?
go install github.com/estesp/manifest-tool/v2/cmd/manifest-tool
^ if you run that command inside your tools project, it'll use the
version you have defined in your go.mod and put the manifest-tool binary
in your $GOPATH/bin directory.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKWAVEX7XTNH7JGY4PSIU3UCDC6TANCNFSM5D4SFZZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
At least I'm not the only one. 😂 Thanks @marcosnils for your help and example here! |
We all feel the same 🤗 |
I will repeat, so it doesn't get lost: Is there a root cause for this conflicting import name which could be merged back to eliminate this |
hey Tim, the The main reason that you're getting the import name error when doing AFAIK the right way to get rid of that replace directive is to either bump |
It's complicated; think the main issue is that codegansta/cli added a go.mod with the new name (urfave/cli) without updating the major version. Versions until v1.20 had no go.mod, so could be found under the old name; https://pkg.go.dev/github.com/codegangsta/cli?tab=versions However, because those versions didn't have a go.mod, it appears they're also indexed under the new name; https://pkg.go.dev/github.com/urfave/cli?tab=versions Because go modules require SemVer (and consider versions to be SemVer if it can be parsed as such), it looks for "latest v1.x", but the urfave/cli introduced a breaking change; it added a go.mod declaring the new name for the project in the go.mod. Changing the module name is a breaking change so requires a major version update (v2), and the import paths to be updated accordingly. That ship has sailed for the urfave/cli project, as there's already a v2 (and v1 releases with a go.mod) So yes, I think the only way to allow using the v1.x versions of manifest-tool with go modules enabled, is to rename the import paths in a v1.0.x release. Or use the v2 (which should work with go modules) ( |
With v2.0.5 (just released), you can now install the
You can also create a new |
Weird:
|
Huh, blowing away go.mod and starting fresh makes it work. |
The text was updated successfully, but these errors were encountered: