atom-ink icon indicating copy to clipboard operation
atom-ink copied to clipboard

Console removed - what to change?

Open mauricioszabo opened this issue 6 years ago • 4 comments

Today I found out that the old Console was removed on the new Ink version. How do I change the API? Is there any information about it? It broke completely my Chlorine plug-in, as it depends on a Console window currently opened...

The problem in this issue is that there's no documentation on how to migrate to InkTerminal and also no information on the CHANGELOG, so it's a huge breaking change with no visibility whatsoever...

mauricioszabo avatar Sep 05 '19 15:09 mauricioszabo

The problem in this issue is that there's no documentation on how to migrate to InkTerminal and also no information on the CHANGELOG, so it's a huge breaking change with no visibility whatsoever...

Fair point. It's probably not really a good idea to treat ink as a library at this point, unfortunately.

There's no easy way to migrate, I think, but the easiest thing would be to directly start a REPL process and attach that to the InkTerminal. If you have only have stdin/stdout/stderr streams then things are probably more complicated, and I'm honestly not sure how that would end up working.

If you want to continue using the old console then I suppose we could re-add that, but I'd recommend just copying the relevant code (this, this, this, and this) over to your repo and drop the dependency on ink.

Let me know what you want to go with and I'd be happy to help.

pfitzseb avatar Sep 05 '19 15:09 pfitzseb

Well, I need the old functionality because I don't start any external process, so I need the stdout and stderr.

I was also using the console as a drop-in for ink results, so I need to render HTML (one thing that the new implementation don't support either). I'll probably just end up copying the code over my repo...

mauricioszabo avatar Sep 05 '19 18:09 mauricioszabo

Alright. Sorry for the inconvenience then, but we can't really keep maintaining the old console and removed it to improve loading times.

pfitzseb avatar Sep 05 '19 18:09 pfitzseb

@mauricioszabo I missed to check this issue, and sorry for the inconvenience ... (I'm the one who removed the legacy console support) But atst I think it might be better for your to just borrow REPL implementation into your repo as @pfitzseb pointed out, since the other Ink components (and the package interaction in general) are actually hurting your package loading/activation time (maybe A LOT).

aviatesk avatar Sep 08 '19 11:09 aviatesk