Here are some frequently asked questions about pub.
Pub runs on any platform that supports the Dart VM. That basically means relatively recent versions of Mac, Linux and Windows.
However, Windows has some limitations:
Pub relies on junction points for core functionality, and those aren’t available on the above. We realize these limitations are painful and we’re hoping to address the root cause but it will take a while to get there.
After you run pub, you’ll notice that your package has little
directories sprinkled all over it. These are needed to make “package:” imports
work. When your code has an import with the “package” scheme, a Dart
implementation like the VM or dart2js translates that to a path or URL using a
simple rewriting rule:
For example, if you app’s entrypoint is
Magically turns into:
Then Dart loads that as normal. This behavior is a specified part of
the Dart language. The example only works if you have a directory named
packages inside your
web directory and that directory in turn contains the
packages that your app uses.
Pub creates these directories for you. The main one it creates is in the root
of your package. Inside that, it creates symlinks pointing to the
directories of each package your app depends on. (The dependencies
themselves will usually live in your system cache.)
After creating the main
packages directory in your package’s root, pub then
creates secondary ones in every directory in your package where a Dart
entrypoint may appear. Currently that’s
Pub also creates
packages symlinks in subdirectories of any of those that
point back to the main one. Since you may have entrypoints under, for example,
web/admin/controllers/, pub makes sure a
is always nearby. Otherwise the imports won’t work.
When you have an app with your own Dart server, you can use the shelf_proxy package to set up a proxy to route requests to an external “pub serve” instance.
We use the main Dart bug tracker. Feel free to file a ticket. When you do, please include:
pub --verbose <your command>.
Once a package is published, you’re strongly discouraged from deleting it. After all, some user could already be depending on it! If, however, you really want your package deleted, file an issue and the Pub authors will take down your package. You’ll need to use a different version when you re-upload it.
The pub package server is hosted on App Engine. We’ve seen a few times where App Engine has run slowly for us and other users, leading to some timeouts. If this happens, send us a note on the mailing list and we’ll look into it. Usually it resolves itself in a few hours.
Probably because we haven’t implemented it yet. Pub is still under active development. If you would like to see specific features, please file a ticket after searching to make sure it hasn’t already been requested yet. If it has, star it so we know what things are important to users.
We don’t generally make public roadmaps for pub. The Dart project is very fluid and priorities and schedules change very frequently. If we make promises for the future, we are likely to end up disappointing users when plans change.
Send an email to the main Dart mailing list and we’ll see it.