Conversation
|
How do you pull in |
|
there aren't dependencies depending on optional dependencies, see also ocaml/opam#2074 |
Actually scratch that, this is wrong. I need to think of a better solution. |
|
while this is not nice and clean, I thought the |
|
So now if |
253d17e to
6ccf220
Compare
|
@samoht Yes, well, I prefer no features to features that mostly work in practice :) (actually, it might have really worked, but the proof is really unclear) Note, to be fair, that we can have conjunctions in depopts again. I removed them, because I was not sure it was really useful and changing the semantics of something that was already used seemed like a bad idea. Actually, not even removed: only forbid in 1.2 (please don't declare packages with opam-version 1.1 just to use it though ! ;)) The effect of a conjunction would be to ignore recompilations of packages in it if it's only partially verified. Now I'm not sure I understand the whole of the use-case :) |
The cat's out of the box now.
This library either depends on two packages, the core xen and the xen entropy provider, or none of those (and it doesn't build the xen support). Level 1 would be to discover them as a pair and somehow signal to the configure script that both are present, or hide the other one if either is missing. Level 2 is to detect that xen is installed and add the dependency to entropy, as opposed to not using it until the user installs both. That would be ideal. |
|
Ok. Level 1: For the configure script, you can use the syntax Level 2: the problem is in the detection -- since mirage-xen can be pulled in the same command as your lib, this would need to be encoded to the solver. That could become problematic, too: imagine if for some reason mirage-entropy-xen cannot be installed, then the library could only be installed if you don't have mirage-xen. The error would be difficult to explain to the user, too. |
|
@AltGr I was joking, I know that my hack my unsafe in the presence of version constraints and so removing it was the good move. The problem we have here is to decide who will pull in the |
|
@AltGr Level 1 solution looks very nice, as it will at least prevent builds from breaking. Will add, thank you. |
Goes with this.