-
Notifications
You must be signed in to change notification settings - Fork 197
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
fix(compiler): can't inherit an stdlib resource #4640
Conversation
Console preview environment is available at https://wing-console-pr-4640.fly.dev 🚀 Last Updated (UTC) 2023-10-23 16:08 |
BenchmarksComparison to Baseline ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
⬜ Within 1.5 standard deviations Benchmarks may vary outside of normal expectations, especially when running in GitHub Actions CI. Results
Last Updated (UTC) 2023-10-23 16:18 |
Co-authored-by: Elad Ben-Israel <eladb@monada.co>
…into yoav/inherit_stdlib
Signed-off-by: monada-bot[bot] <monabot@monada.co>
Signed-off-by: monada-bot[bot] <monabot@monada.co>
Thanks for contributing, @yoav-steinberg! This PR will now be added to the merge queue, or immediately merged if |
Congrats! 🚀 This was released in Wing 0.41.11. |
Fixes #3585
Before this PR our dependency injection only worked on
new
calls. So when instantiating an stdlibcloud.Api
for example you'd get acloud.Api
instance matching the desired target. But when inheriting from an stdlib preflight class dependency injection wasn't being done. So we just inherited the abstract base class.With this change we get dependency injection also when doing
extends cloud.SomeThing
. The way I got this to work is by changing the dep-injection mechanism to return not a concrete instance but rather a concrete type. Then we can instantiate that type or inherit it based on what we need.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.