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 replace directive with direct version pinning #491

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

jamietanna
Copy link
Contributor

As noted in #490, by using a replace directive, we're unable to then go install this project:

% go install github.com/StyraInc/regal@latest
go: downloading github.com/StyraInc/regal v0.13.0
go: github.com/StyraInc/regal@latest (in github.com/StyraInc/regal@v0.13.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.

Instead, we can replace this with a direct pinning to the commit we want to pull.

Closes #490.

As noted in StyraInc#490, by using a `replace` directive, we're unable to then `go
install` this project:

```
% go install github.com/StyraInc/regal@latest
go: downloading github.com/StyraInc/regal v0.13.0
go: github.com/StyraInc/regal@latest (in github.com/StyraInc/regal@v0.13.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.
```

Instead, we can replace this with a direct pinning to the commit we want to pull.

Closes StyraInc#490.
Copy link
Member

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

Cool, I didn't know that trick. Thanks!

Copy link
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

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

Thanks!

@anderseknert anderseknert merged commit ef28546 into StyraInc:main Nov 24, 2023
2 checks passed
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
As noted in StyraInc#490, by using a `replace` directive, we're unable to then `go
install` this project:

```
% go install github.com/StyraInc/regal@latest
go: downloading github.com/StyraInc/regal v0.13.0
go: github.com/StyraInc/regal@latest (in github.com/StyraInc/regal@v0.13.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.
```

Instead, we can replace this with a direct pinning to the commit we want to pull.

Closes StyraInc#490.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

go installing doesn't work due to replace directive
3 participants