Hint actual Jerboa Qt API source path

ober

f5d0db9e7ef504b4a467ff1d3b505f259be56bef

diff --git a/src/jcode/core/verified-run.ss b/src/jcode/core/verified-run.ss
index 8531e0a..327271f 100644
--- a/src/jcode/core/verified-run.ss
+++ b/src/jcode/core/verified-run.ss
@@ -3759,6 +3759,21 @@
     "; showing list(path=\".\") instead. Choose a concrete file for the next inspection.\n"
     listing))
 
+(def (jerboa-qt-api-path-hint path cwd)
+  (and (string-suffix? "jerboa-qt.ss" path)
+       (let* ((parent (path-directory path))
+              (candidate
+                (if (and parent (not (string=? parent "")))
+                  (string-append parent "/jerboa-qt/qt.sls")
+                  "jerboa-qt/qt.sls")))
+         (and (file-exists? (abs-path cwd candidate))
+              (string-append
+                "\nJerboa Qt API path hint: read "
+                candidate
+                " for `(jerboa-qt qt)` exports; do not retry "
+                path
+                ".")))))
+
 (def (missing-file-observation path cwd)
   (let* ((parent (path-directory path))
          (listing (and parent
@@ -3772,7 +3787,8 @@
         (string-append
           "\nNearby entries in " parent ":\n" listing
           "\nChoose the exact existing filename; do not guess another suffix.")
-        ""))))
+        "")
+      (or (jerboa-qt-api-path-hint path cwd) ""))))
 
 (def (do-read-current args cwd)
   (let ((path (arg-path args #f)))
diff --git a/test/run.ss b/test/run.ss
index 940582e..116ed77 100644
--- a/test/run.ss
+++ b/test/run.ss
@@ -5501,12 +5501,20 @@
        [root "/tmp/jcode-verified-read-root"]
        [external-file (string-append root "/api.ss")]
        [large-file (string-append root "/large-api.sls")]
+       [lib-dir (string-append root "/lib")]
+       [qt-lib-dir (string-append root "/lib/jerboa-qt")]
+       [qt-api-file (string-append qt-lib-dir "/qt.sls")]
        [old-read-roots (getenv "JCODE_READ_ROOTS")])
   (ensure-test-directory! cwd)
   (ensure-test-directory! root)
+  (ensure-test-directory! lib-dir)
+  (ensure-test-directory! qt-lib-dir)
   (write-test-output-file external-file
     (lambda (o) (display "(def qt-api-shape 'ok)\n" o))
     'replace)
+  (write-test-output-file qt-api-file
+    (lambda (o) (display "(library (jerboa-qt qt))\n" o))
+    'replace)
   (write-test-output-file large-file
     (lambda (o)
       (let loop ([line 1])
@@ -5539,6 +5547,13 @@
             (and (str-contains? s "file does not exist")
                  (str-contains? s "Nearby entries")
                  (str-contains? s "api.ss"))))
+        (check-pred! "verified-run: missing jerboa-qt source redirects to qt.sls"
+          (read-tool
+            (list (cons "path" (string-append root "/lib/jerboa-qt.ss"))))
+          (lambda (s)
+            (and (str-contains? s "file does not exist")
+                 (str-contains? s "Jerboa Qt API path hint")
+                 (str-contains? s "/lib/jerboa-qt/qt.sls"))))
         (check-pred! "verified-run: unbounded external read is capped"
           (read-tool (list (cons "path" large-file)))
           (lambda (s)