-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
AssertionError: (0, _assert().default)(node.type === 'file')
#8477
Comments
I managed to locally work around this problem by changing this: parcel/packages/core/core/src/RequestTracker.js Lines 768 to 775 in c3bbe0a
to something like: let above = this.getNodeIdsConnectedTo(
fileNameNodeId,
requestGraphEdgeTypes.invalidated_by_create_above,
)
.map(nodeId => nullthrows(this.getNode(nodeId)))
.filter(node => node.type === 'file'); .. since just below glob types seem to be processed separately, and checks if they're connected: parcel/packages/core/core/src/RequestTracker.js Lines 783 to 785 in c3bbe0a
I haven't checked if this passes tests / is valid, but seems to "work for me". Just putting it down here, if I get a chance I'll try it in the codebase and see how tests go. |
This fixes #8477. I wasn't able to get a reliable repro in a test for this, but I have previously manually applied this patch in a large codebase where we saw this issue and it resolved it.
This fixes #8477. I wasn't able to get a reliable repro in a test for this, but I have previously manually applied this patch in a large codebase where we saw this issue and it resolved it. Co-authored-by: mattcompiles <[email protected]>
🐛 bug report
A build using the glob resolver fails with an assertion error when reusing the cache.
Happens only when the modified file isn't actually part of the build
🤔 Expected Behavior
Works
😯 Current Behavior
💻 Code Sample
https:/mischnic/parcel-issue-8477
🌍 Your Environment
The text was updated successfully, but these errors were encountered: