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 most of Baldr with -Werror #3885

Merged
merged 5 commits into from Jan 1, 2023
Merged

Conversation

dillona
Copy link
Contributor

@dillona dillona commented Dec 31, 2022

No description provided.

@kevinkreiser
Copy link
Member

Thank you for the cleanup and happy new year! I'll review this tomorrow but one thing I noticed is that your changelog entry should be at the bottom of the subsection it's in not at the top. And I may have seen some whitespace discrepencies in the cmakelists.txt changes I'll look closer tomorrow

src/baldr/CMakeLists.txt Outdated Show resolved Hide resolved
src/baldr/CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Member

@nilsnolde nilsnolde left a comment

Choose a reason for hiding this comment

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

Jep thanks. As Kevin said, just a few whitespace issues and the readme entry to the bottom.

Happy new year:)

// --<-- --<--
//
// given p (last_node_id) and c (node_id), return n if there is such a node.
/*
Copy link
Member

Choose a reason for hiding this comment

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

can you also revert this change. its best to avoid whitespace-only changes and instead only make changes that fix an issue. unless there is some change that im not detecting here other than the commenting type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This generated a warning (and therefore error) on Ubuntu 20.04.5 on ARM:

/home/ubuntu/valhalla/src/baldr/merge.cc:147:3: error: multi-line comment [-Werror=comment]
  147 |   //   /   \ e3  /   \ e2  /   \
      |   ^
cc1plus: all warnings being treated as errors
make[3]: *** [src/baldr/CMakeFiles/valhalla-baldr.dir/build.make:466: src/baldr/CMakeFiles/valhalla-baldr.dir/merge.cc.o] Error 1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With GCC 9.4.0:

$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Copy link
Member

Choose a reason for hiding this comment

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

oh man multiline comment as an error... that is a new level of pedantic..

Copy link
Member

Choose a reason for hiding this comment

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

ok i guess that comes from -Wall which we didnt have before we just had -Werror. looking at the various namespaces in the project its clear that we havent yet decided what level of warning is desirable for us, some are just -Werror some add specific ones some add -Wextra as you have here. I think for now we can let it as you have it but at some point we should decide what level or warning should be treated as error and commit to that across the project. i have a feeling i'll regret this suggestion though as i tend to hate overly perscriptive compilers and linters and pretty much everyone else likes the opposite 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I copied and pasted the CMake infrastructure changes from (I think) Mjolnir. I think the sources/sources_with_warnings structure is good and I would probably advocate for standardizing on a common structure and arguments at the top level

CHANGELOG.md Outdated Show resolved Hide resolved
@dillona
Copy link
Contributor Author

dillona commented Jan 1, 2023

Thanks for the reviews and happy new year @kevinkreiser and @nilsnolde

@kevinkreiser kevinkreiser merged commit f378eee into valhalla:master Jan 1, 2023
@dillona dillona deleted the baldr-werror branch January 25, 2023 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants