diff --git a/.smalltalk.ston b/.smalltalk.ston index 1c8f5e0..2157947 100644 --- a/.smalltalk.ston +++ b/.smalltalk.ston @@ -4,6 +4,7 @@ SmalltalkCISpec { #baseline : 'HOP', #platforms : [ #pharo ], #directory : 'source', + #load : [ 'All' ], #onConflict : #useIncoming } ] diff --git a/source/BaselineOfHOP/BaselineOfHOP.class.st b/source/BaselineOfHOP/BaselineOfHOP.class.st index 868cbae..f192479 100644 --- a/source/BaselineOfHOP/BaselineOfHOP.class.st +++ b/source/BaselineOfHOP/BaselineOfHOP.class.st @@ -7,6 +7,23 @@ Class { { #category : 'baselines' } BaselineOfHOP >> baseline: spec [ + "Groups, so that an image loads what it serves. Without any, Metacello's default group is + every package there is, and apptive-common asks for this baseline without naming one - so + HOP-Core-Tests, HOP-Extra-Tests and HOP-Roassal travelled into apptive-base, + apptive-account and apptive-metabase, which serve none of them. + + Test classes in a deployed image are not idle: AGTestRunnerHandler hangs under #health in + two of those servers and runs the whole suite of any TestCase class it is asked for. + HOP-Roassal does not even belong there twice over - it names Roassal classes this baseline + never loads, so it has been compiling against undeclared variables wherever it landed. + + 'All' is what CI loads and is the package set this baseline had before the groups; nothing + about the test run changes. + + The two projects belong in a group as much as the packages do. Without any group they came + along because the default group is everything the baseline mentions; named groups are a + list, and a list that leaves them out leaves them out - HOP-Core reaches for JSONSchema in + HOPRequestParameter and for Zinc all over, so Core names both." spec for: #'common' do: [ self @@ -23,7 +40,14 @@ BaselineOfHOP >> baseline: spec [ package: 'HOP-Extra-Tests' with: [ spec requires: #('HOP-Extra') ]; package: 'HOP-Roassal' with: [ - spec requires: #('HOP-Core') ] ] + spec requires: #('HOP-Core') ]. + + spec + group: 'Core' with: #('JSONSchema' 'ZincHTTPComponents' 'HOP-Core' 'HOP-Extra'); + group: 'Tests' with: #('HOP-Core-Tests' 'HOP-Extra-Tests'); + group: 'Roassal' with: #('HOP-Roassal'); + group: 'All' with: #('Core' 'Tests' 'Roassal'); + group: 'default' with: #('Core') ] ] { #category : 'as yet unclassified' } diff --git a/source/HOP-Core-Tests/HOPCodeTest.class.st b/source/HOP-Core-Tests/HOPCodeTest.class.st index 388e87e..cefb046 100644 --- a/source/HOP-Core-Tests/HOPCodeTest.class.st +++ b/source/HOP-Core-Tests/HOPCodeTest.class.st @@ -58,6 +58,7 @@ HOPCodeTest >> validDependentPackages [ 'JSONSchema-Core' 'Kernel' 'Kernel-CodeModel' + 'STON-Core' "spec is a dependency because of the inspections" 'Spec2-Core' 'Zinc-HTTP' diff --git a/source/HOP-Core-Tests/HOPTestCase.class.st b/source/HOP-Core-Tests/HOPTestCase.class.st index 5d2c297..86b91a6 100644 --- a/source/HOP-Core-Tests/HOPTestCase.class.st +++ b/source/HOP-Core-Tests/HOPTestCase.class.st @@ -17,7 +17,7 @@ HOPTestCase >> delegate [ { #category : 'as yet unclassified' } HOPTestCase >> parseResponse: aZnResponse [ - ^ NeoJSONReader fromString: aZnResponse contents + ^ STONJSON fromString: aZnResponse contents ] { #category : 'tests' } diff --git a/source/HOP-Core/HOPJsonResponseFormatter.class.st b/source/HOP-Core/HOPJsonResponseFormatter.class.st index 3704350..2dcb525 100644 --- a/source/HOP-Core/HOPJsonResponseFormatter.class.st +++ b/source/HOP-Core/HOPJsonResponseFormatter.class.st @@ -7,7 +7,15 @@ Class { { #category : 'formatting' } HOPJsonResponseFormatter >> format: responseObject [ - ^ ZnStringEntity json: (NeoJSONWriter toStringPretty: { + "STONJSON rather than NeoJSONWriter, and the reason is not taste: HOP-Core reached for a + class its own baseline never declared. Neo-JSON came along behind JSONSchema, so the day a + load did not bring JSONSchema this method read an undeclared variable - which is exactly + how it showed up. STON-Core is in the image Pharo ships. + + The wire format does not move. Checked against the same payload: STONJSON toStringPretty: + and NeoJSONWriter toStringPretty: write the same characters, and each reads the other's + output." + ^ ZnStringEntity json: (STONJSON toStringPretty: { #code -> responseObject statusCode. #type -> responseObject exceptionType. #message -> responseObject hopMessageObject