-
Notifications
You must be signed in to change notification settings - Fork 200
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
Module System - Imports (bring): local .w files #476
Comments
@staycoolcall911 is this something we are working on right now? Status is "in progress"... |
There's a branch where @3p3r started the work on that (2 commits): |
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
This is probably the p2 issue closest to p1 in terms of importance. This insight came from a discussion with @Chriscbr |
Agreed. |
This would be quite nice to have. e.g. wrap this into a dedicated module so I don’t have to copy the class definition around. |
And just had another case where this would be handy |
of course!
…On Fri, Jun 16, 2023 at 12:16 PM Sebastian Korfmann < ***@***.***> wrote:
And just had another case where this would be handy
—
Reply to this email directly, view it on GitHub
<#476 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAESGDAS74MOOLBSBA2ZXMTXLQP75ANCNFSM6AAAAAARY5H3UI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Introduce a basic form of multi-file Wing projects through the `bring` keyword. To use classes, interfaces, enums, or structs from another Wing file, bring a file with a path that ends in `.w`, and assign it to an alias: ```js bring "./other-file.w" as shared; new shared.Store(); ``` This initial implementation follows a (naive) strategy of recursively instantiating the parser to create a large AST. This has some limitations -- for example it's not possible for two Wing files to reuse the same third Wing file -- but this still gives users a lot more refactoring power for building Wing apps. #3511 is the main follow-up issue for addressing this. Closes #476 Follow up: - #3509 - #3511 ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [x] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
Congrats! 🚀 This was released in Wing 0.24.41. |
https://github.com/winglang/wing/blob/main/docs/04-reference/winglang-spec.md#4-module-system
This was done, then reverted - related to #401.
The text was updated successfully, but these errors were encountered: