pharo
pharo copied to clipboard
Compiler on CI failure in absence of declared trait
In bloc I got the following classe definition.
TestCase subclass: #BlBasicTest
uses: TBlExamples
instanceVariableNames: ''
classVariableNames: ''
package: 'Bloc-UnitedTests-Basic'
On the server, the trait TBlExamples was not loaded before the package containing this class definition resulting in the NewUndeclared.
This resulted in a syntax error when compiling methods on the CI.
Syntax Error on line 4: 'Variable or expression expected'
=========================================================
01: testBorderRopedText
02: <sampleInstance>
03:
04: | aText |
_^_
05: aText := 'Text with border' asRopedText.
06: aText fontSize: 30.
07: aText foreground: Color gray.
08: aText thin.
09:
10: self assert: aText rope attributes equals: {
11: (BlFontSizeAttribute size: 30).
12: (BlTextForegroundAttribute paint: Color gray).
13: BlFontWeightAttribute thin }.
14:
15: ^ aText
Error with status code 1:
657 run_script /home/runner/.smalltalkCI/helpers.sh
Error: Process completed with exit code 1.
Here without any space showing that this is not an undesirable character
Syntax Error on line 4: 'Variable or expression expected'
=========================================================
01: testBorderRopedText
02: <sampleInstance>
03:
04: | aText |
_^_
05: aText := 'Text with border' asRopedText.
06: aText fontSize: 30.
07: aText foreground: Color gray.
08: aText thin.
09:
10: self assert: aText rope attributes equals: {
11: (BlFontSizeAttribute size: 30).
12: (BlTextForegroundAttribute paint: Color gray).
13: BlFontWeightAttribute thin }.
14:
15: ^ aText
@Ducasse is the stack trace available?
This is quite common case when trait dependencies between packages are broken and the error report is very cryptic and not helpful.