Go: Ignore ephemeral packages when checking transitive dependencies #121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Consider the case where you have three Leeway Go packages A, B, C where A depends on B. B depends on C and C is ephemeral.
The ephemeral package C will always be built whenever B is built as it is never cached.
That means, if B doesn't need to be rebuilt, then C won't be built either.
As it is ephemeral it won't be in the cache either, which means that if you try to build package A when B is cached, then the build will fail as C isn't in the cache.
This PR fixes it so that ephemeral packages are ignored when checking the transitive dependencies of Go packages.
This was already the case for Yarn packages - the implementation (and comments) have been copied over verbatim
For more context around ephemeral packages see this internal Notion meeting note.
Related Issue(s)
No issue, this was discovered originally here and tested here (1,2).
From this comment it sounds like this fix is still needed.
How to test
Release Notes
Documentation
N/A