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

Official windows support #401

Merged
merged 3 commits into from
Oct 9, 2020
Merged

Official windows support #401

merged 3 commits into from
Oct 9, 2020

Conversation

avdv
Copy link
Collaborator

@avdv avdv commented Oct 7, 2020

Description

Windows build on Travis fails. Check why and fix this.

  • Relevant Issues : (none)
  • Relevant PRs : (none)
  • Type of change :
    • New feature
    • Bug fix for existing feature
    • Code quality improvement
    • Addition or Improvement of tests
    • Addition or Improvement of documentation

@codecov-io
Copy link

codecov-io commented Oct 7, 2020

Codecov Report

Merging #401 into master will increase coverage by 0.30%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #401      +/-   ##
==========================================
+ Coverage   88.88%   89.18%   +0.30%     
==========================================
  Files           8        8              
  Lines         513      518       +5     
==========================================
+ Hits          456      462       +6     
+ Misses         57       56       -1     
Impacted Files Coverage Δ
lib/colorls/core.rb 90.26% <100.00%> (+0.22%) ⬆️
lib/colorls/fileinfo.rb 82.05% <100.00%> (+2.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 035bcec...325c58e. Read the comment docs.

@avdv avdv force-pushed the fix-windows branch 2 times, most recently from 325c58e to 3e88991 Compare October 9, 2020 16:23
@avdv avdv changed the title debug Official windows support Oct 9, 2020
* call `bundle clean` before caching
* explicitely specify path for `bundle install`
* create a `--msys2--` file as a marker to skip msys2 & ridk install
On Windows, MRI Ruby uses the `FindFirstFileW` et. al. kind of functions with
wide character paths and constantly converts from multi-byte to wide character
encoding back and forth when calling any methods on `File` or `Dir`.

This means that when using `Encoding::ASCII_8BIT` for reading directory entries,
that this does not round trip properly, if a file name contains unicode
characters. That is because Ruby assumes the path string is encoded in Windows
Codepage 1252[1].

* skip symlink test if files were checked out from git as textual symlinks on
  Windows
* use UTF-8 encoding on Windows, since this properly round-trips between
  multi-byte and wide character encoding
* travis: windows job no longer is allowed to fail

[1]: https://github.com/ruby/ruby/blob/946cd6c5348d7dd12ecc41e79c3ca9803d2ca7f0/win32/file.c#L131-L134
@avdv avdv marked this pull request as ready for review October 9, 2020 16:39
@avdv avdv merged commit 6f9bc84 into athityakumar:master Oct 9, 2020
@avdv avdv deleted the fix-windows branch October 9, 2020 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants