Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace directive break command install #1574

Closed
AidanDelaney opened this issue Dec 11, 2022 · 9 comments
Closed

Replace directive break command install #1574

AidanDelaney opened this issue Dec 11, 2022 · 9 comments
Labels
status/in-progress Issue or PR that is currently in progress. type/bug Issue that reports an unexpected behaviour.

Comments

@AidanDelaney
Copy link
Member

Summary

Installing pack using go install github.com/buildpacks/pack/cmd/pack@latest fails due to the replace directives in go.mod


Reproduction

Steps
  1. Run go install github.com/buildpacks/pack/cmd/pack@latest
go: github.com/buildpacks/pack/cmd/pack@latest (in github.com/buildpacks/pack@v0.28.0):
  The go.mod file for the module providing named packages contains one or
  more replace directives. It must not contain directives that would cause
  it to be interpreted differently than if it were the main module.
  1. Notice the same failure with go install github.com/buildpacks/pack/cmd/pack@v0.28.0
go: github.com/buildpacks/pack/cmd/pack@v0.28.0 (in github.com/buildpacks/pack@v0.28.0):
  The go.mod file for the module providing named packages contains one or
  more replace directives. It must not contain directives that would cause
  it to be interpreted differently than if it were the main module.
  1. However, go install github.com/buildpacks/pack/cmd/pack@v0.27.0 succeeds
Current behavior

The installation fails with an error that mentions "replace directives"

Expected behavior

The expected behavior is the same as the behavior in go install github.com/buildpacks/pack/cmd/pack@v0.27.0


Environment

pack info

N/A

docker info

N/A

@AidanDelaney AidanDelaney added status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour. labels Dec 11, 2022
@natalieparellano
Copy link
Member

Sadly I don't think there's an easy way to work around this; this thread has more: golang/go#44840 (comment)

Can we install pack using an alternate method in the docs CI?

@hone
Copy link
Member

hone commented Dec 13, 2022

@natalieparellano in order to remove the replace directives, do we have to not user kaniko?

@natalieparellano
Copy link
Member

@hone I believe so, yes

@sambhav
Copy link
Member

sambhav commented Dec 15, 2022

I see docker has now moved to a vendor.mod file which doesn't have any replace directives. If kaniko were to update its versions, would we be able to get rid of the replacements?

@natalieparellano
Copy link
Member

Maybe... I'll check

natalieparellano added a commit to buildpacks/docs that referenced this issue Dec 15, 2022
While we await resolution of buildpacks/pack#1574 this should fix the pack upgrade

Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano
Copy link
Member

I see docker has now moved to a vendor.mod file which doesn't have any replace directives. If kaniko were to update its versions, would we be able to get rid of the replacements?

Looks like those changes haven't been released yet - let's keep an eye on it...

@natalieparellano
Copy link
Member

Let's check on this one after #1696 is merged. Hopefully go get will work again and we can close it.

@jjbustamante
Copy link
Member

I checked locally the following command:

go install github.com/buildpacks/pack/cmd/pack@v0.30.0-rc2

We will close this issue once 0.30 is released

@jjbustamante jjbustamante added status/in-progress Issue or PR that is currently in progress. and removed status/triage Issue or PR that requires contributor attention. labels Aug 14, 2023
@jjbustamante
Copy link
Member

Pack 0.30.0 was released! closing this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/in-progress Issue or PR that is currently in progress. type/bug Issue that reports an unexpected behaviour.
Projects
None yet
Development

No branches or pull requests

5 participants