Proposal to add a mix integration with Fossil SCM

55 views
Skip to first unread message

Eli Bierman

unread,
Jun 15, 2017, 10:38:54 PM6/15/17
to elixir-lang-core
Hi everybody,

I use Fossil SCM for some of my private repositories, and I would like to be able to use the the Fossil repositories directly as Mix dependencies in my Elixir projects. 

It seems pretty straight-forward to create an implementation of the Mix.SCM behavior to include a Mix.SCM.Fossil module in addition to the already present Mix.SCM.GIt:

My question is: If I write a mix integration with Fossil SCM using Mix.SCM.Git as a guide, would that be something that's good for merging into Elixir Core?

I figure I'm probably not the only using Fossil SCM, and it wouldn't change any existing behavior, so it seems good to have more options for handling mix dependencies. What do other people think? I know there aren't extensions for Mercurial and Subversion, so maybe there's a good reason to only have support for the most popular SCM in core and a better place for it somewhere else. 

Let me know if you think this would be something that might be good for Elixir Core, or if you have any questions about the proposal. Thanks!

Cheers,
Eli

P.S. If you're wondering why I would use git instead of Fossil, check out this page:

José Valim

unread,
Jun 16, 2017, 2:12:44 AM6/16/17
to elixir-l...@googlegroups.com
We don't plan to support other SCMs in Mix itself but you should be able to augment Mix using Mix.SCM. Assuming that you implement a MixFossil module that implements Mix.SCM and make it available as a separate project, you can integrate it to your repos in three steps:

1. Install it as an archive in your machine: "mix archive.install hex mix_fossil" (assuming mix_fossil is the name of the project)
2. For every project that needs it, add this to the top of your mix.exs: Mix.SCM.prepend(MixFossil)
3. And inside "def project", add this: [archives: [mix_fossil: "~> 0.1"]] (where 0.1 is the proper version)

Now Mix will always load the SCM and will guarantee it is available before you run anything.



José Valim
Skype: jv.ptec
Founder and Director of R&D

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/5249b354-644d-49d8-ab48-a8fa0695926f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eli Bierman

unread,
Jun 16, 2017, 10:07:51 AM6/16/17
to elixir-lang-core, jose....@plataformatec.com.br
Hi Jose,

Thank you so much for that information, that's so helpful! I think I'll do it exactly like you laid out. :)

Eli
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages