-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Cannot load github.com/Azure/azure-sdk-for-go/arm/compute #5590
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
Comments
I don't grasp all the reasons why this is happening but AFAICT you need to
|
Yes this does work! Thanks for the quick solution :) I wonder what commit the default "latest" go get is resolving to. My understanding was that it would use the tag with the highest semvar value... I wonder if it's confused by the go.mod name not including the major version. |
I can see how that's a problem if people use packages from prometheus/prometheus. What would happen if we simply put the |
I'm not familiar enough with go modules to be sure. It might be that imports would then need to include the |
I think I understand why Go picks up v2.5.0 of When we switched to Go modules, we didn't follow the general recommendation to increment our major version (eg |
This makes sense, thanks for your help! |
So let's keep that in mind when releasing Prom 3.0.0, whenever that might be. |
So, is there a workaround? Go 1.13 doesn't accept
I want to use |
Since Go 1.13, you need to specify the commit SHA. For v2.13.1:
|
Bug Report
What did you do?
Tried to import
github.com/prometheus/prometheus/config
for use in my own application:What did you expect to see?
successful compilation.
What did you see instead? Under which circumstances?
Environment
Notes
This might be something to do with #4468 - in that issue, volatile third-party dependencies is the reason given for still using the vendor directory. I don't see why this is necessary when a requirement can be pinned to a specific commit in
go.mod
?The reason I'm trying to do all this is that I need to a way to configure Prometheus targets at launch time, preferably by environment variables. I don't have the ability to mount in a configuration file (running in docker), and the targets vary depending on environment so can't bake the config into the image. My plan is to use an entrypoint script to generate a custom config file based off of environment variables... if there's an easier way to do this, please let me know.
The text was updated successfully, but these errors were encountered: