Can't refer to internal library with ~style:`Basic #51

Closed
copy opened this Issue Jan 7, 2017 · 1 comment

Projects

None yet

2 participants

@copy
copy commented Jan 7, 2017

Here's a minimal test case:

(* myocamlbuild *)
open Solvuu_build.Std

let lib = Project.lib "test_lib"
    ~dir:"lib"
    ~style:`Basic
    ~pkg:"test_lib"

let app = Project.app
    ~internal_deps:[lib]
    ~file:"app/app.ml"
    "test_app"

let () = Project.basic1 ~project_name:"test" ~version:"dev" [lib; app]
(* app/app.ml *)
print_int Mylib.foo
(* lib/mylib.ml *)
let foo = 5

Getting the following error:

ocamlbuild -use-ocamlfind -plugin-tag "package(solvuu-build)" app/test_app.byte
Finished, 0 targets (0 cached) in 00:00:00.
+ ocamlfind ocamlc -I . -o app/test_app.byte -package '' -linkpkg ./test_lib.cma app/app.ml
File "app/app.ml", line 1, characters 10-19:
Error: Unbound module Mylib
Command exited with code 2.
Compilation unsuccessful after building 3 targets (2 cached) in 00:00:00.
make: *** [_build/project.mk:4: _build/app/test_app.byte] Error 10

When using ~style:`Pack it works. It's also possibly to refer to Mylib from other packages when it is installed, just not internally.

@agarwal agarwal added the bug label Jan 7, 2017
@agarwal
Member
agarwal commented Jan 7, 2017

Fix in a4c96cf. Thanks for reporting.

@agarwal agarwal closed this Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment