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

Request: add support for grovel-locally #9

Open
Sod-Almighty opened this issue Mar 23, 2021 · 1 comment
Open

Request: add support for grovel-locally #9

Sod-Almighty opened this issue Mar 23, 2021 · 1 comment

Comments

@Sod-Almighty
Copy link

Sod-Almighty commented Mar 23, 2021

Every time I run my project,¹ it takes a few minutes for this library to grovel the same .c and .h files.

Given that these files are unlikely to change between executions, strikes me that we could just cache the grovel results, saving considerable time during development.

To this end, I modified my local copy of libusb-ffi.asd as follows:

  :depends-on (#:cffi #:grovel-locally #:static-vectors)
  :components ((:file "package")
         (:caching-grovel-file "libusb-grovel" :cache-dir "cache")
         (:file "libusb-ffi")))

It would be helpful if you could modify your library to support this. The problem, of course, would be to implement some mechanism for selectively choosing (when loading via quicklisp) between "normal" grovelling and cached grovelling.

Some ideas that might work:

  • Have the .asd file query the contents of the *features* special variable² (which the programmer presumably alters beforehand).
  • Somehow (defconstant ...) something before (ql:quickload)ing the library.
  • Have two different .asd files.

Alternatively, if I download this repo and place it in its own directory in my project, can I ignore the .asd file and (load) it myself in some way, but using caching-grovel instead of grovel?


¹ Specifically pkcmd-lx. I'm the dev ;)

² e.g. using the sharp-plus notation: #+cached-grovelling

@Sod-Almighty
Copy link
Author

Bump

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