Skip to content

Conversation

dylandreimerink
Copy link
Member

This commit replaces the old school header guards with #pragma once. This is a more modern way of preventing multiple inclusion of the same header file.

In future we will be using scripts to remove macros, by replacing these now with the proper #pragma once we avoid having to write exceptions for these in the scripts.

@dylandreimerink dylandreimerink added dont-merge/preview-only Only for preview or testing, don't merge it. release-note/misc This PR makes changes that have no direct user impact. labels Apr 29, 2024
@dylandreimerink dylandreimerink force-pushed the feature/pragma-once branch 8 times, most recently from d6a933a to 381fd7e Compare May 2, 2024 10:12
@dylandreimerink
Copy link
Member Author

/test

@dylandreimerink
Copy link
Member Author

/test

@dylandreimerink
Copy link
Member Author

/test

@dylandreimerink
Copy link
Member Author

/test

@dylandreimerink dylandreimerink removed the dont-merge/preview-only Only for preview or testing, don't merge it. label May 8, 2024
@dylandreimerink dylandreimerink marked this pull request as ready for review May 8, 2024 11:35
@dylandreimerink dylandreimerink requested review from a team as code owners May 8, 2024 11:35
@dylandreimerink
Copy link
Member Author

/test

Copy link
Member

@borkmann borkmann left a comment

Choose a reason for hiding this comment

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

(ack, assuming small nits get fixed)

@dylandreimerink dylandreimerink force-pushed the feature/pragma-once branch 3 times, most recently from 5c6ff0e to 8c58c48 Compare May 27, 2024 10:54
@dylandreimerink
Copy link
Member Author

/test

@dylandreimerink dylandreimerink force-pushed the feature/pragma-once branch 2 times, most recently from c331ac0 to af04a7a Compare June 3, 2024 13:56
@dylandreimerink
Copy link
Member Author

/test

1 similar comment
@dylandreimerink
Copy link
Member Author

/test

@dylandreimerink
Copy link
Member Author

/test

@dylandreimerink dylandreimerink force-pushed the feature/pragma-once branch 2 times, most recently from 9a1fc12 to e42fb75 Compare June 10, 2024 11:21
This commit replaces the old school header guards with #pragma once.
This is a more modern way of preventing multiple inclusion of the same
header file.

In future we will be using scripts to remove macros, by replacing these
now with the proper #pragma once we avoid having to write exceptions for
these in the scripts.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
This test was using global variables to store mocking settings. This is
triggering CI, likely due to a change in the Go code somewhere. So
switching the test over to using a map to store these settings.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
The config_replacement.h was originally meant to replace static_data
variables for tests. But since then the implementation has changed so
static_data always has valid defaults and values can be changed with
special test macros. So we no longer need config_replacement.h.

Removing it now since it relied on header guards to prevent multiple
inclusions of the replaced variables, which we removed.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
This tool checks for legacy header guards and will throw an error if it
finds any. Adding this to the CI should ensure that we don't add any
more legacy header guards once we switched to prama-once.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
@dylandreimerink
Copy link
Member Author

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jun 10, 2024
@dylandreimerink dylandreimerink added this pull request to the merge queue Jun 10, 2024
Merged via the queue into cilium:main with commit fdc9bf9 Jun 10, 2024
@dylandreimerink dylandreimerink deleted the feature/pragma-once branch June 10, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants