[latex3-commits] [git/LaTeX3-latex3-l3build] master, standalone: Rename options["files"] to options["names"] (1bf0dc0)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Mar 6 09:50:38 CET 2018


Repository : https://github.com/latex3/l3build
On branches: master,standalone
Link       : https://github.com/latex3/l3build/commit/1bf0dc06e6db49c9018e36788543b39d534ea08e

>---------------------------------------------------------------

commit 1bf0dc06e6db49c9018e36788543b39d534ea08e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Mar 6 08:50:38 2018 +0000

    Rename options["files"] to options["names"]
    
    This is a 'breaking' change (though likely no impact).
    
    Reasoning: we want the list of 'files' for a few things,
    including upcoming tagging. It's not really a list of
    files: they could be various things.


>---------------------------------------------------------------

1bf0dc06e6db49c9018e36788543b39d534ea08e
 l3build-arguments.lua |   16 ++++++++--------
 l3build-stdmain.lua   |    4 ++--
 l3build.dtx           |    2 +-
 l3build.lua           |    4 ++--
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/l3build-arguments.lua b/l3build-arguments.lua
index b1d5b44..78eb542 100644
--- a/l3build-arguments.lua
+++ b/l3build-arguments.lua
@@ -122,7 +122,7 @@ option_list =
 -- termination (break)
 local function argparse()
   local result = { }
-  local files  = { }
+  local names  = { }
   local long_options =  { }
   local short_options = { }
   -- Turn long/short options into two lookup tables
@@ -150,11 +150,11 @@ local function argparse()
   end
   -- An auxiliary to grab all file names into a table
   local function remainder(num)
-    local files = { }
+    local names = { }
     for i = num, #arg do
-      table.insert(files, arg[i])
+      table.insert(names, arg[i])
     end
-    return files
+    return names
   end
   -- Examine all other arguments
   -- Use a while loop rather than for as this makes it easier
@@ -164,7 +164,7 @@ local function argparse()
     local a = arg[i]
     -- Terminate search for options
     if a == "--" then
-      files = remainder(i + 1)
+      names = remainder(i + 1)
       break
     end
     -- Look for optionals
@@ -232,12 +232,12 @@ local function argparse()
       i = i + 1
     end
     if not opt then
-      files = remainder(i)
+      names = remainder(i)
       break
     end
   end
-  if next(files) then
-   result["files"] = files
+  if next(names) then
+   result["names"] = names
   end
   return result
 end
diff --git a/l3build-stdmain.lua b/l3build-stdmain.lua
index 200afa9..d6d59f1 100644
--- a/l3build-stdmain.lua
+++ b/l3build-stdmain.lua
@@ -46,7 +46,7 @@ end
 -- The overall main function
 --
 
-function stdmain(target, files)
+function stdmain(target, names)
   local errorlevel
   -- If the module name is empty, the script is running in a bundle:
   -- apart from ctan all of the targets are then just mappings
@@ -90,7 +90,7 @@ function stdmain(target, files)
     elseif target == "bundlectan" then
       errorlevel = bundlectan()
     elseif target == "doc" then
-      errorlevel = doc(files)
+      errorlevel = doc(names)
     elseif target == "check" then
       errorlevel = check(files)
     elseif target == "clean" then
diff --git a/l3build.dtx b/l3build.dtx
index ae5b926..71896a7 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -1252,10 +1252,10 @@
 %     \midrule
 %       \var{date}        & String  \\
 %       \var{engine}      & Table   \\
-%       \var{files}       & Table   \\
 %       \var{force}       & Boolean \\
 %       \var{halt}        & Boolean \\
 %       \var{help}        & Boolean \\
+%       \var{names}       & Table   \\
 %       \var{pdf}         & Boolean \\
 %       \var{quiet}       & Boolean \\
 %       \var{rerun}       & Boolean \\
diff --git a/l3build.lua b/l3build.lua
index 0c3433c..6d18918 100644
--- a/l3build.lua
+++ b/l3build.lua
@@ -71,7 +71,7 @@ main = main or stdmain
  
 -- When we have specific files to deal with, only use explicit configs
 -- (or just the std one)
-if options["files"] then
+if options["names"] then
   checkconfigs = options["config"] or {stdconfig}
 else 
   checkconfigs = options["config"] or checkconfigs
@@ -103,4 +103,4 @@ if #checkconfigs == 1 and
 end
 
 -- Call the main function
-main(options["target"], options["files"])
+main(options["target"], options["names"])





More information about the latex3-commits mailing list