Cant build on go 1.19.2
Bug Report
-
SDK version
latest -
output of
go versiongo 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'

-
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
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.
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.
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
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>
Does it repro from the command line too, or just in GoLand? I can build
azcorelocally 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
No worries, hope you find the solution (I haven't used GoLand so I have no clue).
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.
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.

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