-
Notifications
You must be signed in to change notification settings - Fork 110
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
Switch From Clang To GCC #1184
Switch From Clang To GCC #1184
Conversation
…d-behavior Added Check To Make Sure Shot Optional Is Not std::nullopt
@jonathanlew segfaults were due to variables in some of my physics tests being destroyed in a different order due to change in compilers. In some low-level tests certain variables must always be destroyed first due to how Box2D manages its pointers. |
Sorry, not sure what a "build switch" is? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another question for my sanity
- bash <(curl -s https://codecov.io/bash) | ||
# Build our CPU-specific targets | ||
- bazel build //firmware_new/... --cpu=stm32h7 | ||
bazel coverage //software/... \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just want to double check. Bazel's CLI-Reference says the coverage
command "Generates code coverage report for specified test targets". It seems it's roughly the same as test
but with coverage. Does this mean we're not building all the code, ie. missing the top-level code not associated with tests?
I know we need to build code with covarege enabled to get the coverage data (so doesn't make sense to necessarily call build
here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, I just thought of this while I was cleaning this up..........
We could run bazel build //software:full_system_main
as well, but the different command line options would probably trigger a re-compile of basically everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth trying locally. Or perhaps we can somehow pass the coverage flags to build
first? My understanding is that the main difference is the extra symbols / tracking built in for coverage to consume
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just made some changes to full_system_main.cpp
and it failed. No test depends on that target, so looks like bazel builds everything. So this is actually a non-issue! 🎉
Commented in line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e8b0d7c
e8b0d7c
to
106cf37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending CI 👍
…emoved unused functions
Ok so after some investigation it turns out you can't pass matrices as Eg.
This is valid C code, but invalid C code. (although C does throw a warning). The easiest solution was to move the offending matrix / linear algebra code to a new file and build target, so it can be purely built as C and use Variable Length Arrays. We should consider proper "Shareable" matrix and vector types moving forwards, but that's out of scope for this PR. The commits I pushed move the matrix functions to a new file, and also removed any unused functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Please fill out the following before requesting review on this PR
Description
This is basically #1177 with some extra changes to fix test segfaults, build issues, and code coverage.
Testing Done
Builds and passes in CI, coverage is properly generated.
Resolved Issues
resolves #1124
Length Justification
Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
.h
file) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom
. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.TODO
(or similar) statements should either be completed or associated with a github issue