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: remove erroneous default argument in RadixTree #50736

Merged

Conversation

tniessen
Copy link
Member

This default argument can never benefit any potential caller because any call site that occurs after this definition will result in a compiler error due to RadixTree::Lookup(const std::string_view&) now being an ambiguous call target.

The original unambiguous definition is this:

bool Lookup(const std::string_view& s) { return Lookup(s, false); }
bool Lookup(const std::string_view& s, bool when_empty_return);

@tniessen tniessen added the c++ Issues and PRs that require attention from people who are familiar with C++. label Nov 15, 2023
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Nov 15, 2023
Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

Good catch. I forgot to remove it on the last update.

@tniessen tniessen 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 Nov 15, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 15, 2023
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@H4ad H4ad added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 17, 2023
@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 Nov 17, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/50736
✔  Done loading data for nodejs/node/pull/50736
----------------------------------- PR info ------------------------------------
Title      src: remove erroneous default argument in RadixTree (#50736)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     tniessen:src-perm-erroneous-default-value -> nodejs:main
Labels     c++, author ready, needs-ci
Commits    1
 - src: remove erroneous default argument in RadixTree
Committers 1
 - Tobias Nießen 
PR-URL: https://github.com/nodejs/node/pull/50736
Reviewed-By: Rafael Gonzaga 
Reviewed-By: Vinícius Lourenço Claro Cardoso 
Reviewed-By: Luigi Pinca 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/50736
Reviewed-By: Rafael Gonzaga 
Reviewed-By: Vinícius Lourenço Claro Cardoso 
Reviewed-By: Luigi Pinca 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Wed, 15 Nov 2023 00:45:47 GMT
   ✔  Approvals: 3
   ✔  - Rafael Gonzaga (@RafaelGSS) (TSC): https://github.com/nodejs/node/pull/50736#pullrequestreview-1731124346
   ✔  - Vinícius Lourenço Claro Cardoso (@H4ad): https://github.com/nodejs/node/pull/50736#pullrequestreview-1732136211
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/50736#pullrequestreview-1733010137
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2023-11-15T20:42:40Z: https://ci.nodejs.org/job/node-test-pull-request/55669/
- Querying data for job/node-test-pull-request/55669/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
   d1326e5b54..09c3bb15d7  main       -> origin/main
✔  origin/main is now up-to-date
main is out of sync with origin/main. Mismatched commits:
 - e1de547880 permission: mark const functions as such
 - 09c3bb15d7 permission: mark const functions as such
--------------------------------------------------------------------------------
HEAD is now at 09c3bb15d7 permission: mark const functions as such
   ✔  Reset to origin/main
- Downloading patch for 50736
From https://github.com/nodejs/node
 * branch                  refs/pull/50736/merge -> FETCH_HEAD
✔  Fetched commits as d1326e5b54f7..b2b31398d31c
--------------------------------------------------------------------------------
Auto-merging src/permission/fs_permission.cc
CONFLICT (content): Merge conflict in src/permission/fs_permission.cc
error: could not apply b2b31398d3... src: remove erroneous default argument in RadixTree
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
   ✘  Failed to apply patches
https://github.com/nodejs/node/actions/runs/6903699999

@tniessen tniessen removed the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Nov 17, 2023
This default argument can never benefit any potential caller because any
call site that occurs after this definition will result in a compiler
error due to RadixTree::Lookup(const std::string_view&) now being an
ambiguous call target.
@tniessen tniessen force-pushed the src-perm-erroneous-default-value branch from b2b3139 to 9f59418 Compare November 17, 2023 13:44
@tniessen
Copy link
Member Author

Rebased, so needs another CI run and re-approval.

@tniessen tniessen added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 17, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 17, 2023
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@tniessen tniessen added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 19, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 19, 2023
@nodejs-github-bot nodejs-github-bot merged commit 2059913 into nodejs:main Nov 19, 2023
53 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 2059913

targos pushed a commit that referenced this pull request Nov 23, 2023
This default argument can never benefit any potential caller because any
call site that occurs after this definition will result in a compiler
error due to RadixTree::Lookup(const std::string_view&) now being an
ambiguous call target.

PR-URL: #50736
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
martenrichter pushed a commit to martenrichter/node that referenced this pull request Nov 26, 2023
This default argument can never benefit any potential caller because any
call site that occurs after this definition will result in a compiler
error due to RadixTree::Lookup(const std::string_view&) now being an
ambiguous call target.

PR-URL: nodejs#50736
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
lucshi pushed a commit to lucshi/node that referenced this pull request Nov 27, 2023
This default argument can never benefit any potential caller because any
call site that occurs after this definition will result in a compiler
error due to RadixTree::Lookup(const std::string_view&) now being an
ambiguous call target.

PR-URL: nodejs#50736
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@RafaelGSS RafaelGSS mentioned this pull request Nov 28, 2023
RafaelGSS pushed a commit that referenced this pull request Nov 29, 2023
This default argument can never benefit any potential caller because any
call site that occurs after this definition will result in a compiler
error due to RadixTree::Lookup(const std::string_view&) now being an
ambiguous call target.

PR-URL: #50736
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Nov 30, 2023
This default argument can never benefit any potential caller because any
call site that occurs after this definition will result in a compiler
error due to RadixTree::Lookup(const std::string_view&) now being an
ambiguous call target.

PR-URL: #50736
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
This default argument can never benefit any potential caller because any
call site that occurs after this definition will result in a compiler
error due to RadixTree::Lookup(const std::string_view&) now being an
ambiguous call target.

PR-URL: #50736
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@UlisesGascon UlisesGascon mentioned this pull request Dec 12, 2023
UlisesGascon pushed a commit that referenced this pull request Dec 19, 2023
This default argument can never benefit any potential caller because any
call site that occurs after this definition will result in a compiler
error due to RadixTree::Lookup(const std::string_view&) now being an
ambiguous call target.

PR-URL: #50736
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@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++. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants