-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add circularity prevention to value detection #2193
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good, I think I'm starting to even get a vague idea of what ExecutionPathOptions are for :P
const testValue = this.hasUnknownTestValue ? UNKNOWN_VALUE : this.getTestValue(); | ||
const testValue = this.hasUnknownTestValue | ||
? UNKNOWN_VALUE | ||
: this.getTestValue(NEW_EXECUTION_PATH); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there definitely no risk that these NEW_EXECUTION_PATH constants will inadvertently get paths assigned or checked resulting in unwanted mutations for other paths using it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for now as everything is immutable i.e. when a value is added, everything is copied (this is what we have immutable.js for). It's probably NOT a very efficient solution. I hope to completely refactor it soon to make it more efficient and get rid of immutable.js.
Released as 0.59.1 |
This Pull Request updates dependency [rollup](https://github.com/rollup/rollup) from `v0.59.0` to `v0.59.4` <details> <summary>Release Notes</summary> ### [`v0.59.4`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#​0594) [Compare Source](rollup/rollup@v0.59.3...v0.59.4) *2018-05-28* * Fix performance regression when many return statements are used ([#​2218](`rollup/rollup#2218)) --- ### [`v0.59.3`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#​0593) [Compare Source](rollup/rollup@v0.59.2...v0.59.3) *2018-05-24* * Fix reassignment tracking for constructor parameters ([#​2214](`rollup/rollup#2214)) --- ### [`v0.59.2`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#​0592) [Compare Source](rollup/rollup@v0.59.1...v0.59.2) *2018-05-21* * Fix reassignment tracking in for-in loops ([#​2205](`rollup/rollup#2205)) --- ### [`v0.59.1`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#​0591) [Compare Source](rollup/rollup@v0.59.0...v0.59.1) *2018-05-16* * Fix infinite recursion when determining literal values of circular structures ([#​2193](`rollup/rollup#2193)) * Fix invalid code when simplifying expressions without spaces ([#​2194](`rollup/rollup#2194)) --- </details> --- This PR has been generated by [Renovate Bot](https://renovatebot.com).
This adds logic to handle circular structures when retrieving literal values similar to how this is done in other situations.
Resolves #2192 (hopefully).