Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Replace the child_pty Library with pty.js #83

Closed
flawiddsouza opened this issue Sep 8, 2015 · 8 comments
Closed

Replace the child_pty Library with pty.js #83

flawiddsouza opened this issue Sep 8, 2015 · 8 comments
Assignees
Labels

Comments

@flawiddsouza
Copy link
Contributor

As quite a few people have noted, including me. There seems to be an issue with the child_pty module, which prevents Black Screen from building on all three of these platforms on several different occasions:

There seem to workarounds but it would be better if the problem didn't arise in the first place.

Any ideas what could be causing this? Some have said its the NaN version that the module seems to require.

Solving this problem would be a major step in development for Black Screen. This could essentially enable full multi-platform support for it.

@vlad-shatskyi
Copy link
Contributor

child_pty is the only native module, that's why it causes problems. Also the fact, that building it with Electron's headers isn't the usual workflow.

This is too low level for me, but, as far as I understand, it creates a pair of device files in order to pretend being a PTY. Since both the author of child_pty and the author of pty.js use a native extension for that, I guess it's not possible to do it using only node.js platform, but I might be wrong here.

So, the only option I see is to switch to pty.js. It has better support, and now it includes all the features we need. However, after rebuilding it with the Electron's headers, for some reason it becomes insanely slow. It wasn't like that a month ago.

I'll create an issue for that.

@vlad-shatskyi
Copy link
Contributor

If you don't mind, I'll rename this one instead.

The replacement is really easy: in package.json we need to substitute child_pty with pty.js (two places) and change its version. And then there are two requires, which should be renamed. After that
npm run install-all to install and rebuild the new dependency. No other code changes are required.

But now executing any command has a 2 second delay, which we need to debug.

@vlad-shatskyi vlad-shatskyi changed the title Build issues because of child_pty on Linux, Windows & Mac OSX Replace the child_pty Library with pty.js Sep 8, 2015
@flawiddsouza
Copy link
Contributor Author

@ShockOne Maybe a temporary dev branch for testing is in order.

@vlad-shatskyi
Copy link
Contributor

@flawiddsouza, surely, we create a branch for each feature.

@flawiddsouza
Copy link
Contributor Author

@ShockOne Hopefully we won't have too many issues after this.

@vlad-shatskyi vlad-shatskyi self-assigned this Sep 8, 2015
@vlad-shatskyi
Copy link
Contributor

I'll start working on it. It seems to be the most painful issue.

@vlad-shatskyi
Copy link
Contributor

@flawiddsouza, I'm there.

@vlad-shatskyi
Copy link
Contributor

A fix: #88

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

No branches or pull requests

2 participants