pixie-lang / dust

Magic fairy dust for pixie, i.e. tooling around the language.
GNU Lesser General Public License v3.0
93 stars 14 forks source link

Different dependency providers #13

Open heyLu opened 9 years ago

heyLu commented 9 years ago

As mentioned previously (here and here, we want to be able to fetch dependencies from places other than GitHub.

I think we should support the following:

@kgann has suggested using multi-methods for this, seems like a good idea to me!

If you want to work on this, please say so here!

kgann commented 9 years ago

@heyLu I'm on it! I'll update https://github.com/pixie-lang/dust/pull/12 with some multi-methods and github/local files - new PR's for other providers so it doesn't get too large.

heyLu commented 9 years ago

@kgann Can you do all of that in a separate PR? Or even multiple PRs, depending on how big it gets?

kgann commented 9 years ago

@heyLu Yes, no problem.

kgann commented 9 years ago

I'm starting to think we will run into issues with cyclic and/or duplicate dependencies.

Consider 2 dependencies required for a project (perhaps through sub-dependencies):

[heyLy/hiccup "0.1.0"]
["git://git.github.org/heyLu/hiccup.git" :type "git"]

What do we do in this case? If we download both and place them in different paths and try to put both on the --load-path we will have some issues, right? Especially if they are conflicting versions.

What about requiring the names be present?

[heyLy/hiccup "0.1.0"]
[heyLy/hiccup "git://git.github.org/heyLu/hiccup.git" :type "git"]
[heyLu/hiccup "../my/local/hiccup" :type "file"]

This would allow us to detect cyclic dependencies as well as duplicates and abort/ignore. This is not 100% as someone could just change the name and have the duplicate dependency fetched.

Thoughts?

mpenet commented 9 years ago

FYI I ported clojure "dependency" lib to pixie, this could help making this happen: https://github.com/mpenet/dependency