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

Vanity url doesn't redirect to github repo #245

Closed
andig opened this issue Aug 25, 2023 · 5 comments
Closed

Vanity url doesn't redirect to github repo #245

andig opened this issue Aug 25, 2023 · 5 comments

Comments

@andig
Copy link

andig commented Aug 25, 2023

Discussed in #244. It would be nice to do so to improve discoverability of this repo.

@earthboundkid
Copy link

earthboundkid commented Sep 5, 2023

A related issue: github.com/imdario/mergo@v1.0.0 was "published", but it is broken because it is actually dario.cat/mergo@v1.0.0. When it goes to compile, the Go tool notices the mismatch between the module name and the URL and stops compilation, but it still picks up github.com/imdario/mergo@v1.0.0 during the Go module resolution time, unfortunately.

What should happen instead is that the dario.cat/mergo releases should be separate from the old github.com/imdario/mergo releases. Ideally, github.com/imdario/mergo@v1.0.1 would be published with a retraction of github.com/imdario/mergo@v1.0.0 and itself github.com/imdario/mergo@v1.0.1.

In any event, as a workaround, I have added exclude github.com/imdario/mergo v1.0.0 to my go.mod file and that keeps it upgrading smoothly for now, but I will need to add v1.0.1 etc. for each new version of mergo until the projects that I depend on which depend on mergo have all moved to the vanity URL.

@darccio
Copy link
Owner

darccio commented Sep 10, 2023

@carlmjohnson I'm not sure how the retraction would work. Would everybody have to revert to the github.com URL?

Keep in mind that I made this change to also switch my GitHub username.

@earthboundkid
Copy link

Because any version you tag ends up being available at both the old and new repo addresses, I'm not sure that there's any way to fix it. It would need to be published at just the old repo address but not the new one, and I'm not sure there's any way to do that.

@lzap
Copy link

lzap commented Sep 11, 2023

Just saw this during our project update, is this just a warning?

go: github.com/imdario/mergo@v1.0.0: parsing go.mod:
	module declares its path as: dario.cat/mergo
	        but was required as: github.com/imdario/mergo

@darccio
Copy link
Owner

darccio commented Sep 11, 2023

@carlmjohnson After some consideration, I won't release a retraction. I think the best way forward is - when mergo isn't a direct dependency in your project - to recommend using replace instead:

replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.16

@lzap You can fix that error using the replace directive or upgrading mergo if it's used directly in your code, just replacing the import URL to the one shown in your error.

The reason behind the decision is that Mergo is stable, with some quirks and improvements, but it's reasonable complete. So, I won't be adding new features, nor fixes as it works for lots of use cases. No new versions should pop up after v1.0.0.

PS: I updated my vanity URL to redirect to the docs, not the github repo cc @andig

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

4 participants