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

Stop calling SystemTime for wasm32 target #3358

Closed

Conversation

jjyr
Copy link

@jjyr jjyr commented Oct 12, 2024

The SystemTime::now in ChannelManager compiles on the wasm32- target, but it causes panic. We should use more strict compiling condition.

rust-lang/rust#48564 (comment)

Copy link

codecov bot commented Oct 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.57%. Comparing base (b023eed) to head (4f0e821).
Report is 183 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3358      +/-   ##
==========================================
- Coverage   89.82%   89.57%   -0.25%     
==========================================
  Files         126      127       +1     
  Lines      103854   103533     -321     
  Branches   103854   103533     -321     
==========================================
- Hits        93285    92738     -547     
- Misses       7843     8092     +249     
+ Partials     2726     2703      -23     

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

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

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

I agree we should fix this, but we probably should finally come up with a more comprehensive strategy across all our crates that is also properly documented and checked in CI.

@TheBlueMatt, in lightning-transaction-sync we introduced the time feature to discern the std-but-no-std::time. Should we do the same across all other crates?

@TheBlueMatt
Copy link
Collaborator

We do have a comprehensive strategy as of 0.0.124 - if you don't want to call system time, build with no-std/no-std. You can still turn std on in rust-bitcoin/bitcoin-io or other crates as its no longer totally infectious.

@tnull
Copy link
Contributor

tnull commented Oct 13, 2024

We do have a comprehensive strategy as of 0.0.124 - if you don't want to call system time, build with no-std/no-std. You can still turn std on in rust-bitcoin/bitcoin-io or other crates as its no longer totally infectious.

Ah, sorry, true, it should work by just not using the std feature.

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.

3 participants