Private pub

358 views
Skip to first unread message

Anders Holmgren

unread,
Jan 14, 2014, 11:22:00 PM1/14/14
to mi...@dartlang.org
I've been thinking about how dart development might scale in a reasonable sized org.

git based dependencies are a great start. However I imagine as you scale up then you start running into a problem with lots of projects having hard coded git urls. What happens if you want to reorganize your git repos? You'd have to edit every project that depends on it.

Strikes me that the sort of indirection that pub gives you starts being useful. Ie private pub servers. This is similar to running local maven repos which is very common in orgs.

Potentially acting as local caches for pub.dartlang might be useful too particularly in conservative orgs like banks that want to restrict what libs you can use (typically due to licenses)

Any thought gone into how this might work? I know you can run a local pub server. Is that one expected use of it?

A

Günter Zöchbauer

unread,
Jan 15, 2014, 1:21:07 AM1/15/14
to mi...@dartlang.org
There was a question lately on SO how to build your own pub server.
I'm courious too what options are available.

Anders Holmgren

unread,
Jan 15, 2014, 2:09:43 AM1/15/14
to mi...@dartlang.org
Yeah seems that hosted dependencies with a local pub server might fit the bill. Be good to have some doco around how the dart team envisages how this would be set up 

Rico Wind

unread,
Jan 15, 2014, 2:22:54 AM1/15/14
to General Dart Discussion, Bob Nystrom
+Bob


On Wed, Jan 15, 2014 at 8:09 AM, Anders Holmgren <andersm...@gmail.com> wrote:
Yeah seems that hosted dependencies with a local pub server might fit the bill. Be good to have some doco around how the dart team envisages how this would be set up 


On Wednesday, 15 January 2014 17:21:07 UTC+11, Günter Zöchbauer wrote:
There was a question lately on SO how to build your own pub server.
I'm courious too what options are available.

On Wednesday, January 15, 2014 5:22:00 AM UTC+1, Anders Holmgren wrote:
I've been thinking about how dart development might scale in a reasonable sized org.

git based dependencies are a great start. However I imagine as you scale up then you start running into a problem with lots of projects having hard coded git urls. What happens if you want to reorganize your git repos? You'd have to edit every project that depends on it.

Strikes me that the sort of indirection that pub gives you starts being useful. Ie private pub servers. This is similar to running local maven repos which is very common in orgs.

What happens if you want to reorganize your pub packages? You'd have to edit every project that depends on it :-)
Jokes aside, yes, it would be nice to be able to host private packages easily.Pub actually has the ability to server packages from the file system, we utilize this in our own testing scripts, but afaik there is no easy way to have a local pub server running that servers up some set of packages, Bob can elaborate on this.

Cheers,
Rico
 

Potentially acting as local caches for pub.dartlang might be useful too particularly in conservative orgs like banks that want to restrict what libs you can use (typically due to licenses)

Any thought gone into how this might work? I know you can run a local pub server. Is that one expected use of it?

A

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

Dan Schultz

unread,
Jan 15, 2014, 2:46:06 AM1/15/14
to mi...@dartlang.org, Bob Nystrom
Pub's package server is open sourced here: https://github.com/dart-lang/pub-dartlang. You can clone the repo and host your own copy on Google App Engine. Use the --server option when publishing a package to upload it to your hosted server. Check the pub docs for more info.

Dan

Daniel Morilha

unread,
Jan 15, 2014, 9:21:49 AM1/15/14
to mi...@dartlang.org, Bob Nystrom
what about pub supporting multiple repos (like yum, pacman). corporate development could have additional packages on an internal repo and wouldn't need to mess with the external ones?

thanks,
--
Daniel Morilha (dmor...@gmail.com)

Daniel Morilha

unread,
Jan 15, 2014, 9:24:07 AM1/15/14
to mi...@dartlang.org, Bob Nystrom
I believe I found the answer to my question on a previous post: https://groups.google.com/a/dartlang.org/d/msg/misc/VYApOnLdecA/EoFnBQT-UdoJ

thanks,
--
Daniel Morilha (dmor...@gmail.com)

Bob Nystrom

unread,
Jan 15, 2014, 12:10:53 PM1/15/14
to Rico Wind, General Dart Discussion

On Tue, Jan 14, 2014 at 11:22 PM, Rico Wind <ri...@google.com> wrote:
Pub actually has the ability to server packages from the file system, we utilize this in our own testing scripts, but afaik there is no easy way to have a local pub server running that servers up some set of packages, Bob can elaborate on this.

All you need to do is set a PUB_HOSTED_URL environment variable to point to the URL of your server and pub will look there to download hosted dependencies.

Like Dan notes, you can run your own copy of the actual pub server code, or you could write your own pub server. The HTTP is quite simple. (In fact, I think it's simple enough that you could actually write a "pub server" just using a normal static web server and a couple of correctly arranged JSON files and .tar.gzs.) 

We should definitely document this stuff better. So far, it hasn't been a priority, but if we have users that care about this, we can try to find the time to smooth this pathway. (Or, better, take external contributions that do this!)

Cheers!

- bob

Anders Holmgren

unread,
Jan 15, 2014, 5:05:14 PM1/15/14
to mi...@dartlang.org, Rico Wind
Thanks Bob. Sounds like there is at least the beginnings of a good answer here. Currently I'm using dart on a side project so not a major issue for me yet, but I'd love to use it at work one day and this is the sort of thing that would be needed to make that viable. 

No doubt someone will write something similar to Nexus for Dart one day.

cheers
Anders
Reply all
Reply to author
Forward
0 new messages