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

fprime-util impl should generate fully qualified header guards #1943

Closed
pcrosemurgy opened this issue Mar 23, 2023 · 3 comments
Closed

fprime-util impl should generate fully qualified header guards #1943

pcrosemurgy opened this issue Mar 23, 2023 · 3 comments
Assignees
Labels
enhancement F´ Tools Issues pertaining to the F´ tools

Comments

@pcrosemurgy
Copy link
Contributor

pcrosemurgy commented Mar 23, 2023

F´ Version
Affected Component

Feature Description

While working on a custom Framer.fpp I am hand-editing the autogenerated Framer.hpp-template header guards to be fully-qualified to avoid accidentally #ifndef'ing too liberally. If there exists a Foo.Framer and Bar.Framer there will be a collision if the autogenerated header guards are taken as-is.

For example, my Framer.fpp within module Foo generates the same guards as Framer.fpp within module Bar:

#ifndef Framer_HPP
#define Framer_HPP
...
#endif 

It may be best to instead generate:

#ifndef Foo_Framer_HPP
#define Foo_Framer_HPP
...
#endif 

Rationale

This is a bit of a mix between a feature request / bug report. It's somewhat reasonable to expect hand-editing these #ifndef guards but if this can be autogenerated safely to begin with that would be nice to have.

@thomas-bc thomas-bc self-assigned this Apr 14, 2023
@thomas-bc thomas-bc added the F´ Tools Issues pertaining to the F´ tools label Apr 26, 2023
@LeStarch
Copy link
Collaborator

LeStarch commented May 3, 2023

I thought we merged a fix for this. Did we not?

@thomas-bc
Copy link
Collaborator

@LeStarch I don't remember seeing that go through, but I may have missed it?

@pcrosemurgy
Copy link
Contributor Author

@LeStarch is referring to #1935, which I think should close this. Sorry for the confusion, I can't seem to replicate this so I think I made this ticket while mistakenly not using an F-Prime with #1935 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement F´ Tools Issues pertaining to the F´ tools
Projects
None yet
Development

No branches or pull requests

3 participants