Conversation
1991645 to
f3ae051
Compare
rx objects can defer their computation completely until an explicit `.rx.value` is called.
f3ae051 to
6bb2127
Compare
|
@philippjfr all stable now. Let me know if this is the way you envisioned the API or if there's a different approach you'd like me to try out. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1106 +/- ##
==========================================
+ Coverage 89.31% 89.38% +0.06%
==========================================
Files 9 9
Lines 4734 4746 +12
==========================================
+ Hits 4228 4242 +14
+ Misses 506 504 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@camriddell This is great, thanks for tackling this. I'll play around with it a bit but don't see any issues. @maximlt has also asked me to hold off on merging until we release a small patch release. So we should get this out some time in February I think. |
|
Sorry for the delay here. I'm quite happy with the PR and want to target it for 2.4.0. I'll probably merge this once I've released 2.3.3. |
|
@camriddell Hope you don't mind but I've pushed a change. There were a few things that had to be guarded correctly and either has to warn or error and then I parametrized a bunch of tests to run in lazy and non-lazy modes. |
|
Seems like the tests are a little flaky, will resolve tomorrow and merge. |
Absolutely, am happy that I was able to get the ball rolling for you. |
Added an optional flag to
rx(..., lazy: bool = True | False). Whenlazy=Truechaining operations does not evaluate previous operations. Whereas whenlazy=Falsethe chaining a new operation evaluates the previous operation (original behavior).Addresses #1105
This is the current/original behavior
When using
lazy=True