Skip to content

Conversation

rivy
Copy link
Member

@rivy rivy commented Dec 30, 2019

This PR is on top of the windows_legacy fix/addition PR.

  • adds cargo make support for platform dependent build and testing (using cargo make and cargo make test, respectively)
  • modernizes deprecated: 1) range operator, 2) try!, and 3) trim_{left,right}
  • corrects all test failures for all tested CI types (both Travis CI and AppVeyor)
    • tests "%w" and "%W" for stat more loosely given variable support on target machines via built-in stat
    • avoids testing stat outputs ("%a", "%d", and "%f") which are race conditions and may vary per machine and/or run
  • fixes testing on windows linux (via WSL)

I'm happy to make changes.

This is really a preliminary PR to fix all broken/deprecation issues and serving as a base for a separate (massive) "clippy-cleanup" PR.

rivy added 14 commits January 27, 2020 21:33
- convert to newer `..=` syntax, fixing compiler warnings

+ requires MinSRV >= v1.26.0

.# [why]

The inclusive range operator (`..=`) was stabilized in rust v1.26.0.

Warnings requesting conversion from the old `...` operator to `..=` were
introduced in rust v1.37.0.

* ref: <https://github.com/rust-lang/rust/blob/master/RELEASES.md>
- convert to newer `?` syntax, fixing compiler warnings

+ requires MinSRV >= v1.13.0

.# [why]

The `?` operator was stabilized in rust v1.13.0.

Warnings requesting conversion from the old `try!` macro to the `?` operator
were introduced in rust v1.39.0.

* ref: <https://github.com/rust-lang/rust/blob/master/RELEASES.md>
…t,end}...`

- `trim_{start,end}{,_matches}` stabilized in rust v1.30.0
- `trim_{start,end}{,_matches}` deprecated (with compiler warnings) in rust v1.33.0

+ requires MinSRV >= v1.30.0

* ref: https://github.com/rust-lang/rust/blob/master/RELEASES.md
+ ToDO added ~ when possible, test under WSL2 and differentiate/liberalize if possible
…ions

- allow actual outputs to differ from expected (ie, `stat`) if `stat` is reporting "unknown" creation time

.# [why]

For many *nix flavors, `stat` is unable to detect birth/creation date
for directories/files. The information is available via the `statx()`
system call (for linux kernels >= v4.11), and rust supplies that
information via fs::MetadataExt for v1.40+. So, for rust v1.40+, there
will likely be a mismatch between the output of the system `stat` and
this ('uutils') `stat`.

* ref: <https://askubuntu.com/questions/470134/how-do-i-find-the-creation-time-of-a-file> @@ <https://archive.is/IsEAJ>
@rivy rivy merged commit 7200ca7 into uutils:master Apr 7, 2020
@rivy rivy deleted the fix+modernize branch April 8, 2020 01:44
@rivy rivy mentioned this pull request Apr 8, 2020
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.

1 participant