Hi all,
There have been a number of changes to the ReadWriteStream implementation in Pharo 7 that break Grease stream tests: https://travis-ci.org/SeasideSt/Grease/jobs/406766720 <https://travis-ci.org/SeasideSt/Grease/jobs/406766720>
I think there is both an issue in Grease for Pharo and in Pharo 7 itself.
* The most important issue is that the following expression returns a different result on Pharo 7 when compared with earlier versions:
(ReadWriteStream on: (String new: 4096)) contents
On Pharo 6, this returns an empty string.
On Pharo 7, this returns a string with 4096 white space chars.
I’m inclined to say that Pharo 7 behavior is correct.
I read through the ANSI document and `contents` should return the future sequences as well… which effectively means returning all those empty chars.
I’m a bit in doubt why this has been different all that time… hence my email.
The core of the issue is that GRPharoPlatform>>readWriteCharacterStream is `ReadWriteStream on: (String new: 4096)`, hence a String instance with a lot of spaces ;)
In GRGemStonePlatform, the readWriteStream is initialized on an empty string.
In GRSqueakPlatform, the RWBinaryOrTextStream class is used on ‘ByteArray new: 4096’.
Changing the implementation of GRPharoPlatform>>readWriteCharacterStream to `ReadWriteStream on: String new` fixes most of the tests.
* The next issue is that `ReadWriteStream>>contents` has been changed in https://github.com/pharo-project/pharo/commit/9e442addff3790af0c78dbc73f1f3… <https://github.com/pharo-project/pharo/commit/9e442addff3790af0c78dbc73f1f3…>
This means that:
| stream |
stream := GRPlatform current readWriteCharacterStream.
stream
nextPutAll: 'abc';
reset.
self assert: stream contents = 'abc’.
This is no longer true in Pharo 7.
ANSI docs says that `reset` should only reset the pointer position and thus the future sequences on the stream should still be returned after resetting.
Reverting the change in the commit, also fixes that test.
It’s unclear why that change was made though, so I’ll try to talk to someone at Pharo.
Would be nice to hear other’s thoughts.
Cheers
Johan
I'm speaking of this nifty bit of code.
https://editor.datatables.net
But could be anything else that provides similar edit-in-place table spreadsheet-ish capabillty.
Hi,
The bundling with magritte polluted the repo and the Bootstrap project with stuff that was not
really needed for "Seaside + Bootstrap" only.
Also a "Bootstrap-Demo" package appeared that was more a demo for magritte than for Bootstrap.
Since there already was an "Bootstrap-Examples" package this added more confusion (at least on
my side).
I now took action and cleaned up the Bootstrap project again to remove the magritte stuff.
If one wants to to use Bootstrap with Seaside he does not necessarily have to go the
Magritte path, so IMHO this was necessary.
The magritte stuff for Bootstrap is now hosted as an own separate project on STHub which would
also help to see to which part code additions really belong.
As a result:
============
1. The Bootstrap project now again only contains and loads the initial three packages:
- Bootstrap-Core
- Bootstrap-Tests-Core
- Bootstrap-Examples
assembled by the known ConfigurationOfBootstrap
2. The Magritte support on top of Bootstrap is now separated in an own project
to avoid too much mixin. See "BootstrapMagritte" on SmalltalkHub.
The new repo "http://smalltalkhub.com/#!/~TorstenBergmann/BootstrapMagritte" has the same
commiters as the old one, so feel free to continue with your work.
This project includes two packages:
- Bootstrap-Magritte-Core (former Bootstrap-Magritte)
- Bootstrap-Magritte-Examples (former Bootstrap-Demo)
assembled by a new ConfigurationOfBootstrapMagritte for this particular project
3. The Bootstrap/ConfigurationOfBootstrap is now available as
- a release version 0.4.0 for Seaside 3.0.9
- a release version 0.5.0 for Seaside 3.0.10
- a release version 0.6.0 for Seaside 3.1.0 (#stable)
- a development version 0.7.0 for Seaside 3.1.0 for new stuff
4. The CI for Bootstrap is green for Pharo 2.0 and now also Pharo 3.0
5. The config browser is updated for Pharo 2.0 and Pharo 3.0 with the "Bootstrap" package
So you can now also open a fresh Pharo 3.0 image, open World menu -> Configuration Browser
to load "Bootstrap". Then run
ZnZincServerAdaptor startOn: 8080
and start coding your web application with the latest Seaside 3.1.0.
Next steps:
Setting up a CI for the new project "BootstrapMagritte"/ConfigurationOfBootstrapMagritte
Have fun!
Bye
Torsten