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

fix: make jsii --watch work #3487

Merged
merged 2 commits into from
Apr 13, 2022
Merged

fix: make jsii --watch work #3487

merged 2 commits into from
Apr 13, 2022

Conversation

yuth
Copy link
Contributor

@yuth yuth commented Apr 12, 2022

While making the compiler fully synchronous (in #3467) a un-resolveable promise was removed which is used by --watch. When using watch mode, the typescript compiler creates a watcher, and hands back the control to the caller of watch, to allow caller to control the watcher instance. Since JSII does not do anything with the returned control, we need to return an un-resolveable promise which will keep the watcher running for ever (or till the whole program is killed)


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

In aws#3467 the comiler was made fully synchronous which also removed a never resolving promise used by --watch. When the compile is run in watch mode, the watcher is started in the background and control is returned back with watcher. For the compiler watcher to keep running the control should not be yeilded back to the caller
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 12, 2022
@yuth yuth requested a review from RomainMuller April 12, 2022 18:03
@mergify
Copy link
Contributor

mergify bot commented Apr 13, 2022

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Apr 13, 2022
@mergify
Copy link
Contributor

mergify bot commented Apr 13, 2022

Merging (with squash)...

@mergify mergify bot merged commit 4a46f7d into aws:main Apr 13, 2022
@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Apr 13, 2022
@yuth yuth mentioned this pull request Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants