Thursday, November 15, 2012

Breaking Change: Remove Support for Old Style Pub Package Layouts

Dart engineer Bob Nystrom writes to tell us about the change:

Many moons ago, there was a great enlightenment and pub discovered that it had not just one, but two ways of laying out packages. As always, the new way was proclaimed my many and sundry as "better" but some aging adherents preferred the old ways.

Prophets warned that a great cataclysm (referred to cryptically only as "M1") would render the old package layout unsupported and relegated to myths and legends.

The time of the cataclysm is now. Henceforth and forever more, there is but one way to lay out your pub packages, the One True Way. Those who refuse to follow the path will find their packages un-importable.

Those of you who have heeded the omens have nothing to fear: your packages are already safely applying the most harmonious layout, and their is naught for you to do. Those of you who have ignored the signs...

...well, mainly you just have to move your Dart libraries out of the root directory of your package and into a "lib" subdirectory. That's pretty much it.

Verily,

- bob

As always, we invite you to join our Dart mailing list, ask questions on Stack Overflow, or file feature requests on dartbug.com.