Skip to content
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

Angular bracket imports for reusable reactor modules #2404

Merged
merged 36 commits into from
Oct 9, 2024
Merged

Conversation

vinzbarbuto
Copy link
Collaborator

This PR proposes a new import statement syntax to distinguish between user-defined reactors import and reusable reactors imports. The new syntax for importing reusable reactors will use angular brackets, as shown: import Reactor from <path/to/lib/Reusables.lf>.

Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good start! I left some questions. The major concern I have is that there are not tests. Please add one.

core/src/main/java/org/lflang/LinguaFranca.xtext Outdated Show resolved Hide resolved
core/src/main/java/org/lflang/ast/ToLf.java Outdated Show resolved Hide resolved
core/src/main/java/org/lflang/ast/ToSExpr.java Outdated Show resolved Hide resolved
@lhstrh lhstrh added the feature New feature label Sep 9, 2024
@lhstrh lhstrh changed the title Added angular bracket import for reusable reactors module Angular bracket imports for reusable reactor modules Sep 9, 2024
@lhstrh lhstrh self-requested a review September 29, 2024 23:08
Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way you're dealing with paths is too brittle and needs work. Please see my comments.

core/src/main/java/org/lflang/util/ImportUtil.java Outdated Show resolved Hide resolved
core/src/main/java/org/lflang/util/ImportUtil.java Outdated Show resolved Hide resolved
core/src/main/java/org/lflang/util/ImportUtil.java Outdated Show resolved Hide resolved
core/src/main/java/org/lflang/util/ImportUtil.java Outdated Show resolved Hide resolved
core/src/main/java/org/lflang/util/ImportUtil.java Outdated Show resolved Hide resolved
core/src/main/java/org/lflang/util/ImportUtil.java Outdated Show resolved Hide resolved
core/src/main/java/org/lflang/util/ImportUtil.java Outdated Show resolved Hide resolved
core/src/main/java/org/lflang/util/ImportUtil.java Outdated Show resolved Hide resolved
core/src/main/java/org/lflang/util/ImportUtil.java Outdated Show resolved Hide resolved
@lhstrh lhstrh added this to the 0.9.0 milestone Sep 30, 2024
@tanneberger tanneberger self-requested a review October 2, 2024 16:40
@lhstrh lhstrh added this pull request to the merge queue Oct 9, 2024
@lhstrh lhstrh removed this pull request from the merge queue due to a manual request Oct 9, 2024
@lhstrh lhstrh merged commit 4e27b9a into master Oct 9, 2024
24 checks passed
@lhstrh lhstrh deleted the extending branch October 9, 2024 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants