Skip to content

Renamed or added types are not correctly resolved when rebuilding #2999

@celskeggs

Description

@celskeggs
F´ Version v3.4.3-117-g65b9e4d9d
Affected Component build system

Problem Description

When I add or rename a type, the locs.fpp files in the build directory do not get regenerated on the next build. This results in undefined symbol errors when I try to rebuild:

[1/22] Generating MyComponentComponentAi.xml
FAILED: MyComponent/MyComponentComponentAi.xml [...]/MyComponent/MyComponentComponentAi.xml
cd [...] && /usr/local/bin/fpp-to-xml -d [...]/MyComponent -i [... list of fpp files ...] -p [...]
fpp-to-xml
[...]/MyComponent/MyComponent.fpp:6.63
        sync input port example: Components.MyComponent.ExamplePort
                                                        ^
error: undefined symbol ExamplePort

The problem can be solved by purging and regenerating the build directory, but I should not have to do that every time I add a new type. Note that the problem CANNOT be solved by simply deleting either of the locs.fpp files. I encounter this problem both with the ninja-based build system and the regular make-based build system.

Context / Environment

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

Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.34
Python version: 3.9.18
CMake version: 3.26.5
Pip version: 21.2.3
Pip packages:
    fprime-tools==3.4.5a1
    fprime-gds==3.4.4a3
    fprime-fpp-*==2.2.0a5

How to Reproduce

  1. Generate a build directory with fprime-util generate --ninja or fprime-util generate
  2. Add a new port type and reference it from another .fpp file
  3. Attempt to run the build with fprime-util build
  4. Observe that the build fails.
  5. Run fprime-util purge (enter yes)
  6. Regenerate with fprime-util generate --ninja or fprime-util generate
  7. Rebuild with fprime-util build
  8. Observe that the build succeeds.

Expected Behavior

I should never need to purge the build directory to fix the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcmakeIssues pertaining to the CMake build system.

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions