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

Log build CGO_ENABLED state #2509

Merged
merged 2 commits into from Feb 22, 2022

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented Feb 15, 2022

What changed?
Log build CGO_ENABLED state.

Why?
For better debugging issues which are related to cgo it is very useful to know if cgo was enabled during build or not.

How did you test it?
Run locally.

Potential risks
No risks.

Is hotfix candidate?
No.

@alexshtin alexshtin requested a review from a team as a code owner February 15, 2022 02:32
@@ -47,6 +47,10 @@ import (
"go.temporal.io/server/temporal"
)

var (
cgoEnabled = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this variable used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few lines bellow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow. Line 146 uses build.InfoData.CgoEnabled which is either defined in cgo.go or nocgo.go. I don't see where this valuable is used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, @yiminc. It is leftover from 1st implementation. Thanks for catching this!

@alexshtin alexshtin merged commit 0a76b2a into temporalio:master Feb 22, 2022
@alexshtin alexshtin deleted the feature/log-cgo-state branch February 22, 2022 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants