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

feat: use golang workspace #1567

Closed
wants to merge 1 commit into from
Closed

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented Jan 22, 2024

This PR introduces individual go.mod files for gnovm, tm2, and gno.land. It should help visualize and manage Go dependencies. I'm not sure if we should push the go.work file or not. Personally, I think it could be good to keep it until we have independent releases for each Go module.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton self-assigned this Jan 22, 2024
@github-actions github-actions bot added 📦 🤖 gnovm Issues or PRs gnovm related 📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related labels Jan 22, 2024
@moul
Copy link
Member

moul commented Jan 22, 2024

Yes, multiple go.mod files are used to reduce the size and complexity of indirect dependencies for the current project. We have plans to extract tm2 from the monorepo in the future. This approach also simplifies dependency tracking and allows for different philosophies per package.

As for workspaces, I don't have personal experience with them. However, based on my understanding, they can potentially eliminate the need for excessive use of require ../ statements and make it more convenient to use "go get" to install remotely.

@gfanton
Copy link
Member Author

gfanton commented Oct 4, 2024

From my understanding, and after some digging, I've come to a misconception about how workspaces function. Workspaces aren't specifically meant to be pushed and are more useful for local development, overriding module inner dependencies. In their current state, we cannot use workspaces. Or we can, but I don't think it's worth it until we manage individual versioning for each module.
Closing it for now.

@gfanton gfanton closed this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants