azure-sdk-for-go icon indicating copy to clipboard operation
azure-sdk-for-go copied to clipboard

Cant build on go 1.19.2

Open nobuenhombre opened this issue 3 years ago • 7 comments

Bug Report

  • SDK version latest

  • output of go version go version go1.19.2 linux/amd64

  • What happened? I follow this instructions https://learn.microsoft.com/en-us/graph/tutorials/go?view=graph-rest-1.0&tabs=aad&tutorial-step=2

and i have error: Build constraints exclude all the Go files in '/home/myUser/go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/[email protected]/policy'

Screenshot from 2022-10-18 19-06-17

  • What did you expect or want to happen? no errors

  • How can we reproduce it? just follow this instructions https://learn.microsoft.com/en-us/graph/tutorials/go?view=graph-rest-1.0&tabs=aad&tutorial-step=2

  • Anything we should know about your environment. Ubuntu 20.04 Go 1.19.2

nobuenhombre avatar Oct 18 '22 15:10 nobuenhombre

Hi @nobuenhombre. Thank you for your feedback and we will look into it soon. Meanwhile, feel free to share your experience using the Azure SDK in this survey.

ghost avatar Oct 18 '22 15:10 ghost

It would appear that the build is using a version of Go predating 1.18. Our build constraints are for Go 1.18+ (example). We do build with 1.19 in our CI system as well.

jhendrixMSFT avatar Oct 18 '22 16:10 jhendrixMSFT

It would appear that the build is using a version of Go predating 1.18. Our build constraints are for Go 1.18+ (example). We do build with 1.19 in our CI system as well.

How it could be? output of go version go version go1.19.2 linux/amd64

nobuenhombre avatar Oct 18 '22 16:10 nobuenhombre

Does it repro from the command line too, or just in GoLand? I can build azcore locally so I'm at a bit of a loss.

PS D:\git\Azure\azure-sdk-for-go\sdk\azcore> git checkout sdk/azcore/v1.1.4
Note: switching to 'sdk/azcore/v1.1.4'.
...
HEAD is now at ca5ebc8601 Prepare azcore v1.1.4 for release (#19250)
PS D:\git\Azure\azure-sdk-for-go\sdk\azcore> go version
go version go1.19.2 windows/amd64
PS D:\git\Azure\azure-sdk-for-go\sdk\azcore> go build ./...
PS D:\git\Azure\azure-sdk-for-go\sdk\azcore>

jhendrixMSFT avatar Oct 18 '22 16:10 jhendrixMSFT

Does it repro from the command line too, or just in GoLand? I can build azcore locally so I'm at a bit of a loss.

PS D:\git\Azure\azure-sdk-for-go\sdk\azcore> git checkout sdk/azcore/v1.1.4
Note: switching to 'sdk/azcore/v1.1.4'.
...
HEAD is now at ca5ebc8601 Prepare azcore v1.1.4 for release (#19250)
PS D:\git\Azure\azure-sdk-for-go\sdk\azcore> go version
go version go1.19.2 windows/amd64
PS D:\git\Azure\azure-sdk-for-go\sdk\azcore> go build ./...
PS D:\git\Azure\azure-sdk-for-go\sdk\azcore>

you are right. i re-create project without GoLand, using only midnight commander text editor and project run and build succesfull, so problem under GoLand

thanks, I'm sorry for the trouble

nobuenhombre avatar Oct 18 '22 17:10 nobuenhombre

No worries, hope you find the solution (I haven't used GoLand so I have no clue).

jhendrixMSFT avatar Oct 18 '22 17:10 jhendrixMSFT

Hi @nobuenhombre. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

ghost avatar Oct 18 '22 17:10 ghost

I found why it happend. I use GoLand 2021.3.4 + manually installed Go 1.19.2 (without GoLand), After upgrade to 2022.1.4 problem was solved. i think it is because GoLand 2021.3.4 - max supported go version 1.17. and 2022.1.4 - max supported go version 1.18.

Screenshot from 2022-10-19 08-44-51

nobuenhombre avatar Oct 19 '22 04:10 nobuenhombre

Thanks for the details, maybe this will help others that hit the same issue.

jhendrixMSFT avatar Oct 19 '22 14:10 jhendrixMSFT