Private imports at the highest level

Hi there,

The modeler docs say that in folder mode, all .sysml files are considered to be in the same project. If that’s the case I would expect for private imports outside of packages to be accessible to all the packages across all files, though maybe I am misunderstanding the implementation. Here’s a minimum reproducible example: is it expected for PartA to be visible from the package B namespace?

Hi Mason, in this particular example, you are getting an error because package B needs the full qualified name to know which PartA you are referring to.

So if you specify A::PartA, it will resolve references correctly.

package B {
    part anotherPartA : A::PartA;
}

Equally, you can import A::* inside package B to avoid writing out the qualified name:

package B {
    private import A::*;
    part anotherPartA : PartA;
}

Thank you for the explanation Simas! Either solution needs to reference package A directly.