look for an import beside the file it is written in

Imports were looked for from the unit's directory, so a module in a
subdirectory could not import its neighbours: a pub import failed, a
private one lost its handle declarations, and --public-interface changed
with where sexc ran.
This commit is contained in:
2026-10-16 13:55:45 +03:00
parent 4f69b6e2d6
commit 8203d79495
7 changed files with 88 additions and 38 deletions

View File

@@ -0,0 +1,8 @@
;;; Its imports are found beside it, wherever the unit importing it is
(pub import page)
(import spine)
(pub record book ((spine (* spine)) (first page)))
(pub fn second-page ((b (* const book))) page
(return (page-after (. b first))))