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

FPP with NATIVE_INT_TYPE compiles but GDS fails to start #2788

Closed
kbotteon opened this issue Jun 25, 2024 · 5 comments
Closed

FPP with NATIVE_INT_TYPE compiles but GDS fails to start #2788

kbotteon opened this issue Jun 25, 2024 · 5 comments
Labels

Comments

@kbotteon
Copy link
Contributor

kbotteon commented Jun 25, 2024

F´ Version 3.4.3
Affected Component fprime-util

Problem Description

An event, and presumably other typed elements, can be specified with an argument of type NATIVE_INT_TYPE and this will build fine. However, when launching GDS, it fails with

[ERROR] Parsing error: Could not find type NATIVE_INT_TYPE
[ERROR] Failed to run application ...
[INFO] Shutting down F prime due to error. Failed to run HTML GUI

Context / Environment

Execute fprime-util version-check and share the output.

└──> fprime-util version-check
Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-4.18.0-513.18.1.el8_9.x86_64-x86_64-with-glibc2.28
Python version: 3.11.5
CMake version: 3.26.5
Pip version: 24.0
Pip packages:
    fprime-tools==3.4.4
    fprime-gds==3.4.3
    fprime-fpp-*==2.1.0a3

How to Reproduce

Introduce an event like

        event REJECTED_EXEC (
            cmdType: ProjectName.CmdIdType
            portNo: NATIVE_INT_TYPE
        ) 

Then build and run GDS.

Expected Behavior

Either the application should fail to compile, or GDS should start with the resulting dictionary.

@kbotteon kbotteon added the bug label Jun 25, 2024
@LeStarch
Copy link
Collaborator

@bocchino can you weigh in?

@bocchino
Copy link
Collaborator

As matters currently stand, (1) you cannot use a type alias like FwFooType in the GDS interface and (2) the FPP checker does not enforce this rule -- it lets the type through so the error occurs in the GDS as reported. We have an open issue nasa/fpp#113 to fix (1) and an open issue nasa/fpp#236 to fix (2).

Until these issue are closed, you just have to know the rules and obey them manually. I anticipate that (2) will be fixed before (1). That is, step 1 of the fix will be that you can't use FwFooType in the GDS interface but the checker will enforce the rule; and step 2 of the fix will be that the model knows what the alias for FwFooType is, so you can use it in the GDS interface.

Finally, in any event you should avoid using NATIVE_INT_TYPE. As of FPP v2.1.0, this type will no longer be supported. You should switch to using a fixed-width type like FwSizeType or FwIndexType.

@kbotteon
Copy link
Contributor Author

kbotteon commented Jul 10, 2024

I used NATIVE_INT_TYPE because that is what the autocoder uses for ports, and the EVR reports the port number an error occurred on. Will those instances be replaced with FwIndexType in the future?

@bocchino
Copy link
Collaborator

Yes, that is the plan. This change is in place in fpp/main and will be released with FPP v2.1.0.

@kbotteon
Copy link
Contributor Author

Got it! Closing the issue as addressed in FPP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants