fix: remove replace directive from go.mod to enable go install - #2107
fix: remove replace directive from go.mod to enable go install#2107waterWang wants to merge 1 commit into
Conversation
|
|
Welcome @waterWang! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: waterWang The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
9e1ff5a to
7d89e8c
Compare
Fixes #2106
Problem
go install github.com/kubernetes/kompose@latestfails because thego.modfile contains areplacedirective pointing to a remote module:Root Cause
The
replacedirective was used to mapgithub.com/openshift/api v3.9.0+incompatibleto a specific pseudo-versionv0.0.0-20230704153349-abb98ff04d03. When building from the module root (the main module), this is fine. Butgo installfrom outside the module rejectsreplacedirectives that point to remote modules.Fix
requireentry fromgithub.com/openshift/api v3.9.0+incompatibletogithub.com/openshift/api v0.0.0-20230704153349-abb98ff04d03replacedirectiveThe pseudo-version was already present in
go.sum, so no module hash changes are needed.