Ah.  A little more detail (maybe I'm on the way to debugging ... but really new to this code):

I find that the problem appears to be in the _tags file.  Relevant section reproduced below:

# Executable foo_test
"foo_test.native": pkg_bitcoin
"foo_test.native": pkg_str
"foo_test.native": use_foolib
<*.ml{,i,y}>: pkg_bitcoin
<*.ml{,i,y}>: pkg_str
<*.ml{,i,y}>: use_foolib
# OASIS_STOP

the lines with "<*.ml{,i,y}>" and pkg_bitcoin, use_foolib are produced when the Executable is uncommented.  And if I comment out those two lines, I get the expected (it seems to me, correct) behaviour (which is that when building foo.ml, "-package bitcoin" should not be applied.

--chet--


On Fri, Apr 15, 2016 at 12:12 PM, Chet Murthy <murthy.chet@gmail.com> wrote:

Hi, I think I've found an oasis bug.

(*) ocaml 4.02.3
(*) oasis 0.4.5

==========================================

In the attached little tarball, there's an _oasis file.  In that file, there's a library, "foolib", and an executable "foo_test".

(1) foo_test depends on "bitcoin"; "foolib" does not

(2) building the project with "foo_test" commented-out ends up -not- depending on "bitcoin" anywhere

(3) with "foo_test" uncommented,the build of "foolib"'s modules (foo.ml) has "-package bitcoin".

In short, it appears that the deps of foo_test are leaking to foolib, even though foolib doesn't depend on foo_test (it's the other way around).

Hope this is clear.

Cheers,
--chet--