Skip to content

[feature] A more effective go dependency model. #2360

@kcross-ctoken

Description

@kcross-ctoken

Currently the golang dependency model is based around the mod files.
While this is not incorrect it is not very effective.
Golang modules are really just a external dependency list but when working with a monorepo everything is internal.
Go does its internal dependency checking using
pacakges -> object files -> binaries dependency tree.
This works well for testing because the test binary can consist of different object files so it knows what to build and if it needs to retest according to the package-> object file cache it has.

This enables go to have 2 different dependency trees from a single mod file

  1. testing (test binary)
  2. application/executable

Currently we can not model this in moon so We are having to artifically breakup all our packages into mod files to enable moon to properly detect what needs to be released.

Im going to suggest here that the golang dependency plugin goes a step further and looks at each package in the project and which binaries need them then work out what needs to be tested for a test binary ... or released for a release binary. The two dependency lists are not the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions