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

Get rid of Porcelain #44

Closed
gutschilla opened this issue Sep 3, 2018 · 5 comments
Closed

Get rid of Porcelain #44

gutschilla opened this issue Sep 3, 2018 · 5 comments

Comments

@gutschilla
Copy link
Owner

gutschilla commented Sep 3, 2018

As @hugomaiavieira pointed out, Porcelain doesn't seem to be maintained since a while and throws up warning messages on compilation. This dependency dates back to the roots of PdfGenerator when I was too lazy hesitant to use the Ports module directly. Which wasn't exactly documented in a great way (https://hexdocs.pm/elixir/1.0.5/Port.html#summary).

Anyways, to get things going, I'll remove Porcelain in 0.5.0 using Ports.

@ijunaid8989
Copy link

Instead of getting rid of that.. how about solving the problem?

https://github.com/evercam/evercam-server/pull/1000#issue-215543541

@akappen
Copy link

akappen commented Apr 8, 2019

I'm curious whether you could just drop in System.cmd in place of the few Porcelain.exec calls. It doesn't seem like you are using Porcelain specific features, nor do you seem to need raw access to a Port. The only thing you would lose is distinct STDOUT versus STDERR in the results.

https://hexdocs.pm/elixir/System.html#cmd/3

@gutschilla
Copy link
Owner Author

From the Docs https://hexdocs.pm/elixir/System.html#cmd/3

Internally, this function uses a Port for interacting with the outside world. However, if you plan to run a long-running program, ports guarantee stdin/stdout devices will be closed but it does not automatically terminate the program. The documentation for the Port module describes this problem and possible solutions under the "Zombie processes" section.

Porcelain took care of this as well. I wanted to dive into this but you're probably right that a plain System.cmd is good enough for most cases.

Anyway. I am working on a bigger release with support for chrome-headless yielding nicer results as well. Maybe I'll just give it a try thru a switch

@gutschilla
Copy link
Owner Author

@gutschilla
Copy link
Owner Author

I am using plain System.cmd/3 now

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

No branches or pull requests

3 participants