Skip to content

Conversation

@cola119
Copy link
Member

@cola119cola119 commented Mar 21, 2022

Fixed#42405

The output string of exec command is from RemoteObject[customInspectSymbol], but currently it doesn't support some object types such as Map and Set, which leads to invalid string representations (#42405).

This PR implemented string representations when RemoteObject.subtype is set and map. RemoteObject has their abbreviation as ObjectPreview in RemoteObject.preview, which means we can construct their string representation from ObjectPreview.

For example, new Set([{a: 1}, new Set([1]) ]) is a RemoteObject that has two ObjectPreviews ({a: 1} and new Set([1])).
String representation of ObjectPreview {a: 1} will be {a: 1} and new Set([1]) will be Set(1){... }. (Note that ObjectPreview treats an object nested in two or more layers as overflow, so overflowed object is converted to {... })

1d0da48 added test cases for object type RemoteObject
7820dd4 added ObjectPreview and PropertyPreview. And current string representation logics are ported to them.
5a4f767 fixed string representations of Map and Set.

@nodejs-github-botnodejs-github-bot added debugger Issues and PRs related to the debugger subsystem. needs-ci PRs that need a full CI run. labels Mar 21, 2022
@TrottTrott requested a review from hybristMarch 22, 2022 02:41
Copy link
Contributor

@hybristhybrist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! I like the new split here, just one nit/question.

@cola119cola119 changed the title debugger: Fix Inconsistent inspector output of exec new Map()debugger: Fix inconsistent inspector output of exec new Map()Mar 23, 2022
@meixgmeixg added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 17, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 17, 2022
@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

The way these three commits are organized, the first commit adds a test that fails. This will break git bisect. Can you either move that commit to the end, or else squash the three commits together?

@cola119
Copy link
MemberAuthor

cola119 commented Apr 17, 2022

@Trott I squashed them into the one.

@TrottTrott added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 17, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 17, 2022
@nodejs-github-bot
Copy link
Collaborator

throwerror;
}

cli.waitForInitialBreak()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oy... rather than a long chain of thens... can we convert this into an async function with awaits please?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cola119
Copy link
MemberAuthor

@Trott@jasnell @jkrems Sorry for bothering you. Could you land this when you are free. Thank you.

@TrottTrott added the request-ci Add this label to start a Jenkins CI on a PR. label May 7, 2022
@cola119
Copy link
MemberAuthor

I think debugger-* test should be in test/sequential/.

@Trott
Copy link
Member

Trott commented May 8, 2022

I think debugger-* test should be in test/sequential/.

Most of them are. Maybe this one should be too. The ones in parallel should either not open a port or open a system-provided arbitrary port.

@cola119cola119 requested a review from TrottMay 8, 2022 04:57
@TrottTrott added request-ci Add this label to start a Jenkins CI on a PR. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels May 8, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 8, 2022
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@TrottTrott added the commit-queue Add this label to land a pull request using GitHub Actions. label May 8, 2022
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 8, 2022
@nodejs-github-botnodejs-github-bot merged commit f890ef5 into nodejs:masterMay 8, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in f890ef5

RafaelGSS pushed a commit that referenced this pull request May 10, 2022
@RafaelGSSRafaelGSS mentioned this pull request May 10, 2022
juanarbol pushed a commit that referenced this pull request May 31, 2022
danielleadams pushed a commit that referenced this pull request Jun 27, 2022
targos pushed a commit that referenced this pull request Jul 12, 2022
targos pushed a commit that referenced this pull request Jul 31, 2022
@targostargos mentioned this pull request Aug 3, 2022
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.debuggerIssues and PRs related to the debugger subsystem.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent inspector output of exec new Map()

6 participants

@cola119@nodejs-github-bot@Trott@jasnell@hybrist@meixg