GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — feat(compilerOption): add instantiationDepthLimit and instantiationCountLimit by jjangga0214 · Pull Request #44997 · microsoft/TypeScript Conversation
|
|
See also #29602 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Anders Hejlsberg (@ahejlsberg) plans to increase the limit in #45025, but so far we don't want to make any limits configurable, since they're such fluctuating implementation details.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Nathan Shively-Sanders (@sandersn) Though it can be viewed as an implementation detail, there're high demands for configuration (See thumbs and overall attention of people). What's more, There're still cases the increased limit can't cover. Thus, how about experimental configuration? P.S. Actually I've already left a comment a month ago about experimental configuration on #45025, but nobody replied to this idea. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I can't stress enough that we don't think this is appropriate to expose as configuration. Today instantiation is a process with a particular memory and runtime cost that occurs during certain operations, but every aspect of that is an implementation detail that could change tomorrow, at which point the numeric limits specified at any given point in time do not translate to the same behavior any more. This isn't a fix for the linked issue and, again, we do not consider this to be a "tunable" parameter. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ok, so you don't consider it, but then I guess more and more "solution" will appear. Since I am not allowed to use a patched tsc, to compile my code I had to use I don't see why it is better to mute errors (with known side effects) instead of allowing parameters tuning for users. The default value can stay in your ownership, so 99.999% of users will use that. If even in a patch version, the behavior changes, we still can adapt to it using the same, or new experimental configuration. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have the same problem while running |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The depth fix mentioned in this article resolved my problem, even when sticking to an initial depth of 1 I would love to know why 😄 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry for commenting on an old post, but changing the parameters to something larger temporarily would allow the developer to determine whether their type is actually recursive or infinite |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm closing this PR because it is stale and the approach is not one we want to take. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
“Type instantiation is excessively deep and possibly infinite” but only in a large codebase
There was an error while loading. Please reload this page.