Skip to content

cmd/go: do not allow main module to replace itself #36358

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

Closed

Conversation

GrigoriyMikhalkin
Copy link
Contributor

Fixes #34417

@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Jan 2, 2020
@GrigoriyMikhalkin GrigoriyMikhalkin changed the title do not allow main module to replace itself cmd/go: do not allow main module to replace itself Jan 2, 2020
@gopherbot
Copy link
Contributor

This PR (HEAD: 00ece8a) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/213118 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Jay Conrod:

Patch Set 1:

(5 comments)

Thanks for working on this. A few changes needed though.


Please don’t reply on this GitHub thread. Visit golang.org/cl/213118.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 0ad98f7) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/213118 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Greesha Mikhalkin:

Patch Set 2:

Patch Set 1:

(5 comments)

Thanks for working on this. A few changes needed though.

Thanks for clarifications. I updated PR


Please don’t reply on this GitHub thread. Visit golang.org/cl/213118.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Bryan C. Mills:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/213118.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Jay Conrod:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/213118.
After addressing review feedback, remember to publish your drafts!

Change-Id: I6d94f00e1c607581ba32253ba00fe4110e2bb5b8
@gopherbot
Copy link
Contributor

This PR (HEAD: adc72ad) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/213118 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Segev Finer:

Patch Set 3:

I have seen projects replacing them self with themselves due to having a circular dependency, e.g:

replace github.com/gopher/mod => .

Does this block this so such projects can no longer work, or is there some other fix so this is no longer necessary.

(Yes, such circular dependencies are probably a bad idea, but some people just insist on doing them regardless)


Please don’t reply on this GitHub thread. Visit golang.org/cl/213118.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Jay Conrod:

Patch Set 3:

I have seen projects replacing them self with themselves due to having a circular dependency, e.g:

replace github.com/gopher/mod => .

Does this block this so such projects can no longer work, or is there some other fix so this is no longer necessary.

(Yes, such circular dependencies are probably a bad idea, but some people just insist on doing them regardless)

Segev, this CL will report an error when the main module replaces itself or replaces another module with itself.

I don't think this kind replacement should be necessary, but please comment on golang.org/issue/34417 if you're running into a problem that's difficult to solve without this, and we'll try and recommend another solution.


Please don’t reply on this GitHub thread. Visit golang.org/cl/213118.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/213118 has been abandoned.

Seems like we aren't going to do this, so abandoning. Please comment if you disagree.

@gopherbot gopherbot closed this May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmd/go: do not allow the main module to replace (to or from) itself
3 participants