Skip to content

Implement monorepo sub-module support #322

@heartwilltell

Description

@heartwilltell

Phase 6: Polish — RFC #218

Support packages defined in subdirectories of a monorepo. Module paths include the subdirectory (github.com/user/monorepo/libs/utils), and tags use path prefixes (libs/utils/v1.0.0).

Closes #223.

Monorepo Support (from RFC)

  • A run.toml in a subdirectory defines a sub-module
  • Module path includes the subdirectory: github.com/user/monorepo/libs/utils
  • Tags for sub-modules use the path prefix: libs/utils/v1.0.0

Acceptance Criteria

  • Module paths with 4+ segments treated as sub-module
  • Tag discovery filters for path-prefixed tags (subdir/v1.0.0)
  • Archive download extracts only the relevant subdirectory
  • run.toml in subdirectory defines the sub-module's metadata
  • Import resolution maps sub-module path to correct cache location
  • Tests for sub-module discovery, downloading, and import resolution

Files

  • Modified: src/modfetch.zig, src/modcache.zig, src/resolve.zig

Dependencies

Part of the Package Manager RFC.

Metadata

Metadata

Assignees

Labels

compilerCompiler internals (IR, codegen, optimizer)enhancementNew feature or requestpackage-managerPackage manager (run.toml, dependencies, resolution)toolingDeveloper tooling and CLI

Type

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions