Closed peti closed 5 years ago
Citing from https://hydra.nixos.org/build/83022983:
FromJSON instance tests decode simple color: OK decode TokenStyle: OK decode KDE theme to Style: FAIL test/test-skylighting.hs:70: expected: Just (Style {tokenStyles = fromList [(KeywordTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(DataTypeTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(DecValTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(BaseNTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(FloatTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ConstantTok,TokenStyle {tokenColor = Just (RGB 170 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CharTok,TokenStyle {tokenColor = Just (RGB 146 76 157), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(SpecialCharTok,TokenStyle {tokenColor = Just (RGB 61 174 233), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(StringTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(VerbatimStringTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(SpecialStringTok,TokenStyle {tokenColor = Just (RGB 255 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ImportTok,TokenStyle {tokenColor = Just (RGB 255 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CommentTok,TokenStyle {tokenColor = Just (RGB 137 136 135), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(DocumentationTok,TokenStyle {tokenColor = Just (RGB 96 120 128), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(AnnotationTok,TokenStyle {tokenColor = Just (RGB 202 96 202), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CommentVarTok,TokenStyle {tokenColor = Just (RGB 0 149 255), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(OtherTok,TokenStyle {tokenColor = Just (RGB 0 110 40), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(FunctionTok,TokenStyle {tokenColor = Just (RGB 100 74 155), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(VariableTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ControlFlowTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(OperatorTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(BuiltInTok,TokenStyle {tokenColor = Just (RGB 100 74 155), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(ExtensionTok,TokenStyle {tokenColor = Just (RGB 0 149 255), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(PreprocessorTok,TokenStyle {tokenColor = Just (RGB 0 110 40), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(AttributeTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(RegionMarkerTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Just (RGB 224 233 248), tokenBold = False, tokenItalic = False, tokenUnderline = False}),(InformationTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(WarningTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(AlertTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Just (RGB 247 230 230), tokenBold = True, tokenItalic = False, tokenUnderline = False}),(ErrorTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = True}),(NormalTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False})], defaultColor = Just (RGB 31 28 27), backgroundColor = Just (RGB 255 255 255), lineNumberColor = Just (RGB 160 160 160), lineNumberBackgroundColor = Just (RGB 255 255 255)}) but got: Just (Style {tokenStyles = fromList [(KeywordTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(DataTypeTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(DecValTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(BaseNTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(FloatTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ConstantTok,TokenStyle {tokenColor = Just (RGB 170 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CharTok,TokenStyle {tokenColor = Just (RGB 146 76 157), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(SpecialCharTok,TokenStyle {tokenColor = Just (RGB 61 174 233), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(StringTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(VerbatimStringTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(SpecialStringTok,TokenStyle {tokenColor = Just (RGB 255 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ImportTok,TokenStyle {tokenColor = Just (RGB 255 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CommentTok,TokenStyle {tokenColor = Just (RGB 137 136 135), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(DocumentationTok,TokenStyle {tokenColor = Just (RGB 96 120 128), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CommentVarTok,TokenStyle {tokenColor = Just (RGB 0 149 255), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(OtherTok,TokenStyle {tokenColor = Just (RGB 0 110 40), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(FunctionTok,TokenStyle {tokenColor = Just (RGB 100 74 155), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(VariableTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ControlFlowTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(OperatorTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(BuiltInTok,TokenStyle {tokenColor = Just (RGB 100 74 155), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(ExtensionTok,TokenStyle {tokenColor = Just (RGB 0 149 255), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(PreprocessorTok,TokenStyle {tokenColor = Just (RGB 0 110 40), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(AttributeTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(RegionMarkerTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Just (RGB 224 233 248), tokenBold = False, tokenItalic = False, tokenUnderline = False}),(InformationTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(WarningTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(AlertTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Just (RGB 247 230 230), tokenBold = True, tokenItalic = False, tokenUnderline = False}),(AnnotationTok,TokenStyle {tokenColor = Just (RGB 202 96 202), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ErrorTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = True}),(NormalTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False})], defaultColor = Just (RGB 31 28 27), backgroundColor = Just (RGB 255 255 255), lineNumberColor = Just (RGB 160 160 160), lineNumberBackgroundColor = Just (RGB 255 255 255)}) round trip style -> theme -> style: FAIL test/test-skylighting.hs:72: expected: Just (Style {tokenStyles = fromList [(KeywordTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(DataTypeTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(DecValTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(BaseNTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(FloatTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ConstantTok,TokenStyle {tokenColor = Just (RGB 170 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CharTok,TokenStyle {tokenColor = Just (RGB 146 76 157), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(SpecialCharTok,TokenStyle {tokenColor = Just (RGB 61 174 233), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(StringTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(VerbatimStringTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(SpecialStringTok,TokenStyle {tokenColor = Just (RGB 255 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ImportTok,TokenStyle {tokenColor = Just (RGB 255 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CommentTok,TokenStyle {tokenColor = Just (RGB 137 136 135), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(DocumentationTok,TokenStyle {tokenColor = Just (RGB 96 120 128), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(AnnotationTok,TokenStyle {tokenColor = Just (RGB 202 96 202), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CommentVarTok,TokenStyle {tokenColor = Just (RGB 0 149 255), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(OtherTok,TokenStyle {tokenColor = Just (RGB 0 110 40), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(FunctionTok,TokenStyle {tokenColor = Just (RGB 100 74 155), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(VariableTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ControlFlowTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(OperatorTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(BuiltInTok,TokenStyle {tokenColor = Just (RGB 100 74 155), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(ExtensionTok,TokenStyle {tokenColor = Just (RGB 0 149 255), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(PreprocessorTok,TokenStyle {tokenColor = Just (RGB 0 110 40), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(AttributeTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(RegionMarkerTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Just (RGB 224 233 248), tokenBold = False, tokenItalic = False, tokenUnderline = False}),(InformationTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(WarningTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(AlertTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Just (RGB 247 230 230), tokenBold = True, tokenItalic = False, tokenUnderline = False}),(ErrorTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = True}),(NormalTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False})], defaultColor = Just (RGB 31 28 27), backgroundColor = Just (RGB 255 255 255), lineNumberColor = Just (RGB 160 160 160), lineNumberBackgroundColor = Just (RGB 255 255 255)}) but got: Just (Style {tokenStyles = fromList [(KeywordTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(DataTypeTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(DecValTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(BaseNTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(FloatTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ConstantTok,TokenStyle {tokenColor = Just (RGB 170 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CharTok,TokenStyle {tokenColor = Just (RGB 146 76 157), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(SpecialCharTok,TokenStyle {tokenColor = Just (RGB 61 174 233), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(StringTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(VerbatimStringTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(SpecialStringTok,TokenStyle {tokenColor = Just (RGB 255 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ImportTok,TokenStyle {tokenColor = Just (RGB 255 85 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CommentTok,TokenStyle {tokenColor = Just (RGB 137 136 135), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(DocumentationTok,TokenStyle {tokenColor = Just (RGB 96 120 128), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(CommentVarTok,TokenStyle {tokenColor = Just (RGB 0 149 255), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(OtherTok,TokenStyle {tokenColor = Just (RGB 0 110 40), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(FunctionTok,TokenStyle {tokenColor = Just (RGB 100 74 155), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(VariableTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ControlFlowTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(OperatorTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(BuiltInTok,TokenStyle {tokenColor = Just (RGB 100 74 155), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(ExtensionTok,TokenStyle {tokenColor = Just (RGB 0 149 255), tokenBackground = Nothing, tokenBold = True, tokenItalic = False, tokenUnderline = False}),(PreprocessorTok,TokenStyle {tokenColor = Just (RGB 0 110 40), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(AttributeTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(RegionMarkerTok,TokenStyle {tokenColor = Just (RGB 0 87 174), tokenBackground = Just (RGB 224 233 248), tokenBold = False, tokenItalic = False, tokenUnderline = False}),(InformationTok,TokenStyle {tokenColor = Just (RGB 176 128 0), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(WarningTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(AlertTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Just (RGB 247 230 230), tokenBold = True, tokenItalic = False, tokenUnderline = False}),(AnnotationTok,TokenStyle {tokenColor = Just (RGB 202 96 202), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False}),(ErrorTok,TokenStyle {tokenColor = Just (RGB 191 3 3), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = True}),(NormalTok,TokenStyle {tokenColor = Just (RGB 31 28 27), tokenBackground = Nothing, tokenBold = False, tokenItalic = False, tokenUnderline = False})], defaultColor = Just (RGB 31 28 27), backgroundColor = Just (RGB 255 255 255), lineNumberColor = Just (RGB 160 160 160), lineNumberBackgroundColor = Just (RGB 255 255 255)})
A mystery. I can't reproduce this locally or in CI. And as far as I can see, the 'got' and 'expected' values here are identical (as Styles, not as strings of course, because of nondeterministic Show).
Citing from https://hydra.nixos.org/build/83022983: