-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/vgo: import package not yet uploaded to a remote location #24804
Comments
Use a |
@myitcv I tried , but go build still fails with
|
it looks like the first time vgo build ignores the replace directive. |
Do you have a
|
If you are able to point us towards a branch of code that would probably help to diagnose. |
here is the WIP tried few different replace options, but couldn't find the magic one. |
Ok I've just updated my earlier comment - my understanding is that you still need a So assuming you have:
I think there is actually a problem here because a In the meantime, if you move your
|
success! for some reason vgo tries to use old version of some packages which caused build failures,but after adding the latest commit hashes manually it builds ok now. if I comment out these 2 it tries to use older versions for some reason.
feel free to close the issue if you think it behaves as expected.
|
actually for yaml it is clear that the v2 doesn't have go.mod so probably that is why it defaults to v1 , but for oauth2 not sure why. |
I've given this a bit more thought, and wonder whether what we need here, in addition to the
Resolutions would first check such overrides before hitting "the internet". I'm fairly sure this idea isn't novel and that it will have been considered en route to the |
isn't the problem here that vgo tries to download packages before it considers the replace directive? |
I don't think so; because there's a necessary resolution step (assuming there's nothing in the cache) where Hence why the proposal for the cc @rogpeppe |
from my perspective without knowing the technical implementations it seems that |
Many packages can live within a module. And indeed modules can live within the repo of other modules (i.e. they are submodules). My understanding is that Actually, the concept of a |
I would need to spend a bit more time using vgo and see few more examples to fully understand this idea. |
I'm sorry for coming to this conversation late, but @krasi-georgiev can you say a little more about why you want to structure prometheus/prombench as multiple modules? |
I need the same thing, in this case, because of a domain that is down. There is an import path in one of our dependencies for "leb.io/hashland/keccakpg" and "leb.io" has been down since May. I'd love to remap it to the GitHub path, but vgo tries to download before evaluating the replacement:
|
@rsc actually I don't want multiple modules , I just thought that the structure of the project should be as per my first comment #24804 (comment) . So After moving |
Hi, My use case, related to this issues, is:
I am not able to run
even if I run A reference repo is here: https://github.com/brunetto/vigo. |
@brunetto, your repo is very close. The only missing bit is in cmd/vigo/go.mod there is no "require" statement asking for the root repo. The "replace" only kicks in if the requirement exists (because in general replace could be replacing an indirect requirement, not just things directly written in the current effective go.mod). If I do this in go.mod then it works fine:
I just made up v0.0.99 - obviously that doesn't exist online right now. Every command does print |
runing
vgo build
inside../cmd/prombench
fails asmain.go
importsgithub.com/prometheus/prombench/provider/gke
which is not yet uploaded to the remote repo since this is a WIP so can't yet upload it to upstream.
I tried adding
replace "github.com/prometheus/prombench/provider/gke" v0.0.0 => "../../provider/gke"
to go.mod , but didn't make any difference.not sure what should be the behaviour here, but I see this as a quite common scenario
The text was updated successfully, but these errors were encountered: