Skip to content

src: use ranges library (C++20) more systematically - #58028

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
lemire:more_ranges
Jun 26, 2025
Merged

src: use ranges library (C++20) more systematically#58028
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
lemire:more_ranges

Conversation

@lemire

Copy link
Copy Markdown
Member

In PR #57975, I introduced C++20 ranges as an experiment. This current PR extends the application of ranges to simplify even more code.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/config
  • @nodejs/crypto
  • @nodejs/http2
  • @nodejs/net
  • @nodejs/single-executable
  • @nodejs/startup

@lemire
lemire requested a review from anonrigApril 25, 2025 18:49
@nodejs-github-botnodejs-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 Apr 25, 2025
Comment threadtest/cctest/test_inspector_socket_server.cc
@codecov

codecovBot commented Apr 25, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 90.90909% with 3 lines in your changes missing coverage. Please review.

Project coverage is 90.27%. Comparing base (25fe802) to head (0a1606a).
Report is 495 commits behind head on main.

Files with missing linesPatch %Lines
src/inspector_socket.cc0.00%0 Missing and 1 partial ⚠️
src/node.cc85.71%0 Missing and 1 partial ⚠️
src/node_credentials.cc0.00%0 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #58028 +/- ##
=======================================
Coverage 90.27% 90.27% =======================================
Files 630 630 Lines 186159 186147 -12 Branches 36473 36474 +1 =======================================
- Hits 168053 168050 -3 - Misses 10976 10977 +1 + Partials 7130 7120 -10 
Files with missing linesCoverage Δ
src/cleanup_queue.cc85.00% <100.00%> (-0.72%)⬇️
src/crypto/crypto_util.cc72.26% <100.00%> (+0.25%)⬆️
src/inspector_socket_server.cc85.32% <100.00%> (ø)
src/node_dotenv.cc84.53% <100.00%> (ø)
src/node_http2.h91.61% <100.00%> (-0.05%)⬇️
src/node_messaging.cc82.62% <100.00%> (+0.13%)⬆️
src/node_platform.cc88.67% <100.00%> (-0.03%)⬇️
src/node_process_object.cc86.17% <100.00%> (-0.12%)⬇️
src/node_report.cc93.22% <100.00%> (-0.02%)⬇️
src/node_sea.cc91.28% <100.00%> (-0.03%)⬇️
... and 5 more

... and 20 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@anonriganonrig added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 25, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 25, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@vmorozvmoroz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lemirelemire added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 26, 2025
@RafaelGSSRafaelGSS added dont-land-on-v18.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 Apr 29, 2025

@RafaelGSSRafaelGSS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Added the dont-land labels to the release lines without C++20 support.

@anonriganonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 26, 2025
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 26, 2025
@nodejs-github-bot
nodejs-github-bot merged commit 2e9e844 into nodejs:mainJun 26, 2025
4 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 2e9e844

targos pushed a commit that referenced this pull request Jul 3, 2025
PR-URL: #58028
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
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.c++Issues and PRs that require attention from people who are familiar with C++.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.dont-land-on-v22.xPRs that should not land on the v22.x-staging branch and should not be released in v22.x.lib / srcIssues and PRs related to general changes in the lib or src directory.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

14 participants

@lemire@nodejs-github-bot@jasnell@vmoroz@anonrig@codebytere@tniessen@aymen94@trivikr@RafaelGSS@marco-ippolito@RaisinTen@bjohansebas@aduh95