dependencies management is really a not so trivial solution...

There are several solution:
- javaish : use reverse url notation like:
org.server.organisation.product.libraryname. If we expect not to use the
URL from another company, conflict should be avoided most of the time. But
while this is good for compagny, this is not really usable for personal
development. org.compagnie doesn't change often, while you may want to
switch from github to another server, breaking this rule. Given that, you
simple push your artifact inside a repository manager (like artifactory),
and simply request the package name and version, it will easily find out
which one to use and install it in your development environement.
- central repository: much simpler, just the name of the library should be
unique. pip use this and it's much easier to use (just push the tarball and
that's all, pip will see and install it when needed).

I don't know if there are plan to do something about rustpkg, but I think
dependencies management is something really important to have to ease the
wide adoption of rust.

I like the python way, simple is better. Just the name of the package
should be unique, and the package should be validated.

I would imagine something like: defining in mod.rs the depencendies import
directives with something like "#[import mylibrary]" which would direct
rust pbk to try importing the library "mylibrary" from a know local path
(if you develop both library and the application that use it) or from a
central repository (www.rust-lang.com/pkg/ ?), download it and install it
inside the directory structure (eventually not versionnned, to avoid
copying it), and configuring the proper "use pkg::mylibrary" to work
directly, for example. Of course for local development, copying it would
not be necessary.
I also think that proposing a random URL to be set (for instance to specify
the URL of a personal Github project) would also allow the use of package
that is not entered yet inside the managed central repository.

But this doesn't cover dependencies between packages and versionning...

G.

-----
Gaetan



2013/12/4 Jordi Boggiano <[email protected]>

> On Tue, Dec 3, 2013 at 8:44 PM, SiegeLord <[email protected]> wrote:
> > I don't think any of these options are ideal. I don't want to suggest
> > solutions to these issues because I'm not sure how things are supposed
> to be
> > used/what the planned design is. Does anybody use rustpkg seriously
> today?
> > Is everybody making workspaces with a github.com/<user> directory where
> they
> > develop their software?
>
> I usually (i.e. in other languages I work with) develop dependencies
> "in-line" as they were cloned by the package manager, at least if they
> need deep integration with the surrounding project and can not be
> easily tested/developed in isolation. It's not such a horrible
> situation as long as the package manager is smart enough to avoid
> wiping your stuff on its own.
>
> That said, a pretty good option I think is to have a command like npm
> link [1] that would allow you to tell rustpkg to set up a symlink to
> another dir on the disk, yet without interfering/polluting the
> project's source itself.
>
> [1] https://npmjs.org/doc/cli/npm-link.html
>
> Cheers
>
> --
> Jordi Boggiano
> @seldaek - http://nelm.io/jordi
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to