-
Notifications
You must be signed in to change notification settings - Fork 15
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
[RFC] Publish and Use: Elements and Libraries #476
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I just left some pedantic grammar and expression comments.
My only comment on functionality is that I would remove the bracers around the use
concept. I am fine with either decision.
- Langium might not support this scoping mechanism out-of-the-box (more complex implementation) | ||
|
||
## Alternatives | ||
|
||
- "use" syntax without braces, etc., `use MyDomainLibrary1, MyDomainLibrary2 from './path/to/file.jv';` | ||
- "use" syntax without braces, etc., `use MyDomainPackage1, MyDomainPackage2 from './path/to/file.jv';` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We kind of defaulted to this (I assume from TypeScript experience) but I actually agree. Why have bracers? I would remove them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the braces.
Without it seems like some default exports (as a TS/JS-influenced dev) or different statements (int a = 0, b = 1
). Braces clarify this imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a visual perspective, I also like the braces. Without braces, I'm unsure how very long use
statements would be split into separate lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some minor comments but nothing that needs to be fixed.
- Langium might not support this scoping mechanism out-of-the-box (more complex implementation) | ||
|
||
## Alternatives | ||
|
||
- "use" syntax without braces, etc., `use MyDomainLibrary1, MyDomainLibrary2 from './path/to/file.jv';` | ||
- "use" syntax without braces, etc., `use MyDomainPackage1, MyDomainPackage2 from './path/to/file.jv';` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the braces.
Without it seems like some default exports (as a TS/JS-influenced dev) or different statements (int a = 0, b = 1
). Braces clarify this imo.
Thanks for your reviews - I think we designed something very useful here that will bring Jayvee one step closer to a productive DSL! I incorporated the changes. Any last words before merging? |
No, go for it, good job writing 😅👍. |
This PR is a reissue of #474.
Introduce concepts to enable multi-file Jayvee:
publish
elements of a jv file for reuse in other files of the same projectlibraries
for bundling elements for reuse in other projectsuse
of elements and libraries in other files / projects