eBay / tsv-utils

eBay's TSV Utilities: Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more.
https://ebay.github.io/tsv-utils/
Boost Software License 1.0
1.43k stars 80 forks source link

Remove @safe annotation from methods invoking IO methods (Issue #282). #283

Closed jondegenhardt closed 4 years ago

jondegenhardt commented 4 years ago

Drop @safe annotations from methods in tsv_utils.common.utils that make calls to IO related routines. Addresses issue #282.

The problem in #282 is that under Windows an @system function gets called. On Unix and other non-Windows systems the call get routed to an @trusted function. On Unix @safe will compile, but not on Windows.

Note: This fix was made based on the information in the bug report filed. tsv-utils is not currently tested on Windows platform, including in CI, so I don't have an immediate way to test the fix on Windows. The specific case looks pretty clear, and this PR fixes a number of similar cases. However, there may be more such cases in the code.