0

And if so, is there way that asdf can import a symbol that is calculated in runtime.

I'm trying to to specify the directory on which the project resides so the test runner can find the input files and also when I run from the repl.

PuercoPop
  • 6,707
  • 4
  • 30
  • 40

2 Answers2

2

Yes, system-relative-pathname and system-source-directory are your friends. At least if you execute from source.

Faré
  • 952
  • 5
  • 4
1

It depends on what you mean by "execution".

If your code is executed when your file is loaded, take a look at Variable *LOAD-PATHNAME*, *LOAD-TRUENAME*.

If you need the current working directory, asdf has getcwd and chdir.

sds
  • 58,617
  • 29
  • 161
  • 278
  • Not the current working directory but the directory on which the .asd file resides – PuercoPop Jun 06 '13 at 21:02
  • Well I found a way around it with the asdf:system-relative-pathname i.e. (asdf:system-relative-pathname :nclack-tests "specs") – PuercoPop Jun 06 '13 at 22:51