dart-lang / core

This repository is home to core Dart packages.
https://pub.dev/publishers/dart.dev
BSD 3-Clause "New" or "Revised" License
19 stars 7 forks source link

Remove the optional arguments to absolute`() #498

Open nex3 opened 9 years ago

nex3 commented 9 years ago

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.

jddeep commented 4 years ago

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

nex3 commented 4 years ago

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

natebosch commented 4 years ago

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.