Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to hide all those "packages" folders in Dart Editor?

After I've installed packages, it seems we have this packages folder under every folder in the project. Is this really necessary? Can't Dart just look up the directory chain to find the top level packages folder and be done with it?

Or at least, is there a way to hide the rest of the packages folders because they clutter the view?

like image 300
Tower Avatar asked Nov 12 '22 19:11

Tower


1 Answers

Using the M1 version of the editor, all the packages symlinks are hidden. You should only see the top level packages directory, but not all the symlinks. If you've updated your editor (perhaps with a clean reinstall) and you're still seeing packages symlinks in the Files view, please open a bug at http://dartbug.com/new and paste in your Editor version and a screenshot.

As to your question "why can't Dart just walk the tree?", that's difficult when you're serving a Dart app on a web server. A Dart file may be served from any path, but there's no good concept of "walking the tree"... how far do you go up?

The packages symlinks technique makes finding those dependencies relative to your Dart script, which makes it easy for a web deployment of Dart.

like image 186
Seth Ladd Avatar answered Dec 23 '22 16:12

Seth Ladd