go-python / gpython

gpython is a python interpreter written in go "batteries not included"
BSD 3-Clause "New" or "Revised" License
870 stars 95 forks source link

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

Closed vasilev closed 9 months ago

vasilev commented 9 months ago

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 https://github.com/tailscale/tailscale/pull/8325 .

codecov[bot] commented 9 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

vasilev commented 9 months ago

Thank you too!