Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check fails while building with latest Go package on Fedora 39 #927

Closed
1 task done
flyn-org opened this issue Feb 14, 2024 · 1 comment · Fixed by #928
Closed
1 task done

Check fails while building with latest Go package on Fedora 39 #927

flyn-org opened this issue Feb 14, 2024 · 1 comment · Fixed by #928
Labels

Comments

@flyn-org
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Compiling with Go 1.20.2 and 1.21.7 works. Compiling with Go 1.22.0 on Fedora Rawhide causes a test to fail:

--- FAIL: TestLexers (1.42s)
    --- FAIL: TestLexers/Python_2/testdata/python2/test_complex_file1.actual (0.01s)
        lexers_test.go:102: Expected values to be equal:
               {"type":"Punctuation","value":"("},
               {"type":"Name","value":"translation"},
               {"type":"Punctuation","value":"))"},
            -  {"type":"Text","value":"\n\n\n\u000c\n"},
            +  {"type":"Text","value":"\n\n\n\f\n"},
               {"type":"CommentSingle","value":"# Base64 encoding/decoding uses binascii"},
               {"type":"Text","value":"\n\n"},
               {"type":"Keyword","value":"def"},
            @@ -417,7 +417,7 @@
               {"type":"Punctuation","value":"("},
               {"type":"Name","value":"_urlsafe_decode_translation"},
               {"type":"Punctuation","value":"))"},
            -  {"type":"Text","value":"\n\n\n\u000c\n"},
            +  {"type":"Text","value":"\n\n\n\f\n"},
               {"type":"CommentSingle","value":"# Base32 encoding/decoding must be done in Python"},
               {"type":"Text","value":"\n"},
               {"type":"Name","value":"_b32alphabet"},
            @@ -1458,7 +1458,7 @@
               {"type":"Punctuation","value":"("},
               {"type":"Name","value":"parts"},
               {"type":"Punctuation","value":")"},
            -  {"type":"Text","value":"\n\n\n\u000c\n"},
            +  {"type":"Text","value":"\n\n\n\f\n"},
               {"type":"CommentSingle","value":"# RFC 3548, Base 16 Alphabet specifies uppercase, but hexlify() returns"},
               {"type":"Text","value":"\n"},
               {"type":"CommentSingle","value":"# lowercase.  The RFC also recommends against accepting input case"},
            @@ -1541,7 +1541,7 @@
               {"type":"Punctuation","value":"("},
               {"type":"Name","value":"s"},
               {"type":"Punctuation","value":")"},
            -  {"type":"Text","value":"\n\n\n\u000c\n"},
            +  {"type":"Text","value":"\n\n\n\f\n"},
               {"type":"CommentSingle","value":"# Legacy interface.  This code could be cleaned up since I don't believe"},
               {"type":"Text","value":"\n"},
               {"type":"CommentSingle","value":"# binascii has any line length limitations.  It just doesn't seem worth it"},
            @@ -1806,7 +1806,7 @@
               {"type":"Punctuation","value":"("},
               {"type":"Name","value":"s"},
               {"type":"Punctuation","value":")"},
            -  {"type":"Text","value":"\n\n\n\u000c\n"},
            +  {"type":"Text","value":"\n\n\n\f\n"},
               {"type":"CommentSingle","value":"# Useable as a script..."},
               {"type":"Text","value":"\n"},
               {"type":"Keyword","value":"def"},
FAIL
exit status 1
FAIL	github.com/alecthomas/chroma/v2/lexers	1.616s

Might this issue be related to golang/go#64346?

To Reproduce

Try to execute chroma's tests using Go 1.22.0 on Fedora Rawhide.

@flyn-org flyn-org added the bug label Feb 14, 2024
@alecthomas
Copy link
Owner

Seems likely. The golden files just need to be regenerated. Contributions are welcome.

flyn-org added a commit to flyn-org/chroma that referenced this issue Feb 14, 2024
Newer versions of Go emit '\f' rather than "\u000c" for formfeeds. This
patch adjusts the expected values for the lexers tests to match.

Fixes: alecthomas#927

See also: golang/go#64346 for the change to
Go.

Signed-off-by: W. Michael Petullo <[email protected]>
alecthomas pushed a commit that referenced this issue Feb 14, 2024
Newer versions of Go emit '\f' rather than "\u000c" for formfeeds. This
patch adjusts the expected values for the lexers tests to match.

Fixes: #927

See also: golang/go#64346 for the change to
Go.

Signed-off-by: W. Michael Petullo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants