PrimitiveTypeConstraint force dispatch fix for a ConstraintSolvingIncompleteError case #1419
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.
Fix for #1395
This fixes this from erroring. Do note a thing though that there might still be something else that should be changed around the Solver to have things a little bit more optimized.
Without the fix it does this:
Image
And here is where the Force Dispatches fail
because the PrimitiveTypeConstraints are still blocked
I've mentioned issue before. Also in this Discord Thread https://discord.com/channels/385151591524597761/1283231116387680388
e.g. @alexmccord @andyfriesen
I also mentioned it to @aatxe regarding one earlier fix breaking
Now, while this maybe doesn't go in-depth about the issue and uses
force
.I do remember the mention that Force Dispatches were once meant to be taken away. But the thing is they're still there and they have a function and I think this is a great fix as a fallback in the meantime.
This fix doesn't break any other Unit Test, unlike the other fixes I've tried.
You can't make the PrimitiveTypeConstraints not block themselves yet 🤷
Functions like
bind
and Subtyping depend on theFreeType
and for some reason the tryDispatch for thePrimitiveTypeConstraint
was set up like that.&nbp;
PrimitiveTypeConstraints are able to block themselves with the type they own. There's just one issue. IF there's ever a case like this one, where there are "cyclic TypeId dependency type things" it will fail and cause an issue.
The actual optimized fix might be somewhere else and the simplification the ConstraintGenerator wants to do for
if then else elseif