Skip to content
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

build hangs when importing package #312

Closed
tomasmota opened this issue Nov 3, 2022 · 4 comments
Closed

build hangs when importing package #312

tomasmota opened this issue Nov 3, 2022 · 4 comments
Assignees
Labels
Needs Attention 👋 question Further information is requested

Comments

@tomasmota
Copy link

When importing "github.com/microsoftgraph/msgraph-sdk-go", the build simply fails.
Reproduce with the following commands (go 1.19):

mkdir demo

go mod init demo

cat <<EOF > main.go
package main

import (
        "fmt"
        msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
)

func main() {
        fmt.Println("hi")
}
EOF

go mod tidy

go build main.go

In my case, the build just hangs until it fails with the following (includes time output):

go build github.com/microsoftgraph/msgraph-sdk-go/models: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed
go build -x main.go  68.65s user 6.95s system 85% cpu 1:28.74 total
@ghost ghost added the Needs Triage 🔍 label Nov 3, 2022
@baywet
Copy link
Member

baywet commented Nov 3, 2022

hi @tomas-mota
thanks for reporting this. It's something we're already investigating. You can set the GO Max procs as a workaround details

@baywet baywet self-assigned this Nov 3, 2022
@baywet baywet added question Further information is requested Needs author feedback and removed Needs Triage 🔍 labels Nov 3, 2022
@tomasmota
Copy link
Author

running GOMAXPROCS=200 go get -u does finish, but the build still hangs forever... to be honest I don't understand how importing a package (not even using it) can hang a build forever. Am I misunderstanding something or doing something wrong?

@tomasmota
Copy link
Author

ok after the first successful build, which took like 5 minutes, it is now faster.

@baywet
Copy link
Member

baywet commented Nov 3, 2022

Thanks for confirming. Closing this issue. Let us know if you need anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention 👋 question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants