[latex3-commits] [latex3/l3build] drop-force: Drop switch --force|-f (b489934)
github at latex-project.org
github at latex-project.org
Thu Jan 18 09:03:49 CET 2024
Repository : https://github.com/latex3/l3build
On branch : drop-force
Link : https://github.com/latex3/l3build/commit/b489934d92c99d646fa46b65df69f5a431c61f87
>---------------------------------------------------------------
commit b489934d92c99d646fa46b65df69f5a431c61f87
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Jan 18 07:52:36 2024 +0000
Drop switch --force|-f
Unknown engines are then skipped with a message,
rather than leading to an error.
>---------------------------------------------------------------
b489934d92c99d646fa46b65df69f5a431c61f87
CHANGELOG.md | 4 ++++
l3build-arguments.lua | 28 ----------------------------
l3build-check.lua | 13 ++++++++++++-
l3build.1 | 2 --
l3build.dtx | 4 ----
l3build.lua | 7 +------
6 files changed, 17 insertions(+), 41 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 54cb731..c98ec71 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,10 @@ this project uses date-based 'snapshot' version identifiers.
### Added
- Switch `-s|--stdengine` to run a set of tests only with the standard engine
even where this varies between configs (issue \#343)
+
+### Removed
+- Switch `--force|-f`
+
## [2024-01-09]
### Fixed
diff --git a/l3build-arguments.lua b/l3build-arguments.lua
index 36a2aa9..2dae719 100644
--- a/l3build-arguments.lua
+++ b/l3build-arguments.lua
@@ -89,12 +89,6 @@ option_list =
desc = "Name of first test to run",
type = "string"
},
- force =
- {
- desc = "Forces tests to run, even if engine is not set up",
- short = "f",
- type = "boolean"
- },
full =
{
desc = "Installs all files",
@@ -295,25 +289,3 @@ local function argparse()
end
options = argparse()
-
--- Sanity check
-function check_engines(config)
- if options["engine"] and not options["force"] then
- -- Make a lookup table
- local t = { }
- for _, engine in pairs(checkengines) do
- t[engine] = true
- end
- for _, engine in pairs(options["engine"]) do
- if not t[engine] then
- print("\n! Error: Engine \"" .. engine .. "\" not set up for testing with configuration \"" .. config .. "\"!")
- print("\n Valid values are:")
- for _, engine in ipairs(checkengines) do
- print(" - " .. engine)
- end
- print("")
- exit(1)
- end
- end
- end
-end
diff --git a/l3build-check.lua b/l3build-check.lua
index 78e74c0..36926de 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -598,7 +598,18 @@ function runcheck(name, hide)
if options["stdengine"] then
checkengines = {stdengine}
elseif options["engine"] then
- checkengines = options["engine"]
+ local t = {}
+ for _,engine in ipairs(checkengines) do
+ t[engine] = true
+ end
+ checkengines = {}
+ for _,engine in ipairs(options["engine"]) do
+ if t[engine] then
+ insert(checkengines,engine)
+ else
+ print("Skipping unknown engine " .. engine)
+ end
+ end
end
local failedengines = {}
-- Used for both .lvt and .pvt tests
diff --git a/l3build.1 b/l3build.1
index 48c12d7..f111b5d 100644
--- a/l3build.1
+++ b/l3build.1
@@ -55,8 +55,6 @@ Sets the epoch for tests and typesetting
Takes the upload announcement from the given file
.IP --first
Name of first test to run
-.IP --force|-f
-Force tests to run if engine is not set up
.IP --full
Installs all files
.IP --halt-on-error|-H
diff --git a/l3build.dtx b/l3build.dtx
index 9c16d99..5d2ffbd 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -379,9 +379,6 @@
% \item |--epoch| Sets the epoch for typesetting and testing
% \item |--file| (|-F|) Takes the upload announcement from the given file
% \item |--first| Name of the first test to run
-% \item |--force| (|-f|) Forces checks to run even if sanity
-% checks fail, \emph{e.g.}~when |--engine| is not given in
-% \var{checkengines}
% \item |--full| Instructs the \texttt{install} target to include the
% \texttt{doc} and \texttt{source} trees
% \item |--halt-on-error| (|-H|) Specifies that checks
@@ -1676,7 +1673,6 @@
% \var{epoch} & String \\
% \var{file} & string \\
% \var{first} & Boolean \\
-% \var{force} & Boolean \\
% \var{full} & Boolean \\
% \var{halt-on-error} & Boolean \\
% \var{help} & Boolean \\
diff --git a/l3build.lua b/l3build.lua
index 8b0dcbd..7a31c85 100644
--- a/l3build.lua
+++ b/l3build.lua
@@ -208,17 +208,12 @@ if #checkconfigs > 1 then
end
if #checkconfigs == 1 and
(options["target"] == "check" or options["target"] == "save" or options["target"] == "clean") then
- if checkconfigs[1] == "build" then
- -- Sanity check for default config
- check_engines("build.lua")
- else
+ if not checkconfigs[1] == "build" then
local configname = gsub(checkconfigs[1], "%.lua$", "")
local config = "./" .. configname .. ".lua"
if fileexists(config) then
local savedtestfiledir = testfiledir
dofile(config)
- -- Sanity check for non-default config
- check_engines(configname .. ".lua")
testdir = testdir .. "-" .. configname
-- Reset testsuppdir if required
if savedtestfiledir ~= testfiledir and
More information about the latex3-commits
mailing list.