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

Improve the user experience for Go workspaces #564

Open
brunoapimentel opened this issue Jul 1, 2024 · 1 comment
Open

Improve the user experience for Go workspaces #564

brunoapimentel opened this issue Jul 1, 2024 · 1 comment
Labels
enhancement New feature or request gomod Pull requests/issues related to the gomod handling module

Comments

@brunoapimentel
Copy link
Contributor

Currently, when a user has workspaces in his repository, he still needs to specify the path to a specific Go module when creating a Cachi2 request. If the specified path only has a go.work file (and no go.mod file), the request would fail.

This also brings some code design implications: for historical reasons, Cachi2 uses the concept of a "main module" when processing a repo, which is the module that exists in the path specified by the user when creating the request. If multiple paths were specified, then each of them will be a "main module" during the iteration across all these paths.

With the addition of workspace support, this concept falls flat: there is no real "main module" in a project with workspaces, but instead, a collection of equally important modules.

We should:

  • refactor the code to get rid of the concept of a main module
  • allow the user to specify a path that points to either a go.work file (in case of a project with workspaces), or a go.mod file (in case of a project without workspaces).
@chmeliik
Copy link
Contributor

chmeliik commented Jul 4, 2024

There's also a fairly significant bug caused by the current design: cachi2 doesn't list packages from workspace modules other than the one specified by the user - #553 (comment)

@eskultety eskultety added the enhancement New feature or request label Jul 16, 2024
@eskultety eskultety added the gomod Pull requests/issues related to the gomod handling module label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gomod Pull requests/issues related to the gomod handling module
Projects
None yet
Development

No branches or pull requests

3 participants