Skip to content

Conversation

@bnoordhuis
Copy link
Member

And make assert.doesNotThrow() handle it as well.

Fixes: #18027

And make `assert.doesNotThrow()` handle it as well. Fixes: nodejs#18027
@nodejs-github-botnodejs-github-bot added the assert Issues and PRs related to the assert subsystem. label Jan 7, 2018
Copy link
Member

@addaleaxaddaleax left a comment

Choose a reason for hiding this comment

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

LGTM

Maybe start the commit message with assert:? :)

Copy link
Member

@BridgeARBridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM but since this was never documented and never worked before, we might want to add a entry in the changed history part in the documentation.

Copy link
Member

@TimothyGuTimothyGu left a comment

Choose a reason for hiding this comment

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

+1 on a changed entry.


constassert=module.exports=ok;

constNO_EXCEPTION_SENTINEL={};
Copy link
Member

Choose a reason for hiding this comment

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

Would a symbol work here as well?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It's merged now but for posterity: yes, but it doesn't add anything extra and it uses more memory than a plain empty object literal.

Copy link
Contributor

@cjihrigcjihrig left a comment

Choose a reason for hiding this comment

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

LGTM. I like the idea of using a symbol for the sentinel.

Copy link
Member

@jasnelljasnell left a comment

Choose a reason for hiding this comment

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

LGTM but also prefer a Symbol for the sentinel

@jasnell
Copy link
Member

@jasnell
Copy link
Member

Landing this. Can switch the sentinel to a symbol in a separate PR later.

jasnell pushed a commit that referenced this pull request Jan 10, 2018
And make `assert.doesNotThrow()` handle it as well. PR-URL: #18029Fixes: #18027 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@jasnell
Copy link
Member

Landed in 71203f5

@jasnelljasnell closed this Jan 10, 2018
@bnoordhuisbnoordhuis deleted the fix18027 branch January 10, 2018 09:06
@evanlucas
Copy link
Contributor

This is not cherry-picking cleanly to v9.x-staging. If you would like for it to land there, please submit a backport pr. Thanks!

BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Mar 8, 2018
And make `assert.doesNotThrow()` handle it as well. PR-URL: nodejs#18029Fixes: nodejs#18027 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@BridgeARBridgeAR mentioned this pull request Mar 8, 2018
4 tasks
@BridgeAR
Copy link
Member

Backport opened in #19230

MylesBorins pushed a commit that referenced this pull request Mar 15, 2018
And make `assert.doesNotThrow()` handle it as well. Backport-PR-URL: #19230 PR-URL: #18029Fixes: #18027 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@targostargos mentioned this pull request Mar 18, 2018
MylesBorins pushed a commit that referenced this pull request Mar 20, 2018
And make `assert.doesNotThrow()` handle it as well. Backport-PR-URL: #19230 PR-URL: #18029Fixes: #18027 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@MylesBorins
Copy link
Contributor

Requested backport to 8.x in #19230

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assertIssues and PRs related to the assert subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

12 participants

@bnoordhuis@jasnell@evanlucas@BridgeAR@MylesBorins@danbev@addaleax@TimothyGu@cjihrig@XadillaX@targos@nodejs-github-bot