File: DEVEL.md

package info (click to toggle)
ocaml-topkg 1.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 836 kB
  • sloc: ml: 7,232; makefile: 9
file content (39 lines) | stat: -rw-r--r-- 1,302 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Package structure
-----------------

This repo is the base of two opam packages:

- `topkg`, with opam file [topkg.opam](topkg.opam)
- `topkg-care` with opam file [topkg-care.opam](topkg-care.opam)

Both share the same [pkg/pkg.ml](pkg/pkg.ml) file. `topkg` simply
builds the `Topkg` library and `topkg-care` builds the `Topkg_care`
library and the `topkg` command line tool. The distinction is made in
the `pkg.ml` file based on the package name passed to the build
instructions.

The reason for this structure is that while both `Topkg` and `Topkg_care`
could be distributed together and `Topkg_care` be simply build
depending on optional dependencies being present, this would have a
fatal flaw: `topkg` cannot be used for any of `Topkg_care`'s
dependencies. Since we want to use `topkg` for these dependencies
aswell, this structure allows to cut the dependency cycle that would
occur.

So if you want to develop `topkg` you should do a:

```
opam pin add -kgit topkg topkg#master
opam pin add -kgit topkg-care topkg#master
```

Changing the Topkg API
----------------------

Is a *very* delicate thing to do as it could break packages. Here's an
invocation that can be used to reinstall packages that build depend on
`topkg`:

```
opam reinstall $(opam list -s --installed --depends-on topkg)
```