mdb 'query' doesn't know about --use-subdirs
Opened this issue · 0 comments
jrfondren commented
As a consequence, if you build an app with --make, you can't easily include and test modules that it uses:
$ mdb ./test
Melbourne Mercury Debugger, mdb version DEV.
Copyright 1998-2012 The University of Melbourne.
Copyright 2013-2019 The Mercury team.
mdb is free software; there is absolutely no warranty for mdb.
1: 1 1 CALL pred test.main/2-0 (det) test.m:8
mdb> query
?- [weapons].
:- import_module weapons.
?- advantaged(sword, spear).
mercury_compile: cannot find `weapons.int' in directories .,
/usr/local/mercury-DEV/lib/mercury/ints
Compilation error(s) occurred.
?- ^D
mdb> ^Dmdb: are you sure you want to quit? y
Without moving .int files in the current directory:
$ mv Mercury/ints/weapons.int .
$ mdb ./test
Melbourne Mercury Debugger, mdb version DEV.
Copyright 1998-2012 The University of Melbourne.
Copyright 2013-2019 The Mercury team.
mdb is free software; there is absolutely no warranty for mdb.
1: 1 1 CALL pred test.main/2-0 (det) test.m:8
mdb> query
?- [weapons].
:- import_module weapons.
?- advantaged(sword, spear).
<stdin>:001: Inferred :- pred query(mdb_query.inputs).
fail.
No (more) solutions.
?- advantaged(sword, dagger).
<stdin>:001: Inferred :- pred query(mdb_query.inputs).
true ;
fail.
No (more) solutions.
?- ^D
How about just always adding "./Mercury/ints" to the paths that mdb is looking for?
The closest thing I see to an existing solution is setting MERCURY_STDLIB_DIR to ./Mercury, but that won't find all the installed or stdlib modules that a project likely depends on.