From 72bd460f2999c95ddef043e2a08b6a10c4d36579 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Mon, 10 Jun 2024 17:46:59 +0300 Subject: [PATCH 1/6] chore(tooling): Update Git ignore list with current artifacts --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2b95ffaa9..bc04e5075 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,6 @@ build-aux/ltversion.m4 build-aux/lt~obsolete.m4 build-aux/missing build-aux/list-dist-files.sh -build-aux/rust_boilerplate.mk tests/regressions.pl # Other autojunk @@ -81,6 +80,7 @@ gource.webm *.rockspec .fonts/* .sources/* +sile-x86_64 sile sile.1 sile-lua @@ -99,6 +99,7 @@ core/pathsetup.lua src/embed.rs src/embed-includes.rs src/sile-entry.sh +*.asc # Nix symlink to builds result From e573c2d2026f5d194bfb0f0ea67f21d3728fafcb Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 11 Jun 2024 00:36:28 +0300 Subject: [PATCH 2/6] fix(core): Allow LUA_PATH env var to take effect at runtime --- core/pathsetup.lua.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/pathsetup.lua.in b/core/pathsetup.lua.in index 57f2e278f..1ab7268a8 100644 --- a/core/pathsetup.lua.in +++ b/core/pathsetup.lua.in @@ -4,6 +4,18 @@ if "@LUA_PATH@" ~= "" then package.cpath = "@LUA_CPATH@" end +-- In the event the user has exported Lua environment variables, use them like a system Lua VM would. This essentially +-- nukes the existing runtime path and uses only the new value. This is useful for using `eval $(luarocks --local path)` +-- or similar incantations that setup a path that will reach 3rd party modules. +local env_lua_path = os.getenv("LUA_PATH") +if env_lua_path then + package.path = env_lua_path +end +local env_lua_cpath = os.getenv("LUA_CPATH") +if env_lua_cpath then + package.cpath = env_lua_cpath +end + local executable = debug.getinfo(3, "S").source local luaversion = _VERSION:match("%d+%.%d+") From b88c1d17b94e8457c885ea7ba5074322a04fdfe6 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 11 Jun 2024 00:36:28 +0300 Subject: [PATCH 3/6] refactor(core): Use autoconf var that doesn't conflate an env var --- configure.ac | 12 ++++++------ core/pathsetup.lua.in | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 4e1bc9bf0..4107e4cf6 100644 --- a/configure.ac +++ b/configure.ac @@ -263,13 +263,13 @@ AC_SUBST([SILE_PATH]) # In order for our Rust CLI binary to use the same default package.path as the system Lua, # we test the system Lua (required only at build not run time) for its current package.path. -adl_RECURSIVE_EVAL(["$(${LUA} -e 'print(package.path)')"], [LUA_PATH]) -AC_DEFINE_UNQUOTED([LUA_PATH], ["${LUA_PATH}"],[System Lua package path]) -AC_SUBST([LUA_PATH]) +adl_RECURSIVE_EVAL(["$(${LUA} -e 'print(package.path)')"], [SYSTEM_LUA_PATH]) +AC_DEFINE_UNQUOTED([SYSTEM_LUA_PATH], ["${SYSTEM_LUA_PATH}"],[System Lua package path]) +AC_SUBST([SYSTEM_LUA_PATH]) -adl_RECURSIVE_EVAL(["$(${LUA} -e 'print(package.cpath)')"], [LUA_CPATH]) -AC_DEFINE_UNQUOTED([LUA_CPATH], ["${LUA_CPATH}"], [System Lua package cpath]) -AC_SUBST([LUA_CPATH]) +adl_RECURSIVE_EVAL(["$(${LUA} -e 'print(package.cpath)')"], [SYSTEM_LUA_CPATH]) +AC_DEFINE_UNQUOTED([SYSTEM_LUA_CPATH], ["${SYSTEM_LUA_CPATH}"], [System Lua package cpath]) +AC_SUBST([SYSTEM_LUA_CPATH]) adl_RECURSIVE_EVAL(["${libdir}/${TRANSFORMED_PACKAGE_NAME}"], [SILE_LIB_PATH]) AC_DEFINE_UNQUOTED([SILE_LIB_PATH],["${SILE_LIB_PATH}"], [Path for SILE libraries]) diff --git a/core/pathsetup.lua.in b/core/pathsetup.lua.in index 1ab7268a8..e84d032cb 100644 --- a/core/pathsetup.lua.in +++ b/core/pathsetup.lua.in @@ -1,7 +1,7 @@ --- Allow autoconf to setup system lua paths at compile time, not run time (only used in developer mode) -if "@LUA_PATH@" ~= "" then - package.path = "@LUA_PATH@" - package.cpath = "@LUA_CPATH@" +-- Allow autoconf to setup system lua paths at compile time, not run time (only used in developer mode). +if "@SYSTEM_LUA_PATH@" ~= "" then + package.path = "@SYSTEM_LUA_PATH@" + package.cpath = "@SYSTEM_LUA_CPATH@" end -- In the event the user has exported Lua environment variables, use them like a system Lua VM would. This essentially From c7d1f38553c9f45b8e1525b5e6ce018a5c0aa080 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 11 Jun 2024 01:03:09 +0300 Subject: [PATCH 4/6] refactor(core): Avoid duplicate Lua modules path --- core/pathsetup.lua.in | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/pathsetup.lua.in b/core/pathsetup.lua.in index e84d032cb..71d180ea1 100644 --- a/core/pathsetup.lua.in +++ b/core/pathsetup.lua.in @@ -109,19 +109,18 @@ end -- Add the current working directory, presumably a local project, as one of the highest priority paths. local executable_dir = executable:gsub("(.*)(/.*)", "%1") -if executable_dir:match("^@") then - -- Running from a nix flake reports this, but we don't want anything special to get added. - extendPaths(".") -else + +-- Running from a nix flake reports this, but we don't want anything special to get added. +if not executable_dir:match("^@") then -- If executable_dir is just an alternate name of PWD, we don't need to duplicate it. -- Also ignore Rust binary thinking its executable_dir is in its source directory. if executable_dir ~= "./" and executable_dir ~= "src" then extendPaths(executable_dir) end - extendPathsRocks("./lua_modules") - extendPaths(".") end +extendPaths(".") + -- Stuff internal utility features into the global namespace so they could be manipulated externally (undocumented). _G.extendSilePath = extendPaths _G.extendSilePathRocks = extendPathsRocks From e24c273db0e357d051ccb14906be612bfd9aa5f1 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 11 Jun 2024 01:51:08 +0300 Subject: [PATCH 5/6] chore(deps): Bump pinned versions of patch level crate updates --- Cargo.lock | 293 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 271 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 391b89247..eeaf9147e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -171,9 +171,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.5.6" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9689a29b593160de5bc4aacab7b5d54fb52231de70122626c178e6a368994c7" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" dependencies = [ "clap_builder", "clap_derive", @@ -181,9 +181,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.6" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5387378c84f6faa26890ebf9f0a92989f8873d4d380467bcd0d8d8620424df" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" dependencies = [ "anstream", "anstyle", @@ -340,6 +340,17 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "dunce" version = "1.0.4" @@ -999,14 +1010,134 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", + "smallvec", + "utf8_iter", ] [[package]] @@ -1042,6 +1173,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -1282,9 +1419,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", @@ -1294,9 +1431,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -1305,9 +1442,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "roff" @@ -1492,6 +1629,12 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" version = "0.11.1" @@ -1519,6 +1662,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "tempfile" version = "3.10.1" @@ -1594,6 +1748,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -1615,12 +1779,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-bom" version = "2.0.3" @@ -1644,15 +1802,27 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -1864,3 +2034,82 @@ name = "winsafe" version = "0.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "synstructure", +] + +[[package]] +name = "zerovec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] From 6404c537a68e9f3c77fc5f70f1a8b912e2c75708 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 11 Jun 2024 01:52:15 +0300 Subject: [PATCH 6/6] chore(release): 0.15.3 --- CHANGELOG.md | 7 +++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- action.yml | 2 +- package.json | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53e0b9e0f..87a63ca1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [0.15.3](https://github.com/sile-typesetter/sile/compare/v0.15.2...v0.15.3) (2024-06-10) + + +### Bug Fixes + +* **core:** Allow LUA_PATH env var to take effect at runtime ([e573c2d](https://github.com/sile-typesetter/sile/commit/e573c2d2026f5d194bfb0f0ea67f21d3728fafcb)) + ## [0.15.2](https://github.com/sile-typesetter/sile/compare/v0.15.1...v0.15.2) (2024-06-10) diff --git a/Cargo.lock b/Cargo.lock index eeaf9147e..010c317c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1611,7 +1611,7 @@ dependencies = [ [[package]] name = "sile" -version = "0.15.2" +version = "0.15.3" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 356c96286..089786c2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sile" -version = "0.15.2" +version = "0.15.3" edition = "2021" rust-version = "1.71.0" description = "Simon’s Improved Layout Engine" diff --git a/action.yml b/action.yml index 1e42d3f4d..69d77a808 100644 --- a/action.yml +++ b/action.yml @@ -7,7 +7,7 @@ inputs: default: "" runs: using: docker - image: docker://ghcr.io/sile-typesetter/sile:v0.15.2 + image: docker://ghcr.io/sile-typesetter/sile:v0.15.3 entrypoint: sh args: - -c diff --git a/package.json b/package.json index 725d41dd9..84d3d5d42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sile", - "version": "0.15.2", + "version": "0.15.3", "description": "The SILE Typesetter", "main": "sile", "scripts": {