Skip to content
This repository was archived by the owner on Jun 16, 2022. It is now read-only.

Go list implementation for detecting dependencies #5

Merged
merged 23 commits into from
May 24, 2022
Merged

Conversation

lseppala
Copy link
Contributor

@lseppala lseppala commented May 14, 2022

This replaces the go mod graph implementation with an implementation based on go list, which was suggested here.

This is more accurate than go mod graph because:

  • it doesn't contain multiple versions of dependencies
  • it will contain only dependencies of the specified build target (no testing and tooling dependencies included, for example)

However, this does not capture transitive dependency relationships. In order to capture transitive dependency relationships, we need to run both go list and go mod graph. However, the operating model of the toolkit library currently limits us to one command per snapshot. The toolkit library will need to be updated to allow for more flexibility before we run both commands.


This work also adds a simple Go project to demonstrate the Action within this repo itself.

Example run of Action: https://github.com/dsp-testing/go-snapshot-action/actions/runs/2374558077

@lseppala lseppala changed the title Lsep/go list impl Go list implementation for detecting dependencies May 14, 2022
@lseppala lseppala requested review from mrysav and lorenanicole May 14, 2022 03:56
@lseppala lseppala force-pushed the lsep/go-list-impl branch from 6ead0b9 to 75bea64 Compare May 17, 2022 00:26
@lseppala lseppala force-pushed the lsep/go-list-impl branch from 75bea64 to eedb5d7 Compare May 17, 2022 00:29
@lseppala lseppala force-pushed the lsep/go-list-impl branch from a4fe75d to 0a2f424 Compare May 17, 2022 00:37
Copy link
Contributor

@mrysav mrysav left a comment

Choose a reason for hiding this comment

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

:shipit:

@lseppala lseppala merged commit ad917f2 into main May 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants