Skip to content
Browse files

[fix] compiler, database: Load default engine for path in default dat…

…abase
  • Loading branch information...
1 parent 1b6a197 commit 7d7736adb54ab16cd4f7a99eaf59adfccccac01a @BourgerieQuentin BourgerieQuentin committed May 31, 2012
Showing with 8 additions and 3 deletions.
  1. +8 −3 opa/pass_DbEngineImportation.ml
View
11 opa/pass_DbEngineImportation.ml
@@ -62,6 +62,7 @@ let import_packages engines =
let process_code ~stdlib code =
if stdlib then
+ let default_engine = QmlDbGen.get_engine () in
let engines =
match QmlDbGen.Args.get_engine () with
| None -> []
@@ -91,11 +92,15 @@ let process_code ~stdlib code =
in
let engines =
match dbdecl with
- | None -> engines (* Case if default database *)
+ | None ->
+ (* Case if default database *)
+ if StringSet.is_empty padecl then engines
+ else default_engine :: engines
| Some dbdecl ->
if StringSet.is_empty (StringSet.diff padecl dbdecl) then engines
- else `db3 :: engines (* Some path are not included in a database,
- load default engine. *)
+ else default_engine :: engines
+ (* Some path are not included in a database,
+ load default engine. *)
in
let engines = List.uniq_unsorted engines in
r := engines

0 comments on commit 7d7736a

Please sign in to comment.
Something went wrong with that request. Please try again.