path icon indicating copy to clipboard operation
path copied to clipboard

Remove the optional arguments to absolute`()

Open nex3 opened this issue 9 years ago • 3 comments

The absolute() function supports six optional arguments, in the same manner as join(). These arguments are rarely used in practice, and are an odd divergence from path's usual style of functions that do a single job. They also presumably add a small amount of overhead in the very common case of making a single path absolute. Once we decide to make a release with breaking changes, it should remove these arguments.

nex3 avatar Dec 01 '15 04:12 nex3

@nex3 Is the issue still relevant? Could I work on this?

jddeep avatar Feb 22 '20 05:02 jddeep

This is a question for the current maintainer of the package.

nex3 avatar Feb 24 '20 18:02 nex3

Here is one usage: https://github.com/flutter/flutter/blob/e2dcdb60e327f80d414d3d1e72e2863bf4c9252c/packages/flutter_tools/lib/src/commands/update_packages.dart#L1103

This could be replaced with path.absolute(path.join(arg1, arg2)).

My opinion is that we should go ahead and do this change along with null safety, but I don't have strong feelings. @jakemac53 @kevmoo - do you have any thoughts?

@jddeep - I do think this is still relevant - it's probably not something I'd recommend trying to take on. The change itself is easy, however the real work comes from getting the breaking change version bump shepherded through our core ecosystem and we won't be able to accept PRs on this until we're prepared to do that work.

natebosch avatar Feb 24 '20 21:02 natebosch