-
Notifications
You must be signed in to change notification settings - Fork 63
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
Limiting the visibility of reactor classes #194
Comments
This sounds like a good step to me. Being able to export a composite without exporting the components is a clear win. It also removes the oddness that import does not import main reactors. |
Sounds also good to me. I would prefer |
Just to clarify, do we want to be able to export main reactors? I'm assuming that if we do, we'd simply treat them as non-main once imported. Correct? If we do this, then perhaps Finally, what would it mean to import a federated reactor? |
I doubt exporting main reactors will prove very useful. They won't have inputs or outputs, for one thing. |
I agree. I just understood your comment to imply that the reason to not import a reactor should not be because it's |
Yes, I would think so. |
Or just don't include it in the grammar. |
Better to do it during validation because it allows for a more informative error message. |
With the new import mechanism that we're working on, name conflicts between reactor classes across files can be avoided by putting them in a different package. We need to report duplicate names among reactor classes within the same package as errors, but there are situations in which duplicates could co-exist without problem, namely if they are only used locally, within the file of their definition. Our suite of regression tests is an example of such situation.
It might, therefore, make sense to limit which reactor classes are importable by other. We could achieve this by requiring an explicit
export
modifier before any class definition that can be referenced/imported by in another file. This would also make it possible to export a composite without exporting the class definitions of the reactors it contains, for instance.Is this something we'd want?
The text was updated successfully, but these errors were encountered: