Skip to content

New build warnings #33389

@richardlau

Description

@richardlau
  • Version: master
  • Platform: macOS/Linux
  • Subsystem:

What steps will reproduce the bug?

Build with the --error-on-warn configure option.

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior?

Build succeeds.

What do you see instead?

Build errors on warning:

../src/api/environment.cc: In function 'void node::SetIsolateMiscHandlers(v8::Isolate*, const node::IsolateSettings&)':
../src/api/environment.cc:265:67: error: 'void v8::Isolate::SetHostCleanupFinalizationGroupCallback(v8::HostCleanupFinalizationGroupCallback)' is deprecated: FinalizationRegistry cleanup is automatic if HostCleanupFinalizationGroupCallback is not set [-Werror=deprecated-declarations]
   isolate->SetHostCleanupFinalizationGroupCallback(host_cleanup_cb);
                                                                   ^
In file included from ../src/node.h:67,
                 from ../src/api/environment.cc:1:
../deps/v8/include/v8.h:8560:8: note: declared here
   void SetHostCleanupFinalizationGroupCallback(
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [libnode.target.mk:343: /home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/obj.target/libnode/src/api/environment.o] Error 1
make[2]: *** Waiting for unfinished jobs....
../src/env.cc: In member function 'void node::Environment::CleanupFinalizationGroups()':
../src/env.cc:1170:29: error: 'static v8::Maybe<bool> v8::FinalizationGroup::Cleanup(v8::Local<v8::FinalizationGroup>)' is deprecated: FinalizationGroup cleanup is automatic if HostCleanupFinalizationGroupCallback is not set [-Werror=deprecated-declarations]
     if (!FinalizationGroup::Cleanup(fg).FromMaybe(false)) {
                             ^~~~~~~
In file included from ../src/util.h:31,
                 from ../src/util-inl.h:29,
                 from ../src/aliased_buffer.h:7,
                 from ../src/env.h:27,
                 from ../src/env.cc:1:
../deps/v8/include/v8.h:5965:44: note: declared here
   static V8_WARN_UNUSED_RESULT Maybe<bool> Cleanup(
                                            ^~~~~~~
../src/env.cc:1170:39: error: 'static v8::Maybe<bool> v8::FinalizationGroup::Cleanup(v8::Local<v8::FinalizationGroup>)' is deprecated: FinalizationGroup cleanup is automatic if HostCleanupFinalizationGroupCallback is not set [-Werror=deprecated-declarations]
     if (!FinalizationGroup::Cleanup(fg).FromMaybe(false)) {
                                       ^
In file included from ../src/util.h:31,
                 from ../src/util-inl.h:29,
                 from ../src/aliased_buffer.h:7,
                 from ../src/env.h:27,
                 from ../src/env.cc:1:
../deps/v8/include/v8.h:5965:44: note: declared here
   static V8_WARN_UNUSED_RESULT Maybe<bool> Cleanup(
                                            ^~~~~~~
../src/env.cc:1170:39: error: 'static v8::Maybe<bool> v8::FinalizationGroup::Cleanup(v8::Local<v8::FinalizationGroup>)' is deprecated: FinalizationGroup cleanup is automatic if HostCleanupFinalizationGroupCallback is not set [-Werror=deprecated-declarations]
     if (!FinalizationGroup::Cleanup(fg).FromMaybe(false)) {
                                       ^
In file included from ../src/util.h:31,
                 from ../src/util-inl.h:29,
                 from ../src/aliased_buffer.h:7,
                 from ../src/env.h:27,
                 from ../src/env.cc:1:
../deps/v8/include/v8.h:5965:44: note: declared here
   static V8_WARN_UNUSED_RESULT Maybe<bool> Cleanup(
                                            ^~~~~~~
cc1plus: all warnings being treated as errors

Additional information

Something has landed within the last day or so that has introduced some new warnings which is failing the builds that have the --error-on-warn configure flag on. e.g. GitHub actions (after #33357 landed) and the UBI 8.1 containered build, e.g. from today's daily: https://ci.nodejs.org/job/node-test-commit-linux-containered/20158/nodes=ubi81_sharedlibs_openssl111fips_x64/console

I'd guess it might be the V8 8.3 update (#32831) whose CI runs were from before we enabled the flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions