Skip to content

go.mod: github.com/lima-vm/lima/v2 #3731

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

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

AkihiroSuda
Copy link
Member

The major version is now updated to highlight the introduction of the pluggable VM driver framework.

See:

@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone Jul 15, 2025
@AkihiroSuda AkihiroSuda marked this pull request as draft July 15, 2025 09:46
The major version is now updated to highlight the introduction of the
pluggable VM driver framework.

See issue 3712

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda AkihiroSuda marked this pull request as ready for review July 15, 2025 09:54
@nirs
Copy link
Member

nirs commented Jul 15, 2025

Why do we care abut v2? Users should not be affected by this change, and nobody should import stuff from lima since it is not a library.

@AkihiroSuda
Copy link
Member Author

Why do we care abut v2?

In v2 we will have significant changes including breaking ones:

Users should not be affected by this change

Notably this one will affect the users:

nobody should import stuff from lima since it is not a library.

Rancher Desktop does that:
https://github.com/rancher-sandbox/rancher-desktop/blob/v1.19.3/src/go/guestagent/pkg/iptables/iptables.go#L26

@alexandear
Copy link
Member

Placing a package in pkg clearly indicates that it is intended to be imported. If we want to prevent a package from being imported, it should be placed in the internal directory.

Finch CLI also imports lima: https://github.com/runfinch/finch/blob/223facc30093245168e7024213c1e78e4a08ab07/pkg/lima/wrapper/lima_wrapper.go#L10

@alexandear alexandear requested a review from Copilot July 16, 2025 12:06
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Go module path from github.com/lima-vm/lima to github.com/lima-vm/lima/v2 to reflect a major version change that introduces a pluggable VM driver framework.

  • Updates Go module definition to v2
  • Updates all internal import paths to include /v2 version suffix
  • Updates external references like Makefile package variables and protobuf option paths

Reviewed Changes

Copilot reviewed 142 out of 142 changed files in this pull request and generated no comments.

Show a summary per file
File Description
go.mod Updates module path to include /v2 version
pkg/**/*.go Updates internal import paths to reference v2 module
cmd/**/*.go Updates import paths in CLI commands and tools
*.proto Updates protobuf go_package option to v2 path
hack/oss-fuzz-build.sh Updates fuzzer package references
Makefile Updates PACKAGE variable to v2 path
.golangci.yml Updates linter configuration for v2 imports
Comments suppressed due to low confidence (1)

pkg/guestagent/api/guestservice.proto:2

  • The go_package option points to '/pkg/api' but should point to '/pkg/guestagent/api' based on the file location
option go_package = "github.com/lima-vm/lima/v2/pkg/api";

@nirs
Copy link
Member

nirs commented Jul 16, 2025

Ok, it makes sense now. Maybe we want to move most of the code to internal/ to make sure we don't break anyone when we move stuff around. The parts that other projects are using can be kept in pkg.

In ramen everything is in internal/, and we have api/ and e2e/ modules that are meant to be used by other projects.

@AkihiroSuda
Copy link
Member Author

Can we merge?

@AkihiroSuda AkihiroSuda merged commit b76b7ff into lima-vm:master Jul 16, 2025
87 of 90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants