Skip to content

Import and expose do not respect private imports #799

Description

@rolling-robot

Import and expose do not respect private imports

I am working with model with the following structure

package Model {
  package a {
    part p;
  }
  package b {
    private import a::*;
  }
  package c {
    view v {
      expose b::**;
    }
  }
}

Using pilot implementation rendering the view actually exposes part p, whereas I am expecting nothing.

I actually made tests with slightly more complex example, but structure is the same:

package Model {
    private import SysML::*;
    private import StandardViewDefinitions::**;
    part def Component;
    package Parts {
        private import Model::*;
        part 'System A' {
            part 'Part A1' : Component;
            part 'Part A2' : Component;
        }
        part 'System B' {
            part 'Part B1' : Component;
            part 'Part B2' : Component;
        }
    }
    view partTree : BrowserView {
        expose Model::Parts::*;
        filter @PartUsage;
    }
}

Using it, the following figure is rendered:
Image

Notice partTree view object that is present on the diagram. It gets exposed because it gets imported into exposed Model::Parts package by line private import Model::*, but I expect that import to remain private to Parts package and thus not exposed by view.

That looks like a bug to me.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions