-
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
[Tracking Issue] Tests for std
APIs
#2785
Labels
Comments
5 tasks
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)*.
std
APIsstd
APIs
Set tests last by @WeepingClown13! |
mergify bot
pushed a commit
that referenced
this issue
Oct 6, 2023
Adding tests for the standard library container type Set. closes #4372, which in turn also finishes and closes #2785. ## Checklist - [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [ ] Description explains motivation and solution - [ ] Tests added (always) - [ ] 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.35.8. |
mergify bot
pushed a commit
that referenced
this issue
Oct 9, 2023
Adding missing `Json` tests for tracking issue #2785 *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)*.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
The PR #2783 introduces placeholders for tests for all
std
types undersdk_tests
.The text was updated successfully, but these errors were encountered: