From e01383da05d5cf03d080854ac048df37df4d1b9a Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 1 Sep 2025 15:11:52 -0400 Subject: Change module install directory to PREFIX/lib/tomo_vX.Y/* --- src/typecheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/typecheck.c') diff --git a/src/typecheck.c b/src/typecheck.c index 07970bd9..adb267df 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -186,8 +186,8 @@ static env_t *load_module(env_t *env, ast_t *module_ast) { module_info_t mod = get_module_info(module_ast); glob_t tm_files; const char *folder = mod.version ? String(mod.name, "_", mod.version) : mod.name; - if (glob(String(TOMO_PREFIX "/share/tomo_" TOMO_VERSION "/installed/", folder, "/[!._0-9]*.tm"), GLOB_TILDE, - NULL, &tm_files) + if (glob(String(TOMO_PREFIX "/lib/tomo_" TOMO_VERSION "/", folder, "/[!._0-9]*.tm"), GLOB_TILDE, NULL, + &tm_files) != 0) { if (!try_install_module(mod)) code_err(module_ast, "Couldn't find or install library: ", folder); } -- cgit v1.2.3 From ed50c5fefb8892ad2ba5262491669f268ddbd436 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 1 Sep 2025 16:44:58 -0400 Subject: Overhaul code to stop keeping examples and libraries in the same repo, but instead spin each out into its own repo. --- src/typecheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/typecheck.c') diff --git a/src/typecheck.c b/src/typecheck.c index adb267df..80c270ef 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -189,7 +189,7 @@ static env_t *load_module(env_t *env, ast_t *module_ast) { if (glob(String(TOMO_PREFIX "/lib/tomo_" TOMO_VERSION "/", folder, "/[!._0-9]*.tm"), GLOB_TILDE, NULL, &tm_files) != 0) { - if (!try_install_module(mod)) code_err(module_ast, "Couldn't find or install library: ", folder); + if (!try_install_module(mod, true)) code_err(module_ast, "Couldn't find or install library: ", folder); } env_t *module_env = fresh_scope(env); -- cgit v1.2.3 From 081a26de86eca95ba3ee0887992cdc3d96190cce Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 1 Sep 2025 17:32:42 -0400 Subject: Fixes for local-tomo so that it *actually* uses local header files, which don't need to be installed anymore. --- src/typecheck.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/typecheck.c') diff --git a/src/typecheck.c b/src/typecheck.c index 80c270ef..5ce0baec 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -186,8 +186,7 @@ static env_t *load_module(env_t *env, ast_t *module_ast) { module_info_t mod = get_module_info(module_ast); glob_t tm_files; const char *folder = mod.version ? String(mod.name, "_", mod.version) : mod.name; - if (glob(String(TOMO_PREFIX "/lib/tomo_" TOMO_VERSION "/", folder, "/[!._0-9]*.tm"), GLOB_TILDE, NULL, - &tm_files) + if (glob(String(TOMO_PATH, "/lib/tomo_" TOMO_VERSION "/", folder, "/[!._0-9]*.tm"), GLOB_TILDE, NULL, &tm_files) != 0) { if (!try_install_module(mod, true)) code_err(module_ast, "Couldn't find or install library: ", folder); } -- cgit v1.2.3