caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] how do you develop multiple dependent projects simultaneously?
@ 2017-07-31 20:33 Martin DeMello
  2017-07-31 20:41 ` Nicolás Ojeda Bär
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Martin DeMello @ 2017-07-31 20:33 UTC (permalink / raw)
  To: caml-list

I have a project that depends on two other libraries, both pinned to
local git repos in opam. However I find it quite annoying to have to
run opam update && opam install every time I make a change in the
libraries, especially when I'm making small changes to all three
projects at the same time. Is there any smoother workflow that people
use?

martin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] how do you develop multiple dependent projects simultaneously?
  2017-07-31 20:33 [Caml-list] how do you develop multiple dependent projects simultaneously? Martin DeMello
@ 2017-07-31 20:41 ` Nicolás Ojeda Bär
  2017-07-31 20:43 ` David Allsopp
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Nicolás Ojeda Bär @ 2017-07-31 20:41 UTC (permalink / raw)
  To: Martin DeMello; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]

Hi Martin,

Other people will be able to give you a more extensive answer, but my
understanding is that jbuilder supports this workflow directly.
So if your project and both libraries use jbuilder you can just drop both
local git repos somewhere in your tree and everything will work
automatically.

See
http://jbuilder.readthedocs.io/en/latest/project-layout-specification.html
for the details.

Best wishes,
Nicolas


On Mon, Jul 31, 2017 at 10:33 PM, Martin DeMello <martindemello@gmail.com>
wrote:

> I have a project that depends on two other libraries, both pinned to
> local git repos in opam. However I find it quite annoying to have to
> run opam update && opam install every time I make a change in the
> libraries, especially when I'm making small changes to all three
> projects at the same time. Is there any smoother workflow that people
> use?
>
> martin
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

[-- Attachment #2: Type: text/html, Size: 1997 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] how do you develop multiple dependent projects simultaneously?
  2017-07-31 20:33 [Caml-list] how do you develop multiple dependent projects simultaneously? Martin DeMello
  2017-07-31 20:41 ` Nicolás Ojeda Bär
@ 2017-07-31 20:43 ` David Allsopp
  2017-08-01  9:19 ` Gerd Stolpmann
  2017-08-03 11:52 ` rixed
  3 siblings, 0 replies; 5+ messages in thread
From: David Allsopp @ 2017-07-31 20:43 UTC (permalink / raw)
  To: Martin DeMello; +Cc: caml-list

Martin DeMello wrote:
> I have a project that depends on two other libraries, both pinned to
> local git repos in opam. However I find it quite annoying to have to
> run opam update && opam install every time I make a change in the
> libraries, especially when I'm making small changes to all three
> projects at the same time. Is there any smoother workflow that people
> use?

This is something jbuilder handles really easily, as long as your dependent libraries also use jbuilder - all you have to do is checkout the dependent libraries in subdirectories of your project and jbuilder will build and use them instead of the opam packages. Once you're done working on the libraries, you do whatever's necessary to push your changes, update your opam package/pin and then delete the library's sub-directory and on your next build, jbuilder will automatically return to using the opam package.


David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] how do you develop multiple dependent projects simultaneously?
  2017-07-31 20:33 [Caml-list] how do you develop multiple dependent projects simultaneously? Martin DeMello
  2017-07-31 20:41 ` Nicolás Ojeda Bär
  2017-07-31 20:43 ` David Allsopp
@ 2017-08-01  9:19 ` Gerd Stolpmann
  2017-08-03 11:52 ` rixed
  3 siblings, 0 replies; 5+ messages in thread
From: Gerd Stolpmann @ 2017-08-01  9:19 UTC (permalink / raw)
  To: caml-list


[-- Attachment #1.1: Type: text/plain, Size: 1338 bytes --]

What I usually do is that I set the OCAMLPATH variable so that ocamlfind
can find the not-yet packaged or installed version of the just compiled
library. Of course, this requires that you structure your source
repository so that this is possible, e.g. I often use

src/library-name/<folder for library incl. META>

and then OCAMLPATH=<dir>/src works (use a colon-separated path if you
have several of such locations).

Still, this means that you have to clean and rebuild often, but you are
at least skipping the installation part.

Gerd


On 31.07.17 22:33, Martin DeMello wrote:
> I have a project that depends on two other libraries, both pinned to
> local git repos in opam. However I find it quite annoying to have to
> run opam update && opam install every time I make a change in the
> libraries, especially when I'm making small changes to all three
> projects at the same time. Is there any smoother workflow that people
> use?
>
> martin
>

-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
My OCaml site:          http://www.camlcity.org
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
------------------------------------------------------------



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 481 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] how do you develop multiple dependent projects simultaneously?
  2017-07-31 20:33 [Caml-list] how do you develop multiple dependent projects simultaneously? Martin DeMello
                   ` (2 preceding siblings ...)
  2017-08-01  9:19 ` Gerd Stolpmann
@ 2017-08-03 11:52 ` rixed
  3 siblings, 0 replies; 5+ messages in thread
From: rixed @ 2017-08-03 11:52 UTC (permalink / raw)
  To: Martin DeMello; +Cc: caml-list

-[ Mon, Jul 31, 2017 at 01:33:45PM -0700, Martin DeMello ]----
> I have a project that depends on two other libraries, both pinned to
> local git repos in opam. However I find it quite annoying to have to
> run opam update && opam install every time I make a change in the
> libraries, especially when I'm making small changes to all three
> projects at the same time. Is there any smoother workflow that people
> use?

You do not have to; "opam upgrade $name_of_the_lib" is all that should
be required.  that's how I work and it's ok, but I do not change those
lib very often anyway.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-03 11:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-31 20:33 [Caml-list] how do you develop multiple dependent projects simultaneously? Martin DeMello
2017-07-31 20:41 ` Nicolás Ojeda Bär
2017-07-31 20:43 ` David Allsopp
2017-08-01  9:19 ` Gerd Stolpmann
2017-08-03 11:52 ` rixed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).