Skip to content

Project repo restructuring #3122

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
3 tasks done
hyangah opened this issue Jan 10, 2024 · 4 comments
Closed
3 tasks done

Project repo restructuring #3122

hyangah opened this issue Jan 10, 2024 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Jan 10, 2024

VS Code Go extension will install a new helper go binary (#3121) for VS Code Go extension specific tasks. Its source code is in github.com/golang/vscode-go and colocated with the extension code, and the Go extension installs a specific version with the go install command.1 The tool must be small and has little extra 3rd party dependencies.

Currently, the vscgo package is in a separate module to avoid pulling in large files (TS/JS and media files) and dependencies of github.com/golang/vscode-go repo that are not needed by vscgo.

Screenshot 2024-01-10 at 12 15 18 AM

Two modules should be released together but require separate tags. For example, the release process for v0.41.0 in the current layout involves:

  1. Tag vscgo/v0.41.0
  • Extension 0.41.0 runs go install [email protected]
  • This tagging must be done before the other tagging.
  1. Tag v0.41.0
  • Triggers CI for publishing
  • Serves as the extension version tag
  • Watched by downstream

Given that tagging is a manual process, requiring two tags for every release and prerelease will be tedious and more error prone. And, the github.com/golang/vscode-go module is not actually a Go module meant for publishing.

We propose to move the extension code to a separate module in a subdirectory, and move the vscgo package to github.com/golang/vscode-go. That will allow us to require one version tag for extension release.

Screenshot 2024-01-10 at 12 16 33 AM

The single tag serves both for vscgo and the extension.

The extension module references the github.com/golang/vscode-go module, and it is replaced. This module is meant for local development, so use of this replace directive and invalid version will prevent unexpected dependency on this module, too.

The docs module is a module that contains documentation files, and will include supporting tools.

The build directory remains in the top level for now, but can be punched to a separate module when it grows big.

Risk

  • Will affect contributors with pending changes. Good, but sad news - there are not many contributors with pending changes.
  • NPM scripts should run from the extension directory, which will confuse users. Good contributor guidelines will mitigate confusion.

Tasks

Footnotes

  1. That means the tool source code can be fetched from Go module proxies and the source code and its dependencies can be verified with sum.golang.org.

@gopherbot gopherbot added this to the Untriaged milestone Jan 10, 2024
@hyangah hyangah modified the milestones: Untriaged, v0.41.0 Jan 10, 2024
@hyangah hyangah added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 10, 2024
@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/554316 mentions this issue: extension: move extension code to a separate module

gopherbot pushed a commit that referenced this issue Jan 11, 2024
The vscgo command line tool is moved to the repo root module.
This simplifies the release process.

The extension module is meant to be used only for development
and majority of the code is non-Go code.

src/goInstallTools.ts installVSCGO is modified too -
Nightly installs with @master.

Updates #3122
Updates #3121

Change-Id: I04e441ecac71b4ab42e635835d91dcf344353e67
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/554316
Reviewed-by: Suzy Mueller <[email protected]>
Auto-Submit: Hyang-Ah Hana Kim <[email protected]>
TryBot-Result: kokoro <[email protected]>
Commit-Queue: Hyang-Ah Hana Kim <[email protected]>
@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/556536 mentions this issue: extension/tools/release: uncomment vsce package and fix README handling

gopherbot pushed a commit that referenced this issue Jan 18, 2024
This CL also adds a trivial test that checks -n output to see
if the release command calls expected commands.

And fix nightly release's README handling again.
I hoped the new --readme-path flag can help us package README.md file
in the repo root https://go-review.git.corp.google.com/c/vscode-go/+/556535
but it doesn't seem to work yet.
Instead, we copy the README.md file to the extension directory.
Also, fixes the image and content base uris.

Update #3122

Change-Id: I6c79d34653346ef2e2b596f0ca4db1de16b79853
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/556536
Commit-Queue: Hyang-Ah Hana Kim <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
TryBot-Result: kokoro <[email protected]>
@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/556855 mentions this issue: docs: update contribution instruction

gopherbot pushed a commit that referenced this issue Jan 19, 2024
Updates #3122

Change-Id: I7e8958a8943ccfd104c08e7aca70bf2d805933fd
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/556855
Commit-Queue: Hyang-Ah Hana Kim <[email protected]>
TryBot-Result: kokoro <[email protected]>
Reviewed-by: Suzy Mueller <[email protected]>
@gopherbot
Copy link
Collaborator

Change https://go.dev/cl/556857 mentions this issue: .github/workflows: fix wiki.yml

@hyangah hyangah closed this as completed Jan 19, 2024
gopherbot pushed a commit that referenced this issue Jan 22, 2024
tools/docs2wiki is moved to ./extension directory.

For #3122

Change-Id: I6cc21764b707b0577765aef1c06718fdd494f460
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/556857
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
Reviewed-by: Suzy Mueller <[email protected]>
Auto-Submit: Hyang-Ah Hana Kim <[email protected]>
Commit-Queue: Hyang-Ah Hana Kim <[email protected]>
TryBot-Result: kokoro <[email protected]>
@golang golang locked and limited conversation to collaborators Jan 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants