nasa / fpp

F Prime Prime: A modeling language for F Prime
https://fprime.jpl.nasa.gov
Apache License 2.0
49 stars 31 forks source link

Qualified Identifiers for nested modules are incorrect in `TopologyAc.hpp` and `TopologyAc.cpp` #453

Closed jwest115 closed 3 months ago

jwest115 commented 3 months ago

Example:

module Components {

    module Nested {

        @ Component to blink an LED driven by a rate group
        active component Led {
        ...
        }
    }
}

Expected lines in TopologyAc.hpp and TopologyAc.cpp:

//! led
extern Components::Nested::Led led;
Components::Nested::Led led(FW_OPTIONAL_NAME("led"));

Actual:

//! led
extern Nested::Components::Led led;
Nested::Components::Led led(FW_OPTIONAL_NAME("led"));

Was able to trace it back to this line in TopologyCppWriterUtils.scala

bocchino commented 3 months ago

Good catch! It's a bug in the management of qualified names. I'll submit a fix.