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

g++ in CI don't report deprecated error #3642

Open
Shylock-Hg opened this issue Jan 5, 2022 · 2 comments
Open

g++ in CI don't report deprecated error #3642

Shylock-Hg opened this issue Jan 5, 2022 · 2 comments
Labels
priority/low-pri Priority: low type/enhancement Type: make the code neat or more efficient

Comments

@Shylock-Hg
Copy link
Contributor

Please check the FAQ documentation before raising an issue

Describe the bug (required)

As shown in #3641
g++ already support it from 4.9 as said in https://gcc.gnu.org/projects/cxx-status.html#cxx14

Your Environments (required)

  • OS: uname -a
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8)

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Step 1
  2. Step 2
  3. Step 3

Expected behavior

Additional context

@Shylock-Hg Shylock-Hg added the type/bug Type: something is unexpected label Jan 5, 2022
@Shylock-Hg
Copy link
Contributor Author

Maybe caused by mistake marked Wno-deprecated-declarations option.

@Sophie-Xie Sophie-Xie added this to the v3.1.0 milestone Jan 11, 2022
@Sophie-Xie Sophie-Xie assigned jiayuehua and CPWstatic and unassigned jiayuehua Jan 27, 2022
@CPWstatic CPWstatic assigned yixinglu and jiayuehua and unassigned CPWstatic Feb 28, 2022
@yixinglu yixinglu added type/enhancement Type: make the code neat or more efficient and removed type/bug Type: something is unexpected labels Mar 10, 2022
@yixinglu
Copy link
Contributor

I test the following compile command for g++ 9.2.0 and don't get any errors:

/opt/vesoft/toolset/clang/10.0.0/bin/g++ -DNEBULA_HOME=/home/yee.yi/Workspace/vesoft/nebula -DS2_USE_GFLAGS -DS2_USE_GLOG -D__STDC_FORMAT_MACROS -I/home/yee.yi/Workspace/vesoft/nebula/src -I/home/yee.yi/Workspace/vesoft/nebula/cmake-build-gcc/src -isystem /opt/vesoft/third-party/
3.0/include -isystem /opt/vesoft/third-party/3.0/include/breakpad -g -Wall -Wextra -Wpedantic -Wunused-parameter -Wshadow -Wnon-virtual-dtor -Woverloaded-virtual -Wignored-qualifiers -Werror -Wno-attributes -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections
 -std=c++17 -o CMakeFiles/meta_version_man_obj.dir/MetaVersionMan.cpp.o -c /home/yee.yi/Workspace/vesoft/nebula/src/meta/MetaVersionMan.cpp

I am also confused about the compiler behavior, I don't specify the Wno-deprecated-declarations when compiling the source file.

However, when switching to clang, we can see the expected error message:

/opt/vesoft/toolset/clang/10.0.0/bin/clang++ -DNEBULA_HOME=/home/yee.yi/Workspace/vesoft/nebula -DS2_USE_GFLAGS -DS2_USE_GLOG -D__STDC_FORMAT_MACROS -I/home/yee.yi/Workspace/vesoft/nebula/src -I/home/yee.yi/Workspace/vesoft/nebula/cmake-build-gcc/src -isystem /opt/vesoft/third-pa
rty/3.0/include -isystem /opt/vesoft/third-party/3.0/include/breakpad -g -Wall -Wextra -Wpedantic -Wunused-parameter -Wshadow -Wnon-virtual-dtor -Woverloaded-virtual -Wignored-qualifiers -Werror -Wno-attributes -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sect
ions -std=c++17 -o CMakeFiles/meta_version_man_obj.dir/MetaVersionMan.cpp.o.2 -c /home/yee.yi/Workspace/vesoft/nebula/src/meta/MetaVersionMan.cpp
/home/yee.yi/Workspace/vesoft/nebula/src/meta/MetaVersionMan.cpp:64:26: error: 'format<std::__cxx11::basic_string<char> >' is deprecated: Use fmt::format instead of folly::format for better performance, build times and compatibility with std::format [-Werror,-Wdeprecated-declarations
]
  auto snapshot = folly::format("META_UPGRADE_SNAPSHOT_{}", MetaKeyUtils::genTimestampStr()).str();
                         ^
/opt/vesoft/third-party/3.0/include/folly/Format.h:258:3: note: 'format<std::__cxx11::basic_string<char> >' has been explicitly marked deprecated here
[[deprecated(
  ^
1 error generated.

these compiler parameters is same. This is really weird!

@Sophie-Xie Sophie-Xie modified the milestones: v3.1.0, v3.2.0 Mar 24, 2022
@Sophie-Xie Sophie-Xie added the priority/low-pri Priority: low label May 25, 2022
@Sophie-Xie Sophie-Xie removed this from the v3.2.0 milestone May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/low-pri Priority: low type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

No branches or pull requests

5 participants