-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Case-specific identifier names? #3164
Comments
Agreed. Thanks for posting this. For now the recommendation would be to use case-insensitive uniqueness in name. However, it is worth taking a look. |
I don't think this is a bug. It is a known behavior, which we can consider revising. Should we move this issue to a discussion? My personal view is that we should do one of two things:
In case 2, if we want parameters in the dictionary to have the form A third option is to specify and check a bunch of rules about what gets transformed to what in the generated code. For example, you can write
|
Note also that the current approach (allow |
I was thinking that this could be fixed by checking FPP identifier uniqueness case-insensitively, and adding such a qualifier to the FPP Language Spec/User's guide. That way, the behavior which is already implicitly not allowed becomes explicitly not allowed, and we don't have to worry about supporting it. I think in general I'm working under the assumption that all valid FPP code should have a valid CPP equivalent, but this is probably naive. I understand that you don't want design decisions about FPP to be made with reference to the CPP autocode, that makes sense to me. |
Current recommendation:
|
Problem Description
In an admittedly awful situation, if I wanted to name one parameter
param1
and anotherParam1
, the FPrime specification does not mention whether this is valid, as it does not mention whether capitalization has syntactic meaning for identifiers. Right now, it seems like this would work, if it were not for the fact that the auto-generated PRM_SET/SAVE commands automatically capitalize the parameter names. This means that two parameters with a name which differs only by capitalization conflict because their SET/SAVE cmds have the same name.Likewise, similar thing happens for telemetry. It is valid FPP, but the compilation step crashes because there are two enum consts named
CHANNELID_XXXX
, whereXXXX
is the name of the telemetry channel being duplicated.Context / Environment
Execute
fprime-util version-check
and share the output.How to Reproduce
Expected Behavior
Maybe this should be caught at the FPP level?
This is certainly a minor problem, but it is worth mentioning.
The text was updated successfully, but these errors were encountered: