Skip to content

Add circularity prevention to value detection - #2193

Merged
lukastaegert merged 1 commit into
masterfrom
circular-get-value
May 16, 2018
Merged

Add circularity prevention to value detection#2193
lukastaegert merged 1 commit into
masterfrom
circular-get-value

Conversation

@lukastaegert

Copy link
Copy Markdown
Member

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

Resolves #2192 (hopefully).

@lukastaegert
lukastaegert requested a review from guybedford May 16, 2018 07:08

@guybedford guybedford left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Released as 0.59.1

@lukastaegert lukastaegert added this to the 0.59.1 milestone May 16, 2018
calebeby referenced this pull request in Pigmice2733/scouting-frontend 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](`https://github.com/rollup/rollup/pull/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](`https://github.com/rollup/rollup/pull/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](`https://github.com/rollup/rollup/pull/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](`https://github.com/rollup/rollup/pull/2193`))
* Fix invalid code when simplifying expressions without spaces ([#&#8203;2194](`https://github.com/rollup/rollup/pull/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.

2 participants