Closed markaren closed 3 years ago
The PR fails on file locking on windows.. Don't know how to fix..
I hope this PR is welcome. No need to use boost when we got the std available. The only caveat is that we need the fallback header in order to support gcc 6 and 7. We also need to fix the file locking unit test. @kyllingstad need your expertise on that.
It's very welcome, in my opinion. I'll look into the file locking issue.
Hopefully, this does the trick. The file locking mechanism has an internal cache of mutexes associated with different files, and each time one tries to create a new one, it checks whether a mutex exists for the file already. Since different paths (relative vs. absolute, links, etc.) can refer to the same file, it uses filesystem::equivalent()
to perform this check. But this requires that the file exists, which we previously didn't check.
Approving @markaren's changes here. I suppose he or @ljamt should have a look at mine.
Looks good to me 👍
This PR replaces usage of boost::filesystem with std::filesystem. In order to support gcc7, the header
fs_portability
is used, which falls back to std::experimental::filesystem. Thus, usage ofstd::filesystem
should be done using the typealiascosim::filesystem