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 — util: freeze `kEnumerableProperty` by LiviaMedeiros · Pull Request #43390 · nodejs/node

Conversation

@LiviaMedeiros

@LiviaMedeiros LiviaMedeiros commented Jun 12, 2022

Copy link
Copy Markdown
Member

Refs: #43159 (comment)

Sorry, something went wrong.

Uh oh!

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

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Jun 12, 2022
@LiviaMedeiros LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jun 12, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jun 12, 2022
@nodejs-github-bot

nodejs-github-bot commented Jun 12, 2022

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

aduh95
aduh95 reviewed Jun 12, 2022
View reviewed changes
Comment thread test/parallel/test-internal-util-objects.js Outdated
Comment on lines 32 to 40

@aduh95 aduh95 Jun 12, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

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.

This doesn't really seem like something we need to care in our tests (in no credible scenario will anyone tries to check what's the value of Object.isSealed(kEnumerableProperty) in core, and if there was a way to make sure the object always behaves as we want it to that doesn't involve freezing it, that'd be fine too), the consequences are what's really important to test imo:

Suggested change
assert.strictEqual(
Object.isExtensible(kEnumerableProperty),
false
);
assert.strictEqual(
Object.isSealed(kEnumerableProperty),
true
);
assert.strictEqual(
Object.isFrozen(kEnumerableProperty),
true
);
assert.throws(
() => { kEnumerableProperty.configurable = false; },
TypeError
);
assert.throws(
() => Object.assign(kEnumerableProperty, { configurable: false }),
TypeError
);
assert.throws(
() => Object.assign(kEnumerableProperty, { enumerable: false }),
TypeError
);

Sorry, something went wrong.

Uh oh!

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

All reactions

@LiviaMedeiros LiviaMedeiros Jun 12, 2022

Copy link
Copy Markdown
Member Author

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.

Conceptually agreed. :)
My concern here is that by assuming alternatives to freezing and possibility of something dangerous (e.g. if there will be unavoidable exposing reference to kEnumerableProperty for userland) we must keep in mind every single way to break it.
If that approach will become common in core, we'll have to create an exhaustive isImmutable() helper function instead.

Sorry, something went wrong.

Uh oh!

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

All reactions
aduh95
aduh95 approved these changes Jun 12, 2022
View reviewed changes
aduh95
aduh95 approved these changes Jun 12, 2022
View reviewed changes
@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Jun 12, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jun 12, 2022
@nodejs-github-bot

nodejs-github-bot commented Jun 12, 2022

Copy link
Copy Markdown
Collaborator

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

LiviaMedeiros reacted with confused emoji
All reactions
  • 😕 1 reaction

Sorry, something went wrong.

Uh oh!

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

@LiviaMedeiros LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jun 13, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jun 13, 2022
@LiviaMedeiros LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jun 13, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jun 13, 2022
@LiviaMedeiros

LiviaMedeiros commented Jun 13, 2022

Copy link
Copy Markdown
Member Author

Looks like CI got borked recently

  • https://ci.nodejs.org/job/node-test-pull-request/44466/
  • https://ci.nodejs.org/job/node-test-pull-request/44471/
  • https://ci.nodejs.org/job/node-test-pull-request/44472/
  • etc.
All reactions

Sorry, something went wrong.

Uh oh!

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

@nodejs-github-bot

nodejs-github-bot commented Jun 13, 2022 •
edited by LiviaMedeiros
Loading

Uh oh!

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

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@nodejs-github-bot

This comment was marked as duplicate.

Sign in to view
benjamingr
benjamingr approved these changes Jun 13, 2022
View reviewed changes
jasnell
jasnell approved these changes Jun 13, 2022
View reviewed changes
@github-actions github-actions Bot mentioned this pull request Jun 14, 2022
CI Reliability 2022-06-14 nodejs/reliability#300
Open
16 tasks
@LiviaMedeiros
LiviaMedeiros force-pushed the util-freeze-kenobirable-property branch from 174856c to 7a84b9b Compare June 14, 2022 15:07
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
BethGriggs
BethGriggs approved these changes Jun 14, 2022
View reviewed changes
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
lpinca
lpinca approved these changes Jun 14, 2022
View reviewed changes
@github-actions github-actions Bot mentioned this pull request Jun 15, 2022
CI Reliability 2022-06-15 nodejs/reliability#301
Open
17 tasks
@nodejs-github-bot

nodejs-github-bot commented Jun 15, 2022

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@LiviaMedeiros
util: freeze kEnumerableProperty
0f90879
PR-URL: nodejs#43390
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@LiviaMedeiros
LiviaMedeiros force-pushed the util-freeze-kenobirable-property branch from 7a84b9b to 0f90879 Compare June 15, 2022 08:42
@LiviaMedeiros
LiviaMedeiros merged commit 0f90879 into nodejs:master Jun 15, 2022
@LiviaMedeiros

LiviaMedeiros commented Jun 15, 2022

Copy link
Copy Markdown
Member Author

Landed in 0f90879

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot mentioned this pull request Jun 16, 2022
CI Reliability 2022-06-16 nodejs/reliability#302
Open
22 tasks
danielleadams pushed a commit that referenced this pull request Jun 16, 2022
@LiviaMedeiros @danielleadams
util: freeze kEnumerableProperty
56b8cc5
PR-URL: #43390
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@danielleadams danielleadams mentioned this pull request Jun 16, 2022
v18.4.0 proposal #43385
Merged
@github-actions github-actions Bot mentioned this pull request Jun 17, 2022
CI Reliability 2022-06-17 nodejs/reliability#303
Open
31 tasks
targos pushed a commit that referenced this pull request Jul 12, 2022
@LiviaMedeiros @targos
util: freeze kEnumerableProperty
8f9a31e
PR-URL: #43390
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
targos pushed a commit that referenced this pull request Jul 31, 2022
@LiviaMedeiros @targos
util: freeze kEnumerableProperty
053347c
PR-URL: #43390
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@targos targos mentioned this pull request Aug 3, 2022
v16.17.0 release proposal #44098
Merged
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
@LiviaMedeiros @guangwong
util: freeze kEnumerableProperty
7755950
PR-URL: nodejs/node#43390
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@benjamingr benjamingr benjamingr approved these changes
@lpinca lpinca lpinca approved these changes
@BethGriggs BethGriggs BethGriggs approved these changes
@aduh95 aduh95 aduh95 approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

7 participants

@LiviaMedeiros @nodejs-github-bot @jasnell @benjamingr @lpinca @BethGriggs @aduh95
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 01402520 — 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.