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: Fix integration test codegen script #291

Merged
merged 1 commit into from
May 9, 2021

Conversation

codebutler
Copy link
Contributor

@codebutler codebutler commented May 8, 2021

The codegen script was importing plugin.ts which expects to read from stdin (which is empty), then calls process.exit. This caused codegen to fail silently.

The codegen script was importing plugin.ts which expects to read from stdin (which is empty), then calls process.exit. This caused codegen to fail silently.
@stephenh
Copy link
Owner

stephenh commented May 8, 2021

Hey! This seems like a fine change, but out of curiosity what was broken before?

AFAICT this is moving where protoFilesToGenerate is located, but otherwise doesn't (shouldn't?) have any semantic changes?

@codebutler
Copy link
Contributor Author

Hey! This seems like a fine change, but out of curiosity what was broken before?

AFAICT this is moving where protoFilesToGenerate is located, but otherwise doesn't (shouldn't?) have any semantic changes?

Hey sorry my commit description didn't get copied over into the PR. The problem is that plugin.ts tries to do stuff when imported. It calls process.exit and interrupts the codegen. https://github.com/stephenh/ts-proto/blob/main/src/plugin.ts#L59

@stephenh
Copy link
Owner

stephenh commented May 8, 2021

Oh shoot! I was running this locally and like "it seems fine" but the wrinkle that "codegen exits so fails silently" was tricking me. :-) Thanks!

@stephenh stephenh merged commit a51eee5 into stephenh:main May 9, 2021
stephenh pushed a commit that referenced this pull request May 9, 2021
## [1.79.8](v1.79.7...v1.79.8) (2021-05-09)

### Bug Fixes

* Fix integration test codegen script ([#291](#291)) ([a51eee5](a51eee5))
@stephenh
Copy link
Owner

stephenh commented May 9, 2021

🎉 This PR is included in version 1.79.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants