Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Supporting pub on heroku #6

merged 1 commit into from Nov 26, 2012


None yet
5 participants

kohlikohl commented Nov 18, 2012

This pull request adds support for pub in the build process of Heroku.

As pub installs packages into the $HOME directory by default and since the $HOME folder in the build environment differs from the one in runtime, dart apps relying on pub would not work.

The packages need to be installed inside an separate folder in the cache folder and following the installation, the packages need to be copied to the build folder, maintaining the folder structure.

Additionally, in order to include and use packages residing within the dart-sdk, the whole dart-sdk folder needs to be moved into the build folder and pub needs to be called from that folder structure e.g. /app/dart-sdk/bin/pub install to maintain a correct symlink to the packages.

Custom build versions
Also included in this pull request is the ability to set an environmental variable called BUILD which takes a revision number from http://commondatastorage.googleapis.com/dart-editor-archive-integration/latest/changelog.html

This comes in handy when using libraries that are not working with the latest sdk version.

For more information, please feel free to contact me.

I hope this makes it easier for users to use dart on Heroku.



igrigorik commented Nov 18, 2012

Holy commit batman! :)

Can you please squash the commits? Don't need the debug history...

kevmoo commented Nov 19, 2012

@kohlikohl before sending pull requests, git rebase -i is your friend :-)

Matthias Knoll adding pub support to heroku buildpack
Signed-off-by: Matthias Knoll <matthias@bravenewtalent.com>

kohlikohl commented Nov 19, 2012

@igrigorik @kevmoo Sorry guys, its als nice and shiny now.

kevmoo commented Nov 19, 2012



igrigorik commented Nov 19, 2012

Nice, thanks @kohlikohl - lgtm!

@sethladd.. quick sanity check?


adam-singer commented Nov 26, 2012

Just tested this out, worked great for me.

@kohlikohl I'd suggest updating the test_app to include something from the dart sdk (logging, unittest, args) to show off the support for pub. Even better would be an updated test_app that uses some of the pub layout.

Great job!

@igrigorik igrigorik added a commit that referenced this pull request Nov 26, 2012

@igrigorik igrigorik Merge pull request #6 from kohlikohl/master
Supporting pub on heroku

@igrigorik igrigorik merged commit 7cdbbe2 into igrigorik:master Nov 26, 2012


sethladd commented Nov 27, 2012


@igrigorik igrigorik added a commit that referenced this pull request Jan 7, 2014

@igrigorik igrigorik Merge pull request #6 from kohlikohl/master
Supporting pub on heroku
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment