-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rename synthetic $Inflight
classes to $Closure
#2782
Labels
Comments
5 tasks
Good idea |
eladb
added a commit
that referenced
this issue
Jun 5, 2023
This PR includes only non functional changes: * Emit inflight clients under `inflight.Foo.js` (instead of `clients/Foo.js`). * Change the closure class names from `$Inflight` to `$Closure` (fixes #2782). * Put hangar snapshots under a subdirectory which corresponds to the subdirectory under `tests/` to avoid tests with similar base names overriding each other in the snapshots directory.
mergify bot
pushed a commit
that referenced
this issue
Jun 5, 2023
This PR includes only non functional changes: * Emit inflight clients under `inflight.Foo.js` instead of `clients/Foo.js` so that all generated .js files will be flat in the output directory. We will now basically have `preflight.js`, `inflight.Xoo.js`, `inflight.Foo.js`, etc. * Change the closure class names from `$Inflight` to `$Closure`. This fixes #2782. * Put hangar snapshots under a subdirectory which corresponds to the subdirectory under `tests/` to avoid tests with similar base names overriding each other in the snapshots directory (see #2783). * Fix hangar markdown links. ## Checklist - [x] Title matches [Winglang's style guide](https://docs.winglang.io/contributors/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) - [x] 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://docs.winglang.io/terms-and-policies/contribution-license.html)*.
Congrats! 🚀 This was released in Wing 0.18.20. |
mergify bot
pushed a commit
that referenced
this issue
Jun 6, 2023
Static namespaced methods, such as the ones vended as part of the Wing SDK have the form `namespace.Class.method()`. In order to be able to call this method we need to capture the class object at runtime (also known as the "inflight type"). Since this is a dot delimited string (`"namespace.Class"`), we need to mangle it in order to be able to pass it through the capture mechanism. So we represent these types as `"namespace_Class"` within the inflight code and then call `namespace.Class._toInflightType()` on the preflight side (which is how static methods are supported for non-namespaced types). Then, we must add a `_toInflightType()` static method to `std` and `util` classes, which will `require()` the correct SDK javascript file and return the type itself. Added a test to make sure this is covered for future SDK classes. ### Resolves * Fixes #2576 ### Follow ups * #2782 * #2785 ### Misc * Added `WING_TARGET` to cloud function environments (for all targets). * Created an initial set of SDK tests for `std` types. * Some renames in `jsify.rs` to normalize the mental model a little. * Switch the implementation of `Boolean.fromJson` from a macro to an actual method (just for the fun of it). * Reduced progress logs from `wing test` by default and add a `--progress` option to enable. * Prelude: #2799 ## Checklist - [x] Title matches [Winglang's style guide](https://docs.winglang.io/contributors/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) - [x] 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://docs.winglang.io/terms-and-policies/contribution-license.html)*.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
"inflight" doesn't mean "function" anymore and this is really confusing.
see TODO in
closure_transform.rs
The text was updated successfully, but these errors were encountered: