pub-import the modules a unit's interface holds by value

sexc now checks that importers can see every type a pub form holds,
and asks for pub where the type comes from another import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 18:05:08 +03:00
parent a3a68df048
commit 28f0e8acac
10 changed files with 22 additions and 22 deletions

View File

@@ -17,12 +17,12 @@
(import noise) (import noise)
(import shape) (import shape)
(import json) (import json)
(import worldgen) (pub import worldgen)
(import fastnoise) (import fastnoise)
(import rivers) (pub import rivers)
(import terra) (import terra)
(import strata) (import strata)
(import ores) (pub import ores)
;;; MINERAL is the mineral whose reading is wanted, or -1. ;;; MINERAL is the mineral whose reading is wanted, or -1.
(pub record hover-query ((x int) (z int) (mode int) (value int) (mineral int))) (pub record hover-query ((x int) (z int) (mode int) (value int) (mineral int)))

View File

@@ -25,11 +25,11 @@
;; dependency order. ;; dependency order.
(import cs) (import cs)
(import maps) (import maps)
(import lcg) (pub import lcg)
(import noise) (import noise)
(import shape) (import shape)
(import json) (import json)
(import worldgen) (pub import worldgen)
(import fastnoise) (import fastnoise)
(import rivers) (import rivers)
(import terra) (import terra)

View File

@@ -14,12 +14,12 @@
;; the types its interface needs; until then, every dependency, in ;; the types its interface needs; until then, every dependency, in
;; dependency order. ;; dependency order.
(import maps) (import maps)
(import lcg) (pub import lcg)
(import noise) (import noise)
(import shape) (import shape)
(import json) (import json)
(import worldgen) (import worldgen)
(import fastnoise) (pub import fastnoise)
(pub record river-config (pub record river-config
((min-fork-angle int) (fork-variation int) (normal-angle int) ((min-fork-angle int) (fork-variation int) (normal-angle int)

View File

@@ -19,9 +19,9 @@
(import noise) (import noise)
(import shape) (import shape)
(import json) (import json)
(import worldgen) (pub import worldgen)
(import fastnoise) (import fastnoise)
(import rivers) (pub import rivers)
(import terra) (import terra)
(import strata) (import strata)
(import ores) (import ores)

View File

@@ -13,7 +13,7 @@
(import noise) (import noise)
(import shape) (import shape)
(import save) (import save)
(import worldgen) (pub import worldgen)
;;; Settings plus the seed as the user would type it. ;;; Settings plus the seed as the user would type it.
(pub record world-source ((settings world-settings) (seed-text [char 128]))) (pub record world-source ((settings world-settings) (seed-text [char 128])))

View File

@@ -13,7 +13,7 @@
;; TODO sex#58: import only the modules used here once an import brings ;; TODO sex#58: import only the modules used here once an import brings
;; the types its interface needs; until then, every dependency, in ;; the types its interface needs; until then, every dependency, in
;; dependency order. ;; dependency order.
(import maps) (pub import maps)
(import lcg) (import lcg)
(import noise) (import noise)
(import shape) (import shape)
@@ -21,7 +21,7 @@
(import worldgen) (import worldgen)
(import fastnoise) (import fastnoise)
(import rivers) (import rivers)
(import terra) (pub import terra)
(pub define MAX-ROCKS 32) (pub define MAX-ROCKS 32)
;;; A column entry below any rock: the mantle at y = 0. ;;; A column entry below any rock: the mantle at y = 0.

View File

@@ -13,14 +13,14 @@
;; TODO sex#58: import only the modules used here once an import brings ;; TODO sex#58: import only the modules used here once an import brings
;; the types its interface needs; until then, every dependency, in ;; the types its interface needs; until then, every dependency, in
;; dependency order. ;; dependency order.
(import maps) (pub import maps)
(import lcg) (import lcg)
(import noise) (import noise)
(import shape) (import shape)
(import json) (import json)
(import worldgen) (pub import worldgen)
(import fastnoise) (pub import fastnoise)
(import rivers) (pub import rivers)
;;; NewSimplexNoiseLayer -------------------------------------------- ;;; NewSimplexNoiseLayer --------------------------------------------

View File

@@ -20,10 +20,10 @@
(import maps) (import maps)
(import lcg) (import lcg)
(import noise) (import noise)
(import shape) (pub import shape)
(import worldgen) (pub import worldgen)
(import fastnoise) (import fastnoise)
(import rivers) (pub import rivers)
(import terra) (import terra)
(import strata) (import strata)
(import ores) (import ores)

View File

@@ -14,7 +14,7 @@
(import save) (import save)
(import worldgen) (import worldgen)
(import fastnoise) (import fastnoise)
(import rivers) (pub import rivers)
(import terra) (import terra)
(import strata) (import strata)
(import ores) (import ores)

View File

@@ -5,10 +5,10 @@
(include stdio.h stdlib.h string.h math.h) (include stdio.h stdlib.h string.h math.h)
(import maps) (import maps)
(import lcg) (pub import lcg)
(import noise) (import noise)
(import json) (import json)
(import shape) (pub import shape)
(pub define MAX-PROVINCES 32) (pub define MAX-PROVINCES 32)