-
Notifications
You must be signed in to change notification settings - Fork 196
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
Cannot bring using the same alias multiple times in a directory #4415
Comments
Chriscbr
changed the title
Symbol has multiple definitions
Cannot import files under the same name multiple times within a directory
Oct 4, 2023
Chriscbr
changed the title
Cannot import files under the same name multiple times within a directory
Cannot bring using the same alias multiple times in a directory
Oct 4, 2023
Oouch |
mergify bot
pushed a commit
that referenced
this issue
Oct 5, 2023
Introduces the `wing pack` command - a standard way to package libraries in Wing. `wing pack` can be run in any Wing project directory that has a `package.json` in it. `wing pack` will validate your `package.json` produce a tarball that contains the libraries source files. For more documentation, see https://winglang.io/docs/libraries. ## Implementation When you `bring "foo"`, the parser now performs some Node module resolution to look up the `foo` package and see if it's a JSII library or a Wing library based on its `package.json`. If `bring "foo"` refers to a Wing library, then it's equivalent to bringing that library's root directory, per #4210. ## Future related work - #4415 - #4294 - #2171 ## 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 [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
This is quite blocking when using built in modules. I can't |
This was referenced Oct 18, 2023
mergify bot
pushed a commit
that referenced
this issue
Oct 19, 2023
…nums (#4591) Wing now supports declaring classes, structs, interfaces, and enums as public using the `pub` access modifier. The default access of all types is now private. This PR also fixes a bug where you could not `bring` modules under the same alias in different files. Closes #4294 Closes #4415 Closes #2763 BREAKING CHANGE: All types are private by default. To make a class, struct, or other declaration accessible to other files, prefix it with the `pub` access modifier. ## 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 [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
Congrats! 🚀 This was released in Wing 0.41.0. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this:
This happened:
I expected this:
No error
Is there a workaround?
Rename one of the imports:
Component
Compiler
Wing Version
0.34.14
Node.js Version
18.14.1
Platform(s)
MacOS
Anything else?
It should be possible to fix this with #4294 (adding technology to track a symbol's "access" inside symbol environments)
Community Notes
The text was updated successfully, but these errors were encountered: