Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: migrate String::Value to String::ValueView #55458

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

RedYetiDev
Copy link
Member

Fixes #54417
Ref: #55452

v8::String::Value is deprecated, so this PR replaces it with v8::String::ValueView

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Oct 19, 2024
@RedYetiDev RedYetiDev mentioned this pull request Oct 19, 2024
7 tasks
@RedYetiDev RedYetiDev force-pushed the v8-string--value-deprecate branch from 67d7fcd to fdc94c9 Compare October 19, 2024 16:29
@RedYetiDev RedYetiDev added needs-citgm PRs that need a CITGM CI run. needs-benchmark-ci PR that need a benchmark CI run. labels Oct 19, 2024
@RedYetiDev
Copy link
Member Author

I've added needs-benchmark-ci PR that need a benchmark CI run. in case this slows / speeds things up / down

I've also added needs-citgm PRs that need a CITGM CI run. as a "just-in-case", as this modifies very important code (E.G. Buffer's IndexOf), and it would be unfortunate if it breaks something we were unaware of.

@RedYetiDev RedYetiDev changed the title src:: migrate String::Value to String::ValueView src: migrate String::Value to String::ValueView Oct 19, 2024
src/node_buffer.cc Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 19, 2024

Codecov Report

Attention: Patch coverage is 62.50000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 88.41%. Comparing base (8ed50bc) to head (862d75c).
Report is 169 commits behind head on main.

Files with missing lines Patch % Lines
src/string_bytes.cc 20.00% 8 Missing ⚠️
src/node_buffer.cc 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #55458   +/-   ##
=======================================
  Coverage   88.41%   88.41%           
=======================================
  Files         653      653           
  Lines      187485   187429   -56     
  Branches    36095    36070   -25     
=======================================
- Hits       165764   165717   -47     
+ Misses      14966    14950   -16     
- Partials     6755     6762    +7     
Files with missing lines Coverage Δ
src/inspector_js_api.cc 86.24% <100.00%> (-0.06%) ⬇️
src/node_buffer.cc 70.47% <91.66%> (+0.11%) ⬆️
src/string_bytes.cc 68.89% <20.00%> (+0.45%) ⬆️

... and 39 files with indirect coverage changes

src/inspector_js_api.cc Outdated Show resolved Hide resolved
src/node_buffer.cc Outdated Show resolved Hide resolved
src/node_buffer.cc Outdated Show resolved Hide resolved
Copy link
Member

@vmoroz vmoroz left a comment

Choose a reason for hiding this comment

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

LGTM

@RedYetiDev RedYetiDev 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. and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 19, 2024
@RedYetiDev
Copy link
Member Author

I'm gonna hold off on a CI until the GitHub builds pass, because there might be failures that are already evident

@RedYetiDev RedYetiDev added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 19, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 19, 2024
@nodejs-github-bot
Copy link
Collaborator

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

@RedYetiDev RedYetiDev removed the needs-ci PRs that need a full CI run. label Oct 20, 2024
@RedYetiDev RedYetiDev requested a review from addaleax October 21, 2024 21:03
@aduh95
Copy link
Contributor

aduh95 commented Oct 22, 2024

RedYetiDev removed the needs-ci PRs that need a full CI run. label

Please don't do that, the label is there to inform the bot this PR requires passing Jenkins CI to land

I've added needs-benchmark-ci PR that need a benchmark CI run. in case this slows / speeds things up / down

What benchmark would we run?

@RedYetiDev
Copy link
Member Author

Please don't do that, the label is there to inform the bot this PR requires passing Jenkins CI to land

That was an accident 😅, I don't even remember doing that.

What benchmark would we run?

I was thinking Buffer (for the indexOf), and string_bytes (if we have one)

@aduh95
Copy link
Contributor

aduh95 commented Oct 24, 2024

CITGM (main): https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/3492/
CITGM (this PR): https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/3493/

@RedYetiDev
Copy link
Member Author

RedYetiDev commented Oct 25, 2024

Results:

FAILURE: 28 failures in 3493 not present in 3492


┌────────────────────────┬───────────────────┬──────────────────────────┬────────────────────────┬────────────────────────┬────────────────┬───────────────┬───────────────────┬────────────────────┬───────────────┬───────────────────────┬──────────────────────┬──────────────────┐
│        (index)         │         0         │            1             │           2            │           3            │       4        │       5       │         6         │         7          │       8       │           9           │          10          │        11        │
├────────────────────────┼───────────────────┼──────────────────────────┼────────────────────────┼────────────────────────┼────────────────┼───────────────┼───────────────────┼────────────────────┼───────────────┼───────────────────────┼──────────────────────┼──────────────────┤
│         osx11          │   'mime-v4.0.4'   │                          │                        │                        │                │               │                   │                    │               │                       │                      │                  │
│      debian12-x64      │  'jest-v29.7.0'   │      'mime-v4.0.4'       │                        │                        │                │               │                   │                    │               │                       │                      │                  │
│      rhel8-s390x       │   'mime-v4.0.4'   │ 'readable-stream-v4.5.2' │                        │                        │                │               │                   │                    │               │                       │                      │                  │
│     rhel8-ppc64le      │   'mime-v4.0.4'   │                          │                        │                        │                │               │                   │                    │               │                       │                      │                  │
│       osx11-x64        │   'mime-v4.0.4'   │                          │                        │                        │                │               │                   │                    │               │                       │                      │                  │
│ fedora-last-latest-x64 │  'jest-v29.7.0'   │      'mime-v4.0.4'       │                        │                        │                │               │                   │                    │               │                       │                      │                  │
│       rhel8-x64        │  'jest-v29.7.0'   │      'mime-v4.0.4'       │                        │                        │                │               │                   │                    │               │                       │                      │                  │
│     ubuntu2204-64      │  'jest-v29.7.0'   │      'mime-v4.0.4'       │                        │                        │                │               │                   │                    │               │                       │                      │                  │
│       win-vs2022       │ 'resolve-v1.22.8' │                          │                        │                        │                │               │                   │                    │               │                       │                      │                  │
│   fedora-latest-x64    │  'dicer-v0.3.1'   │    'duplexer2-v0.1.4'    │ 'end-of-stream-v1.4.4' │ 'full-icu-test-v1.0.3' │ 'jest-v29.7.0' │ 'koa-v2.15.3' │ 'lodash-v4.17.21' │ 'microtime-v3.1.1' │ 'mime-v4.0.4' │ 'multer-v1.4.5-lts.1' │ 'serialport-v12.0.0' │ 'sqlite3-v5.1.7' │
│   alpine-latest-x64    │  'jest-v29.7.0'   │      'mime-v4.0.4'       │                        │                        │                │               │                   │                    │               │                       │                      │                  │
│      aix72-ppc64       │                   │                          │                        │                        │                │               │                   │                    │               │                       │                      │                  │
└────────────────────────┴───────────────────┴──────────────────────────┴────────────────────────┴────────────────────────┴────────────────┴───────────────┴───────────────────┴────────────────────┴───────────────┴───────────────────────┴──────────────────────┴──────────────────┘

All failures appear to be not related to this change, most are ENOTFOUND on github URLs.

@RedYetiDev
Copy link
Member Author

Can someone start a benchmark CI, or remove the label if you don't think it's needed?

@anonrig anonrig added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed needs-benchmark-ci PR that need a benchmark CI run. labels Oct 27, 2024
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Oct 27, 2024
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/55458
✔  Done loading data for nodejs/node/pull/55458
----------------------------------- PR info ------------------------------------
Title      src: migrate `String::Value` to `String::ValueView` (#55458)
Author     Aviv Keller <redyetidev@gmail.com> (@RedYetiDev)
Branch     RedYetiDev:v8-string--value-deprecate -> nodejs:main
Labels     c++, lib / src, author ready, needs-ci, needs-citgm, commit-queue-squash
Commits    5
 - src: migrate `String::Value` to `String::ValueView`
 - fixup! src: migrate `String::Value` to `String::ValueView`
 - fixup! fixup! src: migrate `String::Value` to `String::ValueView`
 - fixup! fixup! fixup! src: migrate `String::Value` to `String::ValueView`
 - fixup! fixup! fixup! fixup! src: migrate `String::Value` to `String::…
Committers 1
 - RedYetiDev <38299977+RedYetiDev@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/55458
Refs: https://github.com/nodejs/node/issues/55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/55458
Refs: https://github.com/nodejs/node/issues/55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last approving review:
   ⚠  - fixup! fixup! fixup! fixup! src: migrate `String::Value` to `String::…
   ℹ  This PR was created on Sat, 19 Oct 2024 16:27:52 GMT
   ✔  Approvals: 3
   ✔  - Vladimir Morozov (@vmoroz): https://github.com/nodejs/node/pull/55458#pullrequestreview-2379682983
   ✔  - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/55458#pullrequestreview-2379711729
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/55458#pullrequestreview-2380689360
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2024-10-19T20:50:38Z: https://ci.nodejs.org/job/node-test-pull-request/63206/
   ℹ  Last CITGM CI on 2024-10-24T21:10:17Z: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/3493/
- Querying data for job/node-test-pull-request/3493/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/11543590208

@RedYetiDev RedYetiDev requested a review from anonrig October 28, 2024 20:59
@RedYetiDev RedYetiDev removed the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Oct 28, 2024
@RedYetiDev
Copy link
Member Author

This needs an approval after the most recent change to land

@anonrig anonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 29, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 29, 2024
@nodejs-github-bot nodejs-github-bot merged commit 45c6a9e into nodejs:main Oct 29, 2024
37 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 45c6a9e

Ceres6 pushed a commit to Ceres6/node that referenced this pull request Oct 30, 2024
Fixes nodejs#54417
Ref: nodejs#55452

PR-URL: nodejs#55458
Refs: nodejs#55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Nov 1, 2024
Fixes #54417
Ref: #55452

PR-URL: #55458
Refs: #55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
Fixes nodejs#54417
Ref: nodejs#55452

PR-URL: nodejs#55458
Refs: nodejs#55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targos targos added dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. labels Nov 12, 2024
@targos
Copy link
Member

targos commented Nov 12, 2024

PR is being reverted because of #55826

tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
Fixes nodejs#54417
Ref: nodejs#55452

PR-URL: nodejs#55458
Refs: nodejs#55452
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. needs-citgm PRs that need a CITGM CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v8::String::Value is deprecated
8 participants