Add command to register/refresh newly-added ASDF systems at runtime

Open
#2,203 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Domain
tooling

Research direction

Read the lisp-mode command definitions and the source-registry initialization used by Qlot, then review PR #2189 for the behavior it changed. Decide how to rerun the active registry configuration without replacing Qlot’s settings and whether the command targets the self connection or any connection. Done means a command makes newly added ASDF systems discoverable at runtime; the issue names no test to run.

Written by the indexing model from the issue text.

Description

Summary

There is currently no way to make a newly-added ASDF system discoverable from a running Lem instance. Lem's source registry is populated at build time (by Qlot) and is never refreshed at runtime.

This came up in #2189. While investigating that PR I verified the following ASDF behavior (SBCL 2.5.10):

Action New .asd (added at runtime) discovered?
nothing (warm cache) no
asdf:clear-source-registry no
asdf:clear-configuration no
asdf:initialize-source-registry (re-supply parameter) yes

So asdf:clear-source-registry does not rescan disk for new .asd files — it only clears the cache, and the next lazy lookup rebuilds the same stale directory listing. Only a fresh asdf:initialize-source-registry (or ql:register-local-projects) forces a re-scan.

This means that today, to load a system dropped into a project at runtime, a user has to manually evaluate something like (asdf:initialize-source-registry ...) / (ql:register-local-projects) in the REPL.

Proposal

Add a lisp-mode command (e.g. lisp-register-local-projects / lisp-refresh-asdf-systems) that re-initializes the source registry so newly-added systems become discoverable from the self REPL without manual incantations.

Considerations:

  • Should respect the Qlot environment (do not clobber Qlot's source-registry parameter — see #2189).
  • Likely just re-runs the same initialize-source-registry configuration that was active, rather than a clear-source-registry.
  • Decide whether it operates on the self connection only or any connection.

Context

  • PR #2189 removed the ineffective clear-source-registry / build-time initialize-source-registry calls. This issue tracks the follow-up enhancement to provide an explicit, working refresh mechanism.
Dominant language
Common Lisp
Stars
3.1k
Forks
261
Avg merge
1d 6h
Merged PRs (30d)
133

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lem-project/lem

All issues in lem-project/lem

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.