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

[#164] Improve Windows support #191

Merged
merged 3 commits into from
Nov 30, 2022

Commits on Nov 29, 2022

  1. [#164] Use utf8-compatible codepage on Windows

    Problem: xrefcheck uses utf8 symbols in reports, which are not supported
    on most of Windows shells by default.
    Sometimes they are printed as question marks (and it cause golden tests to fail)
    and sometimes printing of them raise an error.
    
    Solution: use function `withCP65001` from `code-page` package which
    sets correct codepage on Windows and do nothing on other OSs
    Sorokin-Anton committed Nov 29, 2022
    Configuration menu
    Copy the full SHA
    09783e0 View commit details
    Browse the repository at this point in the history
  2. [#164] Use only '/' as path separator

    Problem: in markdown links, '/' should always be used as path separator ,
    e.g. GitHub renderer is not threating link `[x](a\b.md)` as a link
    to file in dir `a`
    We use OS-dependent file separators everywhere, so
    e.g. `canonizeLocalRef "./a.md"="./a.md`"` on Windows
    
    Solution: replace '\' to '/' while constructing repo tree if needed
    and then use only '/', preferring functions from `System.FilePath.Posix`.
    We can do this, since 'a/b' and `a\b` are equivalent paths on Windows
    Sorokin-Anton committed Nov 29, 2022
    Configuration menu
    Copy the full SHA
    aba295b View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2022

  1. [#164] Add workflow for running Windows tests on CI

    Problem: we are not testing behavior of xrefcheck on Windows
    
    Solution: and add workflow to run
    golden and tasty tests on CI
    via github-actions windows runner
    Some subproblems appear:
    
    1.
    Problem: CI build fails beacuse it needs `pcre` package
    Solution: add it (somehow), see `install pacman dependencies`
    in ci.yml
    
    2.
    Problem: Network errors displayed different on different platforms
    Solution: collect output from both and use
    `assert_diff expected_linux.gold || assert_diff expected_windows.gold`
    
    3:
    Problem: "Config matches" test is failing because checkout action
    clone files with CRLF, and test assert equality of two ByteStrings
    Solution: manually remove CR
    Sorokin-Anton committed Nov 30, 2022
    Configuration menu
    Copy the full SHA
    fb77575 View commit details
    Browse the repository at this point in the history