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

Use NGContext.exit() instead of sys.exit(). #8239

Merged
merged 1 commit into from Sep 4, 2019

Conversation

@olafurpg
Copy link
Contributor

commented Sep 4, 2019

Problem

Previously, a compile error would cause the zinc wrapper to call sys.exit(1), which killed the hot nailgun JVM process.

Solution

This commit replaces sys.exit(1) with a call to NGContext.exit(1), which is a Nailgun API to mimic sys.exit(1), allowing the existing JVM process to continue running.

Result

Users should experience a faster compile/debug workflows while iterating on code due to fewer JVM startups.

Use NGContext.exit() instead of sys.exit().
Problem
----
Previously, a compile error would cause the zinc wrapper to call `sys.exit(1)`, which killed the hot nailgun JVM process.

Solution
----
This commit replaces `sys.exit(1)` with a call to `NGContext.exit(1)`, which is a Nailgun API to mimic `sys.exit(1)`, allowing the existing JVM process to continue running.

Result
----
Users should experience a faster compile/debug workflows while iterating on code due to fewer JVM startups.
@stuhood
stuhood approved these changes Sep 4, 2019
Copy link
Member

left a comment

Thanks!

@stuhood stuhood merged commit d4676d1 into pantsbuild:master Sep 4, 2019

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
stuhood added a commit that referenced this pull request Sep 22, 2019
Bump to latest zinc and remove the extractor. (#8246)
### Problem

#8239 uses a nailgun API to avoid exiting: we need to incorporate it. Additionally, the zinc-extractor is no longer used after #8125.

### Solution

Remove the `zinc-extractor` code, and bump to latest `zinc-compiler`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.