-
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
feat(compiler): bring local wing files #252
Conversation
Merge jsii resource clients into generate wing resources. Handle JSII Void return types as no return type in wing.
* Added support fro `struct`s in parser/type_checker/jsification. * Import constructors (including skipping scope/id on resources). * Pass "self" argument to imported class methods.
* refactor: moved jsii importing logic into submodule under a new type_check module. * resolve namespaced custom types in type checker. * corretly handle parent resource in resource type checking. * JSII imported handles references to other JSII types (not only primitives).
* Also added support for multiple struct inheritance in when importing JSII props. * Support importing wingsdk `Duration` types.
also: Cleaned up method_call vs function_call in grammar/ast Fixed return type parsing
* Updated sdk_capture tests to use explicit Props ars used by sdk resources. * Support type annotation in container literals. * Added map literals support. * de-dup captured method names in capture mechanism. * removed auto capturing of everything looking like a mehtod call on an anything object (AKA wingsdk support hack).
Co-authored-by: Chris Rybicki <chrisr@monada.co>
This needs to be merged after #242 is merged. It's branched off Yoav's branch. |
Also: * Fix inflight.w example based on real imported cloud.Bucket type. * Removed skipping type checking on `new` expressions when the type is resolved to an `Anything`, we don't expect custom types to be `Anything`'s anymore.
This was there because we didn't really know the type of the `new` expression. Now the type is available through a the `Expr.evaluated_type`.
Co-authored-by: Elad Ben-Israel <elad.benisrael@gmail.com>
Hey @3p3r, what's the status of this? Can it be merged to main? |
@staycoolcall911 this looks good to me. I merged main into it. It's pending @yoav-steinberg 's review. |
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.
Thumbs up 👍
But I'd like you to open issues for unfulfilled tasks in the top description. And also an additional issue for getting bring to import into a Namespace (Add an optional name
field to the AST's scope as a Namespace in our type system).
This PR does a re-implementation of my previous PR to bring local Wing files.
context: #208
Use
andBring
statements at AST level (parser.rs
).build_statement
should return anOption
or maybe anEmptyStatement
in AST.Huge props to @yoav-steinberg for the pairing session.