-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Deprecate IO subs that operate on multiple paths in 6.e #5485
base: main
Are you sure you want to change the base?
Conversation
This requires some general consensus |
This changes various cleanup code to operate on a single file at a time instead of using the multi-path subroutines. see: rakudo/rakudo#5485
4c0a46b
to
95bdb71
Compare
Can we make it 6.e only? I generally concur, but best if we don't touch 6.c/d. |
95bdb71
to
74f01d0
Compare
74f01d0
to
5951684
Compare
I've made the changes apply to |
I think @lizmat can explain better as I wasn't closely following the recent changes to the roast, but the first rule: have tests for each version with explicit |
5951684
to
4ceca13
Compare
While convienient, being able to pass multiple paths to e.g. &rmdir is problematic because there isn't a blessed way to handle what to do when an exception or failure occurs, i.e. should it try to rmdir every entry even if some things fail, or stop on the first failure? Previously `rmdir("doesn't exist", "also doesn't exist")` would return an empty array with no indication of what the failure was. Yet `("doesn't exist", "also doesn't exist").grep(*.IO.rmdir) does get failures for these. This difference in behavior is not intuitive. This changes subroutines that act on multiple paths by adding a single path variant, as well as deprecating the multi file variant. The inclusion of a single path variant is a breaking change, as these subroutines will now return a failure instead of an array.
4ceca13
to
bd64aac
Compare
While convienient, being able to pass multiple paths to e.g. &rmdir is problematic because there isn't a blessed way to handle what to do when an exception or failure occurs, i.e. should it try to rmdir every entry even if some things fail, or stop on the first failure?
Previously
rmdir("doesn't exist", "also doesn't exist")
would return an empty array with no indication of what the failure was. Yet `("doesn't exist", "also doesn't exist").grep(*.IO.rmdir) does get failures for these. This difference in behavior is not intuitive.This changes subroutines that act on multiple paths by adding a single path variant, as well as deprecating the multi file variant. The inclusion of a single path variant is a breaking change, as these subroutines will now return a failure instead of an array.