0

In the package inferred system, you can specify a dependency on a package of the form "a/b/c" where a is the package name and there is a lisp file at "b/c.lisp" that defines the "a/b/c" package.

Is there a way to specify a different path for the file for the package inferred system? For example say the file is at "src/b/c.lisp" instead of "b/c.lisp".

Thayne
  • 6,619
  • 2
  • 42
  • 67
  • I am not certain that I understand your question as you seem to mix system and package. (package -> `cl:defpackage` vs. system -> `asdf:defsystem`). But it seems like you want to include a dependency on a system (thus another project). I find it easiest to use ASDF in combination with quicklisp for this purpose (by setting a symlink in the local-projects folder) https://www.quicklisp.org/beta/faq.html – Sim Aug 10 '15 at 12:45
  • I am talking about package-inferred systems. A feature added in ASDF 3, where rather than using file components, each file has its own package, and ASDF automatically creates a system for each package whose name is the downcase of the package. And it finds the file for the package based on the system name. See https://common-lisp.net/project/asdf/asdf/The-package_002dinferred_002dsystem-extension.html – Thayne Aug 10 '15 at 16:24

2 Answers2

1

You can use register-system-packages to specify which packages a system provides. You can read more here

PuercoPop
  • 6,707
  • 4
  • 30
  • 40
  • How does that work for systems that are inferred from packages? If I have `(register-system-package "proj/src/foo" :foo)` does that create a system "proj/src/foo" for the package foo when I am using package inferred systems? – Thayne Aug 10 '15 at 16:25
  • No, it loads system proj/src/foo when you use foo. Although proj/src/foo is most likely not a system but a file – PuercoPop Aug 10 '15 at 16:53
1

It's probably a bug that package-inferred-system uses system-source-directory instead of component-pathname. If you think it is, please file a bug against https://bugs.launchpad.net/asdf

Unhappily, bug or not, any fix isn't going to be released then made universal for a while. So at least for the next two years, you can't rely on it unless you provide your own fixed ASDF.

As for a workaround — why not place your .asd file in src/ if you want all source under there???

Faré
  • 952
  • 5
  • 4
  • This is not a proper forum for ASDF issues. The asdf-devel mailing-list is. At least, if you expect timely answer by an expert. – Faré Aug 16 '15 at 00:11