Skip to content

Fixed WASM compatibility by avoiding panic due to absence of os.Executable() #226

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

Merged

Conversation

vasilev
Copy link
Contributor

@vasilev vasilev commented Nov 22, 2023

os.Executable() is not implemented in "js" and "wasip1" targets in current Golang versions, so WASM builds encounter Executable not implemented for js errors in runtime.

This fix is borrowed from Brad's tailscale/tailscale#8325 .

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (e9cde5f) 74.81% compared to head (42164ff) 74.79%.

Files Patch % Lines
stdlib/sys/sys.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #226      +/-   ##
==========================================
- Coverage   74.81%   74.79%   -0.03%     
==========================================
  Files          78       78              
  Lines       12814    12818       +4     
==========================================
  Hits         9587     9587              
- Misses       2553     2557       +4     
  Partials      674      674              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ncw ncw left a comment

Choose a reason for hiding this comment

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

This is a nice fix - thank you - I'll merge it now.

@ncw ncw merged commit ed47ed3 into go-python:main Nov 22, 2023
@vasilev
Copy link
Contributor Author

vasilev commented Nov 22, 2023

Thank you too!

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.

2 participants