Skip to content
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

Merged
merged 1 commit into from
May 16, 2018

Conversation

lukastaegert
Copy link
Member

This adds logic to handle circular structures when retrieving literal values similar to how this is done in other situations.

Resolves #2192 (hopefully).

Copy link
Contributor

@guybedford guybedford left a 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);
Copy link
Contributor

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?

Copy link
Member Author

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.

@lukastaegert lukastaegert merged commit e69fbf2 into master May 16, 2018
@lukastaegert lukastaegert deleted the circular-get-value branch May 16, 2018 14:38
@lukastaegert
Copy link
Member Author

Released as 0.59.1

@lukastaegert lukastaegert added this to the 0.59.1 milestone May 16, 2018
calebeby pushed a commit to Pigmice2733/scouting-frontend that referenced this pull request May 30, 2018
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#&#8203;0594)
[Compare Source](rollup/rollup@v0.59.3...v0.59.4)
*2018-05-28*
* Fix performance regression when many return statements are used ([#&#8203;2218](`rollup/rollup#2218))

---

### [`v0.59.3`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#&#8203;0593)
[Compare Source](rollup/rollup@v0.59.2...v0.59.3)
*2018-05-24*
* Fix reassignment tracking for constructor parameters ([#&#8203;2214](`rollup/rollup#2214))

---

### [`v0.59.2`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#&#8203;0592)
[Compare Source](rollup/rollup@v0.59.1...v0.59.2)
*2018-05-21*
* Fix reassignment tracking in for-in loops ([#&#8203;2205](`rollup/rollup#2205))

---

### [`v0.59.1`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#&#8203;0591)
[Compare Source](rollup/rollup@v0.59.0...v0.59.1)
*2018-05-16*
* Fix infinite recursion when determining literal values of circular structures ([#&#8203;2193](`rollup/rollup#2193))
* Fix invalid code when simplifying expressions without spaces ([#&#8203;2194](`rollup/rollup#2194))

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants