Skip to content

[25469] Improve generated header guards#587

Merged
MiguelCompany merged 1 commit into
masterfrom
bp/25469/4.3.x
Jul 1, 2026
Merged

[25469] Improve generated header guards#587
MiguelCompany merged 1 commit into
masterfrom
bp/25469/4.3.x

Conversation

@MiguelCompany

@MiguelCompany MiguelCompany commented Jul 1, 2026

Copy link
Copy Markdown
Member

Description

  • Header guards should not include characters other than capital letters, numbers, and underscores.
  • IDL files with the same name in different folders should have different header guards
  • For the use case of separate invocations of fastddsgen from different folders, where two different IDL files could have the same relative path, take into account the namespace of the last declared structure, or the namespace of the last declaration.

@Mergifyio backport 4.0.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A: New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
@mergify

mergify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@MiguelCompany
MiguelCompany merged commit 72f89a0 into master Jul 1, 2026
6 checks passed
@MiguelCompany
MiguelCompany deleted the bp/25469/4.3.x branch July 1, 2026 10:39
@MiguelCompany

Copy link
Copy Markdown
Member Author

@Mergifyio backport 4.0.x

@mergify

mergify Bot commented Jul 1, 2026

Copy link
Copy Markdown

backport 4.0.x

✅ Backports have been created

Details

Cherry-pick of 72f89a0 has failed:

On branch mergify/bp/4.0.x/pr-587
Your branch is up to date with 'origin/4.0.x'.

You are currently cherry-picking commit 72f89a0.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   src/test/java/com/eprosima/fastdds/FastDDSGenTest.java

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/main/java/com/eprosima/fastdds/idl/grammar/Context.java

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

MiguelCompany added a commit that referenced this pull request Jul 16, 2026
* Improve generated header guards (#587)

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 72f89a0)

# Conflicts:
#	src/main/java/com/eprosima/fastdds/idl/grammar/Context.java

* Fix conflicts

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-pending PR which CI is running

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fastddsgen generates invalid #ifndef header fence on IDL filename with "-"

2 participants