DX for apps containing constructs for wrong cloud target
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 215
- Avg merge
- 2h 9m
- Merged PRs (30d)
- 27
Description
Currently, the Wing SDK lets developers create apps from polycon classes (cloud.Bucket, cloud.Queue, etc.) or through concrete classes (tfaws.Bucket, tfaws.Queue, etc.). We recommend using polycons because (a) if you write an app composed entirely of polycons, it can be synthesized to multiple target clouds, and (b) using polycons makes it possible for operators to customize polycon resolution through polycon factories. But both are exported in the API as a necessity (you need to export the concrete classes in order to support writing custom factories).
This is fine, except there is currently undefined behavior if you try synthesizing resources to incompatible targets. For example:
- creating an AWS resource instance in an app that is synthesized for the simulator
- creating a simulator resource instance in an app that is synthesized for AWS
If a user writes apps like these, should we show a warning of some kind? Or perhaps show a list of constructs that were left unsynthesized since they did not contain any hooks for synthesizing to the selected target?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how polycon and concrete classes such as cloud.Bucket, tfaws.Bucket, cloud.Queue, and tfaws.Queue are resolved during synthesis. Compare AWS and simulator targets, then define the behavior for incompatible constructs, including whether to warn or report unsynthesized constructs. Done means the selected behavior is specified and covered for both target mismatches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100