Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mdb 'query' doesn't know about --use-subdirs #73

Open
jrfondren opened this issue Aug 31, 2019 · 0 comments
Open

mdb 'query' doesn't know about --use-subdirs #73

jrfondren opened this issue Aug 31, 2019 · 0 comments

Comments

@jrfondren
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant