Skip to content

Conversation

@matt-ramotar
Copy link
Collaborator

@matt-ramotar matt-ramotar commented Jun 29, 2024

Closes #644

Test Plan

All existing unit tests are passing

Additional Notes:

https://youtrack.jetbrains.com/issue/KT-69534/WasmJs-compilation-fails-with-anonymous-objects-and-exception-throwing-in-when-expressions. Changes to compile:

  • Replaced anonymous object with private class DefaultConverter (see RealStoreBuilder.kt)
  • Refactored StoreReadResponse.Error.doThrow() to return Throwable (see StoreReadResponse.kt)

Updated:

Copy link
Contributor

@amrfarid140 amrfarid140 left a comment

Choose a reason for hiding this comment

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

Hey there 👋🏽 I like reading OSS PRs for projects I am using. I spotted one tiny feedback but please feel free to ignore as I don't have a good level of context on this work.

when (this) {
is StoreReadResponse.Error.Exception -> throw error
is StoreReadResponse.Error.Message -> throw RuntimeException(message)
fun StoreReadResponse.Error.doThrow(): Throwable {
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: doThrow name isn't applicable anymore here.

@dosier
Copy link

dosier commented Feb 12, 2025

Nice, would be cool if this got merged :D

Signed-off-by: Matt Ramotar <[email protected]>
@codecov
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 53.33333% with 7 lines in your changes missing coverage. Please review.

Project coverage is 74.89%. Comparing base (bd0ce82) to head (a9e4dc6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nativefoundation/store/store5/StoreReadResponse.kt 42.85% 2 Missing and 2 partials ⚠️
...vefoundation/store/store5/impl/RealStoreBuilder.kt 62.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #646   +/-   ##
=======================================
  Coverage   74.89%   74.89%           
=======================================
  Files          38       38           
  Lines         920      920           
  Branches      169      168    -1     
=======================================
  Hits          689      689           
  Misses        144      144           
  Partials       87       87           
Files with missing lines Coverage Δ
...vefoundation/store/store5/impl/RealStoreBuilder.kt 62.90% <62.50%> (ø)
...nativefoundation/store/store5/StoreReadResponse.kt 62.96% <42.85%> (ø)

@matt-ramotar matt-ramotar merged commit f588cca into main Feb 20, 2025
4 of 5 checks passed
@matt-ramotar matt-ramotar deleted the matt-ramotar/wasmjs branch February 20, 2025 00:22
matt-ramotar added a commit that referenced this pull request Feb 21, 2025
Signed-off-by: Matt Ramotar <[email protected]>
itsandreramon pushed a commit to itsandreramon/Store that referenced this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Support for wasmJS target

4 participants