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

panic macro prefix #639

Merged
merged 2 commits into from
Nov 18, 2024
Merged

panic macro prefix #639

merged 2 commits into from
Nov 18, 2024

Conversation

pflanze
Copy link
Contributor

@pflanze pflanze commented Nov 6, 2024

Summary

gtest has an ASSERT_EQ macro just like panic.h, and maybe there are more clashes. They weren't a problem at first, but with the command line parsing changes some tests now include panic.h and fail. Solve it once and for all by prefixing all the macro names.

PR Checklist

  • All necessary documentation has been adapted or there is an issue to do so.
  • The implemented feature is covered by an appropriate test. (Existing tests.)

@Taepper
Copy link
Collaborator

Taepper commented Nov 6, 2024

Note that the linter error is a false positive caused by the downgrade of clang-tidy

@fengelniederhammer
Copy link
Contributor

The tests don't build yet:
/src/src/silo/common/panic.test.cpp:113:4: error: ‘DEBUG_ASSERT_GE’ was not declared in this scope; did you mean ‘SILO_DEBUG_ASSERT_GE’?

Is this intentionally a draft PR? Or is it actually ready for review?

@pflanze
Copy link
Contributor Author

pflanze commented Nov 7, 2024

The tests don't build yet: /src/src/silo/common/panic.test.cpp:113:4: error: ‘DEBUG_ASSERT_GE’ was not declared in this scope; did you mean ‘SILO_DEBUG_ASSERT_GE’?

Is this intentionally a draft PR? Or is it actually ready for review?

As mentioned in the standup, that's an oversight (and then I was side tracked by the second unrelated issue first). I'll submit a fixed PR later, Alex will first submit a PR to fix the linter update issues.

@pflanze
Copy link
Contributor Author

pflanze commented Nov 7, 2024

Now should be fixed, except it's not based on a fixed main yet so the linter will still trigger.

BTW I forgot to mention the first of the two commits, which introduces TODO (now SILO_TODO), which is the panic macro I actually most in Rust. Meant to be used temporarily while working on a feature.

@pflanze pflanze marked this pull request as ready for review November 7, 2024 13:48
Copy link
Contributor

github-actions bot commented Nov 7, 2024

This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog.

Note that this might contain changes that are on main, but not yet released.

Changelog:

0.4.0 (2024-11-14)

⚠ BREAKING CHANGES

  • metadataInputFile key in preprocessing config file has been removed. Instead, ndjson files should be used and specified with the ndjsonInputFilename option

Features

Bug Fixes

  • preprocessing: correct error message when field is in config but not in metadata file (828182a)
  • remove shared_ptr in lambda captures which might lead to memory leaks (a26d8b8)

@pflanze
Copy link
Contributor Author

pflanze commented Nov 7, 2024

Ah and yes, draft was accidental, because Github reused the mode from the last PR.

@Taepper Taepper self-assigned this Nov 13, 2024
To avoid clashing with gtest's `ASSERT_EQ` and potentially
more. Prefix all macros at once.
@Taepper Taepper merged commit aa50138 into main Nov 18, 2024
9 checks passed
@Taepper Taepper deleted the cj_panic_macro_prefix branch November 18, 2024 08:32
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.

3 participants