GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — assert: allow circular references by Trott · Pull Request #6432 · nodejs/node

Conversation

@Trott

@Trott Trott commented Apr 27, 2016

Copy link
Copy Markdown
Member
Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected core subsystem(s)

assert test

Description of change

assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

Fixes: #6416

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Trott Trott added the assert Issues and PRs related to the assert subsystem. label Apr 27, 2016
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to Node.js core tests and test infrastructure. label Apr 27, 2016
addaleax
addaleax reviewed Apr 27, 2016
View reviewed changes
Comment thread lib/assert.js Outdated

@addaleax addaleax Apr 27, 2016

Copy link
Copy Markdown
Member

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.

Maybe use memos.actual.indexOf here and cache it for the next call?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Trott reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@Fishrock123 Fishrock123 mentioned this pull request Apr 27, 2016
Added doc, benchmark and deps/X node core PR labels nodejs/github-bot#32
Merged
@Fishrock123 Fishrock123 removed the test Issues and PRs related to Node.js core tests and test infrastructure. label Apr 27, 2016
@Fishrock123

Fishrock123 commented Apr 27, 2016

Copy link
Copy Markdown
Contributor

Looks like @nodejs-github-bot wrongly labeled this, investigating at #6432

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Trott added 2 commits April 28, 2016 11:03
@Trott
assert: allow circular references
6d13a40
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

Fixes: nodejs#6416
@Trott
squash me
26eb196
@Trott
Trott force-pushed the ada branch from f7dc16e to 26eb196 Compare April 28, 2016 18:40
phillipj added a commit to nodejs/github-bot that referenced this pull request Apr 28, 2016
@phillipj
Fix for bad node core PR exclusive labels.
95ec68a
This fixes some bad labelling by ensuring that *every* file affected in
the PR actually matches an exclusive label when we're checking for exclusive labels.

Refs nodejs/node#6448 nodejs/node#6432
Closes #33
@phillipj phillipj mentioned this pull request Apr 28, 2016
Fix for bad node core PR exclusive labels. nodejs/github-bot#34
Merged
@Trott

Trott commented Apr 28, 2016

Copy link
Copy Markdown
Member Author

Took @addaleax's suggestions, rebased, force-pushed. Hoping to hold off on CI until the pesky issues with tick processor vs. OS X are resolved.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

phillipj added a commit to nodejs/github-bot that referenced this pull request Apr 28, 2016
@phillipj
Fix for bad node core PR exclusive labels. (#34)
a2c330d
This fixes some bad labelling by ensuring that *every* file affected in
the PR actually matches an exclusive label when we're checking for exclusive labels.

Refs nodejs/node#6448 nodejs/node#6432
Closes #33
@addaleax

addaleax commented Apr 28, 2016

Copy link
Copy Markdown
Member

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@jasnell

jasnell commented Apr 29, 2016

Copy link
Copy Markdown
Member

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thefourtheye

thefourtheye commented Apr 29, 2016

Copy link
Copy Markdown
Contributor

Isn't assert just for the core? Does the core need this change?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Apr 29, 2016

Copy link
Copy Markdown
Member Author

@thefourtheye asked:

Isn't assert just for the core? Does the core need this change?

It's not difficult to imagine that a test we write might want to compare two objects that contain circular references.

I think it makes sense to fix this bug before we come across that need rather than waiting for it to come up and create problems for the person who is writing that test.

This is a bug fix. If it were a new feature or an API change, the bar would be considerably higher (in my opinion, at least).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Apr 29, 2016

Copy link
Copy Markdown
Member

+1 to what @Trott said.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thefourtheye

thefourtheye commented Apr 29, 2016

Copy link
Copy Markdown
Contributor

Well, most of the times we would be able to argue that features are bug fixes and vice versa.

For example, this patch could also be interpreted as, asserting circular references feature. At the same time, #2315 can be argued as, bug while asserting Maps and Sets.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Apr 29, 2016

Copy link
Copy Markdown
Member

CI: https://ci.nodejs.org/job/node-test-pull-request/2436/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax addaleax mentioned this pull request Apr 29, 2016
test: move assert to improve clarity #6428
Closed
2 tasks done
@Trott

Trott commented Apr 29, 2016

Copy link
Copy Markdown
Member Author

@thefourtheye I'm taking your comments to mean that you might be skeptical of the need for this, but you aren't opposed to doing this. So I'm going to land this now. (But if I'm wrong, we can revert.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Trott added a commit to Trott/io.js that referenced this pull request Apr 29, 2016
@Trott
assert: allow circular references
d3aafd0
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

PR-URL: nodejs#6432
Fixes: nodejs#6416
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@Trott

Trott commented Apr 29, 2016

Copy link
Copy Markdown
Member Author

Landed in d3aafd0.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott Trott closed this Apr 29, 2016
Fishrock123 pushed a commit that referenced this pull request May 4, 2016
@Trott @Fishrock123
assert: allow circular references
76c9ab5
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

PR-URL: #6432
Fixes: #6416
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
This was referenced May 4, 2016
Propose v6.1.0 wrong base please ignore #6556
Closed
Propose v6.1.0 (Openssl update) #6557
Merged
joelostrowski pushed a commit to joelostrowski/node that referenced this pull request May 4, 2016
@Trott @joelostrowski
assert: allow circular references
46acf73
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

PR-URL: nodejs#6432
Fixes: nodejs#6416
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Fishrock123 added a commit that referenced this pull request May 5, 2016
@Fishrock123
2016-05-05, Version 6.1.0 (Current)
cd7b76e
* assert: `deep{Strict}Equal()` now works correctly with circular
references. (Rich Trott) #6432
* debugger: Arrays are now formatted correctly in the debugger repl.
(cjihrig) #6448
* deps: Upgrade OpenSSL sources to 1.0.2h (Shigeki Ohtsu)
#6550
* net: Introduced a `Socket#connecting` property. (Fedor Indutny)
#6404
  - Previously this information was only available as the undocumented,
internal `_connecting` property.
* process: Introduced `process.cpuUsage()`. (Patrick Mueller)
#6157
* stream: `Writable#setDefaultEncoding()` now returns `this`.
(Alexander Makarenko) #5040
* util: Two new additions to `util.inspect()`:
  - Added a `maxArrayLength` option to truncate the formatting of
Arrays. (James M Snell) #6334
    - This is set to `100` by default.
  - Added a `showProxy` option for formatting proxy intercepting
handlers. (James M Snell) #6465
    - Inspecting proxies is non-trivial and as such this is off by
default.

PR-URL: #6557
Fishrock123 added a commit that referenced this pull request May 5, 2016
@Fishrock123
2016-05-05, Version 6.1.0 (Current)
7f82130
* assert: `deep{Strict}Equal()` now works correctly with circular
references. (Rich Trott) #6432
* debugger: Arrays are now formatted correctly in the debugger repl.
(cjihrig) #6448
* deps: Upgrade OpenSSL sources to 1.0.2h (Shigeki Ohtsu)
#6550
  - Please see our blog post for more info on the security contents of this release:
  - https://nodejs.org/en/blog/vulnerability/openssl-may-2016/
* net: Introduced a `Socket#connecting` property. (Fedor Indutny)
#6404
  - Previously this information was only available as the undocumented,
internal `_connecting` property.
* process: Introduced `process.cpuUsage()`. (Patrick Mueller)
#6157
* stream: `Writable#setDefaultEncoding()` now returns `this`.
(Alexander Makarenko) #5040
* util: Two new additions to `util.inspect()`:
  - Added a `maxArrayLength` option to truncate the formatting of
Arrays. (James M Snell) #6334
    - This is set to `100` by default.
  - Added a `showProxy` option for formatting proxy intercepting
handlers. (James M Snell) #6465
    - Inspecting proxies is non-trivial and as such this is off by
default.

PR-URL: #6557
Fishrock123 added a commit that referenced this pull request May 5, 2016
@Fishrock123
2016-05-05, Version 6.1.0 (Current)
b9ceb42
* assert: `deep{Strict}Equal()` now works correctly with circular
references. (Rich Trott) #6432
* debugger: Arrays are now formatted correctly in the debugger repl.
(cjihrig) #6448
* deps: Upgrade OpenSSL sources to 1.0.2h (Shigeki Ohtsu)
#6550
- Please see our blog post for more info on the security contents of
this release:
- https://nodejs.org/en/blog/vulnerability/openssl-may-2016/
* net: Introduced a `Socket#connecting` property. (Fedor Indutny)
#6404
- Previously this information was only available as the undocumented,
internal `_connecting` property.
* process: Introduced `process.cpuUsage()`. (Patrick Mueller)
#6157
* stream: `Writable#setDefaultEncoding()` now returns `this`.
(Alexander Makarenko) #5040
* util: Two new additions to `util.inspect()`:
- Added a `maxArrayLength` option to truncate the formatting of
Arrays. (James M Snell) #6334
- This is set to `100` by default.
- Added a `showProxy` option for formatting proxy intercepting
handlers. (James M Snell) #6465
- Inspecting proxies is non-trivial and as such this is off by
default.

PR-URL: #6557
@twada twada mentioned this pull request May 6, 2016
Allow circular references twada/universal-deep-strict-equal#3
Closed
azu added a commit to azu/universal-deep-strict-equal that referenced this pull request May 6, 2016
@azu
feat(assert): Allow circular references
e11a573
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

fix: twada#3
refs:nodejs/node#6416
       nodejs/node#6432
azu added a commit to azu/universal-deep-strict-equal that referenced this pull request May 6, 2016
@azu
feat(assert): Allow circular references
4183bf4
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

fix: twada#3
refs:nodejs/node#6416
       nodejs/node#6432
@azu azu mentioned this pull request May 6, 2016
feat(assert): Allow circular references twada/universal-deep-strict-equal#4
Merged
@alberto alberto mentioned this pull request May 7, 2016
Test failing in node 6.1 eslint/eslint#6111
Closed
@MylesBorins

MylesBorins commented Jun 1, 2016

Copy link
Copy Markdown
Contributor

@Trott lts?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott Trott added the lts-watch-v4.x label Jun 2, 2016
@Trott

Trott commented Jun 2, 2016

Copy link
Copy Markdown
Member Author

@thealphanerd Yes, if it lands cleanly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
@Trott Myles Borins
assert: allow circular references
431b615
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

PR-URL: #6432
Fixes: #6416
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@MylesBorins MylesBorins added land-on-v4.x and removed lts-watch-v4.x labels Jul 11, 2016
MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
@Trott Myles Borins
assert: allow circular references
23726c8
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

PR-URL: #6432
Fixes: #6416
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
@Trott @MylesBorins
assert: allow circular references
323e9cd
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

PR-URL: #6432
Fixes: #6416
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
@Trott Myles Borins
assert: allow circular references
ab6eeda
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

PR-URL: #6432
Fixes: #6416
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jul 12, 2016
v4.5.0 proposal #7688
Merged
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
@Trott Myles Borins
assert: allow circular references
d7b13f2
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

PR-URL: #6432
Fixes: #6416
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
@Trott Myles Borins
assert: allow circular references
39e2474
assert.deepEqual() and assert.deepStrictEqual() will no longer throw a
RangeError if passed objects with circular references.

PR-URL: #6432
Fixes: #6416
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@Trott
Trott deleted the ada branch January 13, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

assert Issues and PRs related to the assert subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

assert.deepEqual loops forever with circular refs

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@Trott @Fishrock123 @addaleax @jasnell @thefourtheye @MylesBorins @nodejs-github-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.