Compare commits

...

1 Commits

Author SHA1 Message Date
Kim Morrison
583ce45040 fix: improve "no library suggestions engine registered" error message
This PR improves the error message when no library suggestions engine
is registered to recommend importing `Lean.LibrarySuggestions.Default`
for the built-in engine.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 11:09:19 +11:00
2 changed files with 3 additions and 4 deletions

View File

@@ -403,9 +403,8 @@ opaque getSelector : MetaM (Option Selector)
def select (m : MVarId) (c : Config := {}) : MetaM (Array Suggestion) := do
let some selector getSelector |
throwError "No library suggestions engine registered. \
(Note that Lean does not provide a default library suggestions engine, \
these must be provided by a downstream library, \
and configured using `set_library_suggestions`.)"
(Add `import Lean.LibrarySuggestions.Default` to use Lean's built-in engine, \
or use `set_library_suggestions` to configure a custom one.)"
selector m c
/-!

View File

@@ -1,7 +1,7 @@
import Lean.LibrarySuggestions.Basic
/--
error: No library suggestions engine registered. (Note that Lean does not provide a default library suggestions engine, these must be provided by a downstream library, and configured using `set_library_suggestions`.)
error: No library suggestions engine registered. (Add `import Lean.LibrarySuggestions.Default` to use Lean's built-in engine, or use `set_library_suggestions` to configure a custom one.)
-/
#guard_msgs in
example : True := by