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

tinygo support, goroutine hack change, fix panic for invalid stderr, add test #66

Merged
merged 12 commits into from
Jul 19, 2024

Conversation

ldemailly
Copy link
Member

@ldemailly ldemailly commented Jul 16, 2024

Fixes #65

For tinygo (once debug.Buildinfo is fixed in tinygo-org/tinygo#4343) the issue was the linkname hacks that work for go do not exist, but there is instead a internal/task.Current that we use but convert to an id because... folks aren't convinced we need an id (even though we do...)

Also switched to letting https://github.com/kortschak/goroutine deal with maintaining the hack (adds a dependency but... oh well)

@ldemailly ldemailly changed the title Fix panic for invalid stderr, add test Fix panic for invalid stderr, tinygo support, add test Jul 17, 2024
@ldemailly ldemailly changed the title Fix panic for invalid stderr, tinygo support, add test tinygo support, goroutine hack change, fix panic for invalid stderr, add test Jul 17, 2024
goroutine/gid_test.go Outdated Show resolved Hide resolved
goroutine/gid_test.go Outdated Show resolved Hide resolved
goroutine/gid_test.go Outdated Show resolved Hide resolved
goroutine/gid_tinygo.go Outdated Show resolved Hide resolved
goroutine/gid_tinygo.go Show resolved Hide resolved
console_logging.go Show resolved Hide resolved
console_logging.go Outdated Show resolved Hide resolved
goroutine/gid_tinygo.go Outdated Show resolved Hide resolved
console_logging.go Outdated Show resolved Hide resolved
@ldemailly ldemailly requested a review from ccoVeille July 17, 2024 20:45
logger_test.go Outdated Show resolved Hide resolved
logger_test.go Show resolved Hide resolved
logger_test.go Show resolved Hide resolved
console_logging.go Show resolved Hide resolved
goroutine/gid_tinygo.go Show resolved Hide resolved
logger_test.go Outdated Show resolved Hide resolved
logger_test.go Outdated Show resolved Hide resolved
indicate why we don't just use io.Discard, some more

cc @ccoVeille
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.

Project coverage is 99.02%. Comparing base (c4c7d64) to head (086f2e4).
Report is 3 commits behind head on main.

Files Patch % Lines
console_logging.go 70.00% 2 Missing and 1 partial ⚠️
logger.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main      #66      +/-   ##
===========================================
- Coverage   100.00%   99.02%   -0.98%     
===========================================
  Files            4        6       +2     
  Lines          550      618      +68     
===========================================
+ Hits           550      612      +62     
- Misses           0        4       +4     
- Partials         0        2       +2     

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

goroutine/gid_tinygo.go Show resolved Hide resolved
logger_test.go Outdated Show resolved Hide resolved
goroutine/gid_tinygo.go Show resolved Hide resolved
goroutine/gid_tinygo.go Outdated Show resolved Hide resolved
goroutine/gid_tinygo.go Outdated Show resolved Hide resolved
goroutine/gid_tinygo.go Outdated Show resolved Hide resolved
goroutine/gid_tinygo.go Outdated Show resolved Hide resolved
logger.go Outdated Show resolved Hide resolved
ldemailly and others added 2 commits July 17, 2024 18:02
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
@ldemailly ldemailly requested a review from ccoVeille July 18, 2024 02:27
@ldemailly
Copy link
Member Author

So I got it to link even though I have yet to get it to run with tinygo

See
dispatchrun/net#37
tinygo-org/tinygo#4345
tinygo-org/tinygo#4346

but once these merge/are resolved, this will be tinygo compatible

ps: because tinygo doesn't have stack traces the file name/line number tests do fail but it's ok

@ldemailly ldemailly merged commit 2dbeb36 into main Jul 19, 2024
4 checks passed
@ldemailly ldemailly deleted the invalid_file branch July 19, 2024 01:14
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.

In wasm os.StdErr is invalid
2 participants