Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

main: fix -m mode stale binary bug #84

Merged
merged 1 commit into from
Sep 2, 2019
Merged

Conversation

myitcv
Copy link
Owner

@myitcv myitcv commented Sep 2, 2019

In 6038506 we incorrectly optimised away an install step when -m is
supplied. We must always install if we are in -m mode, because the main
module is responsible for resolving versions. We therefore utilise the
install step to effectively ensure the target binary is up to date.

This logic would change if were to adopt #81 because we would then only
install non-versioned module packages (i.e. non-main module,
non-directory replaced), or in the case a versioned target does not
exist in the gobin cache.

In 6038506 we incorrectly optimised away an install step when -m is
supplied. We must always install if we are in -m mode, because the main
module is responsible for resolving versions. We therefore utilise the
install step to effectively ensure the target binary is up to date.

This logic would change if were to adopt #81 because we would then only
install non-versioned module packages (i.e. non-main module,
non-directory replaced), or in the case a versioned target does not
exist in the gobin cache.
@myitcv myitcv requested a review from mvdan September 2, 2019 13:53
@myitcv myitcv merged commit da8791e into master Sep 2, 2019
@myitcv myitcv deleted the fix_mainmod_missing_install branch September 2, 2019 13:58
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