-
Notifications
You must be signed in to change notification settings - Fork 201
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
feat(sdk)!: std.Node #3884
feat(sdk)!: std.Node #3884
Conversation
Signed-off-by: monada-bot[bot] <[email protected]>
Signed-off-by: monada-bot[bot] <[email protected]>
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 am wondering if we need to add a doc topic about nodes?
Maybe even just an initial thing with a reference to the construct documentation?
libs/wingc/src/jsify/snapshots/capture_identifier_from_preflight_scope.snap
Show resolved
Hide resolved
Thanks for contributing, @Chriscbr! This PR will now be added to the merge queue, or immediately merged if |
Signed-off-by: monada-bot[bot] <[email protected]>
Thanks for contributing, @Chriscbr! This PR will now be added to the merge queue, or immediately merged if |
Congrats! 🚀 This was released in Wing 0.26.0. |
Fixes a regression from #3884 - tree.json was no longer being emitted with `sourceModule` information, causing some issues in the Wing Console. Thanks @polamoros for catching this 🙏 ## 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) - [ ] 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)*.
As part of the effort to fix #3717, I'm trying to refactor some parts of the SDK so that we do not need to rely on the
std.Resource
class. The issue this PR addresses is that theResource
class has an extra property nameddisplay
which is not available if you extendcdk8s.Chart
:The solution implemented by this PR is to standardize display property access through
std.Node
:std.Node.of(this)
also allows you toaccess all other fields and methods normally available through theconstructs.Node
class.Other changes:
_addInflightOps
method fromstd.Resource
with an API contract where a class can (optionally) implement a method named_getInflightOps()
. This removes one more of the places where the compiler assumes behavior that only exists onstd.Resource
and not onconstructs.Construct
.Code
class from the SDK. I looked through our codebase and 100% of the usages have just been to access itstext
field, so the class isn't really doing anything important. Just using plainstring
's seems like a nice simplification.BREAKING CHANGE:
.display
property is no longer available in Wing classes. To change how classes are displayed in the Wing Console, usestd.Node.of(this)
and modify fields like.title
and.description
.Checklist
pr/e2e-full
label if this feature requires end-to-end testingBy submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.