Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ toml = { version = "1.1.4", default-features = false, features = [
moon_common = { version = "2.0.8" }
moon_config = { version = "2.1.1" }
moon_pdk = { version = "2.1.0" }
moon_pdk_api = { version = "2.1.0" }
moon_pdk_api = { version = "2.1.2" }
moon_pdk_test_utils = { version = "2.1.0" }
moon_project = { version = "2.0.7" }
moon_target = { version = "3.0.1" }
Expand Down
36 changes: 36 additions & 0 deletions toolchains/go/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Changelog

## Unreleased

#### 🚀 Updates

- Reworked relationship inference to match package import paths instead of module paths. Each project now resolves a canonical import path (nearest `go.mod` module path plus the project's relative directory), and `go list -deps` results are matched against those by longest prefix. This makes relationships resolvable in repositories that share a single `go.mod` across all projects.
- Sibling modules required by version without a `go.work` no longer create project relationships, since those builds consume the published module rather than the local source. When the `go` binary is unavailable, projects with their own `go.mod` under a workspace `go.work` fall back to resolving relationships from their direct requires.
- `replace` directives keep their meaning in the new model: a require replaced by a local directory always links to the project at that location (it consumes local source even without a `go.work`), while a require replaced by another module never links.
- Imports within a project's own import path are treated as ownership rather than dependencies. `go list -deps ./...` enumerates packages belonging to projects nested inside the scanned project, which previously inferred an edge from the parent to every nested child — forming a cycle whenever a child declared `dependsOn` on its parent.

## 1.4.7

#### 🐞 Fixes

- Fixed project relationships not linking when a `go.mod` is located in a major
version folder (`v2`+) but its `module` directive omits the version suffix.
The suffix is now inferred from the folder name, for both the project's alias
and dependency matching.
- `replace` directives are now honored when linking project relationships. A
replacement pointing to a local directory links to the project at that
location (regardless of module names), while a replacement pointing to
another module no longer creates a relationship.
- Project relationships now reference the dependency's project identifier
instead of its module path alias, aligning with other toolchains.

## 1.4.6

#### 🐞 Fixes

- Fixed configured `bins` not being reinstalled when their binaries were
uninstalled or deleted outside of moon. Missing binaries are now detected in
the globals directory, and only missing binaries are installed. Binaries
pinned to a version, branch, or commit are always installed, as their
installed version cannot be verified.
- The `force` option for `bins` entries is now respected, and will always
install the binary.

## 1.4.5

#### 🚀 Updates
Expand Down
2 changes: 1 addition & 1 deletion toolchains/go/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "go_toolchain"
version = "1.4.5"
version = "1.4.7"
edition = "2024"
description = "Go toolchain WASM plugin for moon."
authors = ["Miles Johnson"]
Expand Down
2 changes: 2 additions & 0 deletions toolchains/go/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ pub mod go_mod;
pub mod go_sum;
pub mod go_work;

#[cfg(feature = "wasm")]
mod package_graph;
#[cfg(feature = "wasm")]
mod tier1;
#[cfg(feature = "wasm")]
Expand Down
Loading
Loading