Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .smalltalk.ston
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SmalltalkCISpec {
#baseline : 'HOP',
#platforms : [ #pharo ],
#directory : 'source',
#load : [ 'All' ],
#onConflict : #useIncoming
}
]
Expand Down
26 changes: 25 additions & 1 deletion source/BaselineOfHOP/BaselineOfHOP.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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."
<baseline>
spec for: #'common' do: [
self
Expand All @@ -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' }
Expand Down
1 change: 1 addition & 0 deletions source/HOP-Core-Tests/HOPCodeTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion source/HOP-Core-Tests/HOPTestCase.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ HOPTestCase >> delegate [

{ #category : 'as yet unclassified' }
HOPTestCase >> parseResponse: aZnResponse [
^ NeoJSONReader fromString: aZnResponse contents
^ STONJSON fromString: aZnResponse contents
]

{ #category : 'tests' }
Expand Down
10 changes: 9 additions & 1 deletion source/HOP-Core/HOPJsonResponseFormatter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading