-
Notifications
You must be signed in to change notification settings - Fork 4
fix issue jsonrpc id files mismatch with full reload #55
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
base: main
Are you sure you want to change the base?
fix issue jsonrpc id files mismatch with full reload #55
Conversation
| <Compile Include="Math.fs" /> | ||
| <Compile Include="Component.fsi" /> | ||
| <Compile Include="Component.fs" /> | ||
| <Compile Include="./components/TestComponent.fs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added an external component as the issue only happens when there is at least one component importing another it seems, not only with a root component
| ### Fixed | ||
| - Bug fix targeting issue ([#53](https://github.com/fable-compiler/vite-plugin-fable/issues/53)) as log warn and no crash, for protocol error in json rpc serialization when there is id count mismatch | ||
| - removed Nojaf.React bindings nuget package and using Feliz instead for sample-project, as it is what is most used in community projects and suggested by official fable docs for React. | ||
| - pr ([#55](https://github.com/fable-compiler/vite-plugin-fable/pull/55)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added change log entries
| else { | ||
| logError("unknown", `error: ${err}, ${err.code}, ${err.context ?? "no context"}`); | ||
| } | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated handling of error
| <PackageReference Include="Fable.Browser.Dom" Version="2.14.0" /> | ||
| <PackageReference Include="Fable.Core" Version="4.3.0" /> | ||
| <PackageReference Include="Nojaf.Fable.React" Version="0.0.2" /> | ||
| <PackageReference Include="Feliz" Version="2.9.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update to standard fable Feliz remove Nojaf.Fable.React experimental package from sample
| "type": "module", | ||
| "scripts": { | ||
| "dev": "bunx --bun vite", | ||
| "dev:debug": "VITE_PLUGIN_FABLE_DEBUG=1 bunx --bun vite", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added dev debug script
|
a possible version also: jkone27#2 , this one uses a queue to prevent concurrent changes race conditions in transform json rpc, + checks in vite hmr file changes if file actually didnt change using a hash from node crypto, if no changes, continues without recompiling |
nojaf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like you're trying to accomplish two objectives in this PR, which makes it a bit confusing. There's the exception handling aspect and the porting to Feliz. It would be better to separate these two tasks.
|
|
||
| ## [0.2.1] - 2025-06-28 | ||
| ### Fixed | ||
| - Bug fix targeting issue ([#53](https://github.com/fable-compiler/vite-plugin-fable/issues/53)) as log warn and no crash, for protocol error in json rpc serialization when there is id count mismatch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changelog entry lacks consistency. Please adhere to a uniform format and avoid trends.
Additionally, it appears that not many fixes are being made. This could be misleading for end-users, so I would prefer to follow the updates in your other PR.
references issue #53
1 - in sample-project use fable
Felizlatest instead of customNojaf reactbindings, and added an imported component2 - fix issue of unhandled asynchronous error crashing app in hmr transform in case of json rpc error (error is in emit), alrady logging warning mitigates the issue causing the plugin to keep working! just handling the exception gracefully - yay
now this error is handled by just warning, thus not crashing the vite plugin in case of onhandled json rpc errors, but causing a full reload: