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

vscgo: retract the vscgo "module" #3420

Closed
hyangah opened this issue Jun 7, 2024 · 6 comments
Closed

vscgo: retract the vscgo "module" #3420

hyangah opened this issue Jun 7, 2024 · 6 comments
Assignees
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Jun 7, 2024

Problem:
https://pkg.go.dev/github.com/golang/vscode-go/vscgo shows the old unversioned vscgo. Moreover, go install github.com/golang/vscode-go/vscgo@latest picks up an old version of vscgo.

What happened?:
Before we restructured the repo struct and settled in the current shape , there was a brief period of time that we had a go.mod file under github.com/golang/vscode-go/vscgo directory (b01b0b7).

  vscode-go (go.mod)
      + ...other code...
      + vscgo (go.mod)

In mid Jan, we moved the vscgo package to the github.com/golang/vscode-go module, and moved the extension code to a separate module. #3122
The following is the current state of this project

  vscode-go (go.mod)
      + vscgo
      + extension (go.mod)
      + docs (go.mod)
              ...other code...

It's an oversight that we didn't retract the (short-lived) vscgo module during the transition.
It isn't an issue since the released extension always installs a specific version of vscgo like:

go install github.com/golang/vscode-go/vscgo@v0.41.3

In that case, the go command does the right thing.

Unfortunately, the short-lived vscgo module was already seen by the proxy.golang.org - https://proxy.golang.org/github.com/golang/vscode-go/vscgo/@latest which returns v0.0.0-20240105193802-b01b0b756e58

As a result, if someone runs go install github.com/golang/vscode-go/vscgo@latest
with the default GOPROXY (proxy.golang.org), the go command will pick up this old copy
of the vscgo module and install the old version of vscgo tool.

pkg.go.dev also thinks currently there are two modules offering the vscgo package,
and prefers the old version. That is not what we want.

How to fix it:

We need to properly retract the github.com/golang/vscode-go/vscgo module.
Note: we still use the vscgo package (in github.com/golang/vscode-go module)

Follow the instruction in golang/go#67567 (comment)

Option 1)

  1. Add back the go.mod file in github.com/golang/vscode-go/vscgo
  2. Add a retract directive to the go.mod. Tag v0.0.1-deprecated and make sure it's seen by proxy.golang.org.
  3. Remove go.mod file.
    --> Cons: this will create the unnecessary churn in the main branch.

Option 2)

  1. Create a branch (e.g. vscgo-v0.0.1-deprecated)
  2. Commit a change that bring back go.mod with retract.
  3. Tag the branch with vscgo/v0.0.1-deprecated, and forget about the branch.
    --> Cons: we will need to create a temporary branch.

If the option 2 works, I think it is better (not leaving the trace in the main branch)

cc @suzmue

@gopherbot gopherbot added this to the Untriaged milestone Jun 7, 2024
@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/591158 mentions this issue: vscgo: retract the vscgo module

@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/591159 mentions this issue: Revert "vscgo: retract the vscgo module"

@hyangah hyangah self-assigned this Jun 10, 2024
@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/591755 mentions this issue: vscgo: deprecate github.com/golang/vscode-go/vscgo "module"

@nightlyone
Copy link

@hyangah I missed the discussion why this is happening. Could you please point me to the discussion?

The linked issue only seems to explain how to do depublish unintentionally published code, not why this tool is being retracted.

@hyangah
Copy link
Contributor Author

hyangah commented Jun 11, 2024

@nightlyone Sorry that I omitted the detail. I just updated the issue description.

Note: the tool is not getting retracted. We are retracting the module. Our intention is to move more extension's logic to the vscgo tool (e.g. tools update and installation), and keep the TS/JS code minimal.

@suzmue suzmue modified the milestones: Untriaged, v0.42.0 Jun 11, 2024
gopherbot pushed a commit that referenced this issue Jun 12, 2024
…scode-go/vscgo "module"

Retract all versions including the version to tag

For #3420

Change-Id: I4dd80bd14bf464b568e3ac867d5bcafecb1e250e
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/591755
TryBot-Bypass: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
@hyangah
Copy link
Contributor Author

hyangah commented Jun 12, 2024

This is done. Still pkgsite doesn't display the doc due to license check failure, but that's a separate issue.

@hyangah hyangah closed this as completed Jun 12, 2024
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