Skip to content

build,win: fix dll build #58357

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

StefanStojanovic
Copy link
Contributor

@StefanStojanovic StefanStojanovic commented May 16, 2025

Fixes a linker error when building Node.js DLL with ClangCL by moving BuiltinLoader::GetBuiltinIds() implementation from .h to .cc file.

This PR tries different approach from #58235 based on @joyeecheung's comment

Fixes: #58208

@StefanStojanovic StefanStojanovic added c++ Issues and PRs that require attention from people who are familiar with C++. windows Issues and PRs related to the Windows platform. labels May 16, 2025
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label May 16, 2025
@StefanStojanovic StefanStojanovic added the request-ci Add this label to start a Jenkins CI on a PR. label May 16, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 16, 2025
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented May 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.24%. Comparing base (8053a5c) to head (6dd6474).
Report is 38 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #58357   +/-   ##
=======================================
  Coverage   90.23%   90.24%           
=======================================
  Files         633      633           
  Lines      186847   186847           
  Branches    36685    36685           
=======================================
+ Hits       168594   168612   +18     
+ Misses      11041    11037    -4     
+ Partials     7212     7198   -14     
Files with missing lines Coverage Δ
src/node_builtins.cc 79.27% <100.00%> (-0.15%) ⬇️
src/node_builtins.h 100.00% <ø> (ø)

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

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

[[nodiscard]] auto GetBuiltinIds() const {
return std::views::keys(*source_.read());
}
[[nodiscard]] auto GetBuiltinIds() const -> decltype(auto);
Copy link
Member

@legendecas legendecas May 20, 2025

Choose a reason for hiding this comment

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

The function is not inlined. It should not use auto type for return value. Otherwise the type can not be deducted if this function is used without its definition.

Suggested change
[[nodiscard]] auto GetBuiltinIds() const -> decltype(auto);
[[nodiscard]] std::ranges::keys_view<std::ranges::ref_view<const BuiltinSourceMap>> GetBuiltinIds() const;

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++. needs-ci PRs that need a full CI run. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot build libnode v24.0.0 on Windows
4 participants