fix(js): keep foreign effects and scheduling helpers together - #951
Closed
tachytelicdetonation wants to merge 1 commit into
Closed
tachytelicdetonation wants to merge 1 commit into
tachytelicdetonation wants to merge 1 commit into
Conversation
Contributor
|
Merged into 2.0.25 under your authorship, thank you. Both discovery orders and the Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #946.
An effect named
A.run_needcan overwriteA.run's scheduling helper in the flat JS foreign table, or be overwritten by it. Store one{run, need}record per effect so both functions retain their module's identity regardless of discovery order.Use computed property keys so
__proto__is also stored as an own effect entry, covering the additional reproduction reported by @jasisz on the issue. Existing module isolation and duplicate effect-name checks remain in place.The compiler change is 4 lines added / 5 removed (+12 ttok). Three regression cases cover both discovery orders and
__proto__; the scheduling fixture checks that its helper was invoked without relying on elapsed-time assertions.Verification:
__proto__also failed before the computed-key change. All three now pass through the default runner and emitted JS.git diff --checkpasses. TypeScript diagnostics match the baseline's four existing errors.The private mini-cluster test and performance gates were not available. JS checks used Bun; no cluster timing results are claimed.