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

build: update gn build flags for deps #50930

Closed
wants to merge 1 commit into from

Conversation

zcbenz
Copy link
Contributor

@zcbenz zcbenz commented Nov 27, 2023

V8 recently updated node-ci to use a newer version of clang, which requires us to disable a few warnings in deps.

@nodejs-github-bot nodejs-github-bot added dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run. labels Nov 27, 2023
@zcbenz
Copy link
Contributor Author

zcbenz commented Nov 28, 2023

/cc @nodejs/gyp @anonrig

@anonrig
Copy link
Member

anonrig commented Nov 28, 2023

cc @lemire maybe we can fix it upstream

@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 28, 2023
@zcbenz
Copy link
Contributor Author

zcbenz commented Nov 28, 2023

We can try to fix them upstream, but it will not just be a few lines changes.

Some of the errors are from machine generated code:

../../node/deps/simdutf/simdutf.cpp:26609:34: error: code will never be executed [-Werror,-Wunreachable-code]
 26609 |   std::pair<result, char*> ret = avx2_convert_utf32_to_latin1_with_errors(buf, len, latin1_output);
       |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simdutf_warn_unused result implementation::convert_utf32_to_latin1_with_errors(const char32_t* buf, size_t len, char* latin1_output) const noexcept {
  return scalar::utf32_to_latin1::convert_with_errors(buf,len,latin1_output);
  std::pair<result, char*> ret = avx2_convert_utf32_to_latin1_with_errors(buf, len, latin1_output);

And some are intentional:

../../node/deps/simdjson/simdjson.cpp:16357:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
 16357 |   return nullptr;
       |          ^~~~~~~
  /* can't be reached */
  return nullptr;
}

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 28, 2023
@nodejs-github-bot
Copy link
Collaborator

Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

This touches code from our deps, it should land there first otherwise it's going to be overwritten by the next update.

@targos
Copy link
Member

targos commented Nov 29, 2023

These .gni files are not part of the deps. They are kept by the deps_updaters scripts

@lemire
Copy link
Member

lemire commented Nov 30, 2023

@anonrig Correct. Let us fix these issues upstream.

@lemire
Copy link
Member

lemire commented Nov 30, 2023

@anonrig Bumping simdjson to 3.6.1 should help https://github.com/simdjson/simdjson/releases/tag/v3.6.1

@anonrig
Copy link
Member

anonrig commented Nov 30, 2023

Thanks @lemire, I'll trigger the update script.

@lemire
Copy link
Member

lemire commented Nov 30, 2023

@anonrig Bumping simdutf to 4.0.6 should help as well https://github.com/simdutf/simdutf/releases/tag/v4.0.6

@zcbenz
Copy link
Contributor Author

zcbenz commented Dec 1, 2023

@lemire Thank you so much! I confirm the warnings have been fixed with simdutf 4.0.6 and simdjson 3.6.1.

@zcbenz zcbenz closed this Dec 1, 2023
@zcbenz zcbenz deleted the fix-simdjson-gn branch December 1, 2023 00:10
@zcbenz
Copy link
Contributor Author

zcbenz commented Dec 1, 2023

@lemire There are actually a few other warnings disabled when compiling simdutf, I'm pasting them here for your reference:

-Wc++98-compat-extra-semi
../../node/deps/simdutf/simdutf.cpp:5698:83: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
 5698 |   simdutf_really_inline result::result() : error{error_code::SUCCESS}, count{0} {};
      |                                                                                   ^
../../node/deps/simdutf/simdutf.cpp:5700:99: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
 5700 |   simdutf_really_inline result::result(error_code _err, size_t _pos) : error{_err}, count{_pos} {};
      |                                                                                                   ^
../../node/deps/simdutf/simdutf.cpp:26136:4: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
 26136 |   }; 
       |    ^
../../node/deps/simdutf/simdutf.cpp:28472:2: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
 28472 | };
       |  ^
../../node/deps/simdutf/simdutf.cpp:28486:2: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
 28486 | };
       |  ^
../../node/deps/simdutf/simdutf.cpp:29047:2: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
 29047 | };
       |  ^
../../node/deps/simdutf/simdutf.cpp:32513:4: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
 32513 |   }; 
       |    ^
7 errors generated.
-Wunreachable-code-break
../../node/deps/simdutf/simdutf.cpp:20732:9: error: 'break' will never be executed [-Werror,-Wunreachable-code-break]
 20732 |         break;
       |         ^~~~~

@lemire
Copy link
Member

lemire commented Dec 1, 2023

There will be another simdutf patch release.

simdutf/simdutf#356

@lemire
Copy link
Member

lemire commented Dec 1, 2023

@anonrig New patch release with a few more fixes https://github.com/simdutf/simdutf/releases/tag/v4.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants