FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ffi: remove function signature property aliases by Renegade334 · Pull Request #63482 · nodejs/node · GitHub

/ node Public

ffi: remove function signature property aliases - #63482

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
Renegade334:ffi-dealias-signatures
May 24, 2026
Merged

ffi: remove function signature property aliases#63482
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
Renegade334:ffi-dealias-signatures

Conversation

Renegade334 commented May 21, 2026
edited
Loading

Copy link
Copy Markdown
Member

Refs: https://github.com/nodejs/node/pull/62072/changes#r3067834658

Having multiple property name aliases for function signature objects doesn't add utility, but from a TS perspective, it blocks being able to infer the resultant function type from the shape of the signature object. With all else being equal, it'd be useful to get rid of them.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/ffi

nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels May 21, 2026
Renegade334 added the ffi Issues and PRs related to experimental Foreign Function Interface support. label May 21, 2026
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
Renegade334 force-pushed the ffi-dealias-signatures branch from 35c2eee to 52cedc7 Compare May 21, 2026 23:15

codecov Bot commented May 22, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.13%. Comparing base (2f56cd2) to head (fc33b1a).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/ffi-shared-buffer.js 93.02% 3 Missing ⚠️
src/ffi/types.cc 60.00% 0 Missing and 2 partials ⚠️
src/node_ffi.cc 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63482      +/-   ##
==========================================
- Coverage   90.17%   90.13%   -0.05%     
==========================================
  Files         718      718              
  Lines      227731   228342     +611     
  Branches    42768    42919     +151     
==========================================
+ Hits       205365   205807     +442     
- Misses      14145    14274     +129     
- Partials     8221     8261      +40     
Files with missing lines Coverage Δ
src/node_ffi.cc 70.05% <91.66%> (+0.04%) ⬆️
src/ffi/types.cc 46.91% <60.00%> (-2.01%) ⬇️
lib/internal/ffi-shared-buffer.js 98.83% <93.02%> (-0.22%) ⬇️

... and 64 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.

Comment thread doc/api/ffi.md
* `result`, `return`, or `returns` for the return type.
* `parameters` or `arguments` for the parameter type list.
* `result` {string} A [type name][type names] specifying the return type of the
function or callback. **Default:** `'void'`.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If I can cast a vote for keeping return instead of result, I'd like to do so – that's just generally more in line with what the standardized terminology around function signatures is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Well, if I have to pick one I'd go for return and arguments.
@Renegade334 Are you fine with doing so?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Fine by me.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Ok, if @addaleax concurs I think you can continue with the changes.

Renegade334 force-pushed the ffi-dealias-signatures branch 2 times, most recently from d2f2716 to dc9a62b Compare May 23, 2026 16:40
Renegade334 force-pushed the ffi-dealias-signatures branch from dc9a62b to fc33b1a Compare May 23, 2026 16:41
ERR_INTERNAL_ASSERTION,
},
} = require('internal/errors');
const assert = require('internal/assert');

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

A lot of the assertions had to be modified anyway with this changeset, so as a driveby I've changed them all to the canonical internal assertion pattern.

ShogunPanda added the request-ci Add this label to start a Jenkins CI on a PR. label May 24, 2026
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 24, 2026

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

ShogunPanda added the commit-queue Add this label to land a pull request using GitHub Actions. label May 24, 2026
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 24, 2026
nodejs-github-bot merged commit df09b2a into nodejs:main May 24, 2026
82 of 84 checks passed

Copy link
Copy Markdown
Collaborator

Landed in df09b2a

aduh95 pushed a commit that referenced this pull request May 27, 2026
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: #63482
Refs: https://github.com/nodejs/node/pull/62072/changes#r3067834658
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
addaleax added a commit to addaleax/node that referenced this pull request May 30, 2026
Follow-up to df09b2a.

Refs: nodejs#63482
Signed-off-by: Anna Henningsen <anna@addaleax.net>
Renegade334 deleted the ffi-dealias-signatures branch June 1, 2026 16:56
nodejs-github-bot pushed a commit that referenced this pull request Jun 1, 2026
Follow-up to df09b2a.

Refs: #63482
Signed-off-by: Anna Henningsen <anna@addaleax.net>
PR-URL: #63666
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit that referenced this pull request Jun 18, 2026
Follow-up to df09b2a.

Refs: #63482
Signed-off-by: Anna Henningsen <anna@addaleax.net>
PR-URL: #63666
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. ffi Issues and PRs related to experimental Foreign Function Interface support. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL