You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We did some changes in this area in the latest Seaside master, which is not yet in an 'official' release 3.6.0.
When you did the upgrade, did you also load a different Seaside version?
In any case, this looks like a bug in the current Seaside master for GemStone, so it means we're missing a test case for this.
There isn't a test as far as I can tell. I planned to add the extension into the Grease repo and add a test in Seaside repo for JSStream class >> encodeLessThanIn:at:on: to cover this particular case.
@kurtkilpela Indeed, it looks the method has been missing all along because it was never needed. We did some optimization in the JSStream class which probably exposes it.
Probably a rendering test where we generate a script tag would also trigger the issue?
This is actually related to the FastCGI. It appears to me that outside of using the FastCGI, the class WriteStream is used for render streams. When using the WAFastCGIAdaptor, it will use a GRUtf8CodecStream which ultimately hits the logic causing this bug. PR #34 adds the necessary method to fix this bug.
Activity
jbrichau commentedon Aug 15, 2024
We did some changes in this area in the latest Seaside master, which is not yet in an 'official' release 3.6.0.
When you did the upgrade, did you also load a different Seaside version?
In any case, this looks like a bug in the current Seaside master for GemStone, so it means we're missing a test case for this.
kurtkilpela commentedon Aug 15, 2024
There isn't a test as far as I can tell. I planned to add the extension into the Grease repo and add a test in Seaside repo for
JSStream class >> encodeLessThanIn:at:on:to cover this particular case.jbrichau commentedon Aug 15, 2024
@kurtkilpela Indeed, it looks the method has been missing all along because it was never needed. We did some optimization in the JSStream class which probably exposes it.
Probably a rendering test where we generate a script tag would also trigger the issue?
obi068 commentedon Aug 16, 2024
I load Seaside with this script:
Metacello new
baseline: 'Seaside3';
repository: 'github://SeasideSt/Seaside:master/repository';
onLock: [:ex | ex honor];
load: #('Development Tests' 'Examples' 'Zinc' 'JSON' 'Scriptaculous' 'Tests' 'FastCGI')
#33 Add missing #greaseNext:putAll:startingAt: method
kurtkilpela commentedon Aug 16, 2024
This is actually related to the FastCGI. It appears to me that outside of using the FastCGI, the class WriteStream is used for render streams. When using the WAFastCGIAdaptor, it will use a GRUtf8CodecStream which ultimately hits the logic causing this bug. PR #34 adds the necessary method to fix this bug.
I haven't figure out how to test this yet.
#33 Add missing #greaseNext:putAll:startingAt: method
kurtkilpela commentedon Aug 16, 2024
The change has been merged into master. @obi068 can you confirm this is no longer a problem for you?
Add test related to Grease issue 33.
kurtkilpela commentedon Aug 16, 2024
Added a test in SeasideSt/Seaside#1442 to test this issue w/ a GRUtf8CodecStream.
#33 Add missing #greaseNext:putAll:startingAt: method
jbrichau commentedon Aug 18, 2024
Thanks @kurtkilpela for providing a fix and a test!
I noticed the method actually exists but is in a Pharo-specific package (in https://github.com/SeasideSt/Grease/blob/master/repository/Grease-Pharo100-Core.package/GRDelegatingStream.extension/instance/greaseNext.putAll.startingAt..st)
I think this is because it used to be part of a Pharo-specific optimization but now it is being used in the Javascript "encoding" implementation. I will fix that in Grease for the future.
In the meantime, I'm trying to find out why the test is failing though: https://github.com/SeasideSt/Seaside/actions/runs/10426395500
obi068 commentedon Aug 19, 2024
Issue seems to be fixed after reloading all the packages,
Move GRDelegatingStream>>greaseNext:putAll:startingAt: to Grease-Core…
Release version v1.1.177