On 9 May 2018, at 13:41, Thierry Goubier <thierry.goubier@gmail.com> wrote:
2018-05-09 13:14 GMT+02:00 Sven Van Caekenberghe <sven@stfx.eu>:
You mean you made a subclass of StandardFilestream yourself ?
There are a few subclasses of StandardFileStream in OSProcess: AttachableFileStream, AsyncFileReadStream and BufferedAsyncFileReadStream. They will need to be ported.
If yes, can you describe briefly why you did so ?
As far as my analysis go, AttachableFileStream refers to and manipulates the underlying ioHandle of a unix pipe stream, AsyncFileReadStream interacts with the asynchronous io extensions of the vm to observe that io handle, and a BufferedAsyncFileReadStream add a thread-safe, buffered, blocking API for smalltalk processe on top.
Yes, they will have to be ported. If it were me (but I haven't looked at the code) I would not inherit from those classes, but from a simpler Stream class, possibly even none. The stream API is actually quite small (or it should be). Inheritance is an implementation technique, inheriting from a complex class can be hard, unless the superclass was really designed with that purpose. All this, IMHO.
Regards,
Thierry
On 9 May 2018, at 13:12, Thierry Goubier <thierry.goubier@gmail.com> wrote:
Hi Sven,
in that process, how does one rewrite StandardFilestream subclasses?
Regards,
Thierry
2018-05-09 11:51 GMT+02:00 Sven Van Caekenberghe <sven@stfx.eu>:
Hi,
I created the following:
https://pharo.manuscript.com/f/cases/21858/Cleanup-remaining-DeprecatedFileS...
This is an umbrella issue, please create sub issues for each set of changes. It is better to work step by step.
The package DeprecatedFileSystem contains classes that should no longer be used, the most important being
FileStream, StandardFileStream and MultiByteFileStream MultiByteBinaryOrTextStream and RWBinaryOrTextStream
Alternatives exist by using FileSystem's FileReference as well as File and various new (Zn) streams.
Let's all work together to make this real. It is important that the image itself makes correct use of ongoing refactoring efforts. We already took great steps, but there is more work to do. Note that in many cases, using code can and should be simplified, removing ugly hacks where possible.
Feel free to discuss any issues on the ML.
Sven