-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Deep equality for sets fails in Node v20 #4444
Comments
@WeepingClown13 To clarify the issue title, is it always failing on Node v20, or is it only sometimes failing (i.e. the behavior is nondeterministic)? |
It is always failing on Node v20, so it's consistent. The same always passes in Node v18. |
I can confirm this fails on node 20, but succeeds on node 18, very strange... |
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
I thought this could be related to running preflight code in a worker thread, but it turns out it's unrelated. This bug is basically due to how we're using deepStrictEqual here, which treats sets as equal only if they contain the same JavaScript values by reference. (nodejs/node#13347) |
Fixes #4444 Replaced the native assert module import to an [external npm package](https://www.npmjs.com/package/assert) for the problematic file. ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
Congrats! 🚀 This was released in Wing 0.74.32. |
Fixes #4444 Replaced the native assert module import to an [external npm package](https://www.npmjs.com/package/assert) for the problematic file. ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
I tried this:
This happened:
Assertion failed with the following error (it is the final assert that is causing this):
I expected this:
For the assertions to pass without any errors.
Is there a workaround?
Run the tests by removing the final assertion, like so:
Which passes as expected:
Tasks: 12 successful, 12 total
Component
Compiler
Wing Version
0.35.5
Node.js Version
v20.8.0
Platform(s)
Linux
Anything else?
Originally noticed this issue because of a CI failure for the PR #4432. This behavior only happens with node v20 as seen in the pipeline and upon further testing in local environment, it is confirmed that it still passes (the snippet I provided here, as well as the one that caused the ci failure) in node v18, but fails in node v20.
Community Notes
The text was updated successfully, but these errors were encountered: