-
Notifications
You must be signed in to change notification settings - Fork 36
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
go install
ing doesn't work due to replace
directive
#490
Comments
Thanks for raising that! The workaround seems fine to me — I just didn't know you could pin indirect dependencies like that. Will that be overwritten later when we upgrade OPA to the next version, or how does that work? Also, I'm always curious to learn how Regal is used! Something secret, or can you tell me some about it? 😃 |
Thinking about it, perhaps we could just use v1.9.3 for the logrus dependency, and include instructions for how to use |
Yeah in this case because we're taking a commit from the same repo, we can do so - if we wanted to use a fork, then we'd need a I think taking the proposed diff - pointing to that commit hash - works for now, and should unblock any
Depending on how you're doing the version bump, it should be straightforward. And i.e. Dependabot/Renovate/etc will notice when there's v1.9.4 of logrus and bump that accordingly. |
Since we don't really need a version above 1.9.3 for anything but the wasm experiment, I'd say let's use that for now. I can amend the instructions to the wasm section of the dev docs later. Would you want to submit a PR for the change? Also, still curious to learn more about your Regal integration! 😊 |
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.
Sure! I've raised #491 for it!
Certainly! I'm building dependency-management-data, a tool for understanding how you Open Source and internal dependencies are used. I'm in the process of adding Open Policy Agent support and as part of future work I'm looking at adding base + custom linting with regal - I've not done much with OPA but it's great to have a linter already available, and extensible 🚀 |
That's a really cool use case! Do feel free to reach out when it's ready for a demo, as I'd love to try it out. Also happy to help promote it in our various channels 😃 |
Thanks very much, will do! |
FYI I've just shipped regal support in DMD! |
Fantastic, @jamietanna! Sometime soon I'll either add an ADOPTERS.md file to the project, or a section in the README. Will make sure to include your project there 👍 |
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.
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.
When trying to do so, we see:
I'd recently hit this on a personal project, and a solution that may work here is the following:
Alternatively, we can wait until the logrus release is baked, but thought I'd flag that this could cause issues for folks.
The text was updated successfully, but these errors were encountered: