Skip to content
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

Refactor exports to return Stack instead of Output[Exports] #340

Closed
lbialy opened this issue Jan 11, 2024 · 1 comment
Closed

Refactor exports to return Stack instead of Output[Exports] #340

lbialy opened this issue Jan 11, 2024 · 1 comment
Assignees
Labels
area/core The SDK's core code area/docs The documentation and website area/examples Usage examples impact/breaking Fixing this issue will require a breaking change impact/first-48 This bug is likely to be hit during a user's first 48 hours of product evaluation
Milestone

Comments

@lbialy
Copy link
Collaborator

lbialy commented Jan 11, 2024

Final value returned from a Besom program (Exports) is currently expected to arrive wrapped in Output. This was done to simplify final for-comp required for evaluation of all related resource constructors. This however messes up the dry run results when a dynamic Output is interwoven into the final for-comp because of the short-circuiting logic of dry run handling. To solve this a new case class called Stack has to be defined and the main function's signature has to be changed from Context ?=> Output[Exports] to Context ?=> Stack. Stack will have to contain two fields: exports (the old mechanism is to be used here) and dependsOn which could be a vararg to take all the resources that are to be created in this stack but aren't used for exports directly.

@lbialy lbialy added area/core The SDK's core code area/docs The documentation and website area/examples Usage examples impact/first-48 This bug is likely to be hit during a user's first 48 hours of product evaluation impact/breaking Fixing this issue will require a breaking change labels Jan 11, 2024
@lbialy lbialy added this to the 0.2.0 milestone Jan 11, 2024
@lbialy lbialy self-assigned this Jan 11, 2024
@lbialy
Copy link
Collaborator Author

lbialy commented Jan 25, 2024

yay, done!

@lbialy lbialy closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core The SDK's core code area/docs The documentation and website area/examples Usage examples impact/breaking Fixing this issue will require a breaking change impact/first-48 This bug is likely to be hit during a user's first 48 hours of product evaluation
Projects
None yet
Development

No branches or pull requests

1 participant