-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: |options| and some functions #355
Conversation
% variable settings \emph{or} additional code to customize the build | ||
% process. | ||
% | ||
%The example scripts given in Section~\vref{sec:examples} largely cover the required knowledge in Lua programing. | ||
% For a more advanced usage, one may consult general Lua documentations including \url{https://www.lua.org/manual/5.3/manual.html} and for the few |texlua| specific additions see section 4.2 of the \LuaTeX{} manual available locally with |texdoc luatex| command line or at \url{https://www.pragma-ade.com/general/manuals/luatex.pdf}. | ||
% Note that |os.execute| is at version 5.1, which is undocumented there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow the need for this - LuaTeX includes Lua 5.3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for os.execute
that is not at version 5.3 but 5.1.
See https://tug.org/pipermail/luatex/2015-November/005536.htm
l3build.dtx
Outdated
@@ -368,15 +369,15 @@ | |||
% | |||
% As well as these targets, the system recognises the options | |||
% \begin{itemize} | |||
% \item |--config| (|-c|) Configuration(s) to use for testing | |||
% \item |--config| (|-c|) Comma or space separated list of configurations to use for testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comma/space business is simply standard command line rules based on --XXX
or -X
options - I don't see that we need to mention this specifically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is standard for people who know the standard. The cost of the precision is epsilon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean though that this applies to every command line tool one might use, more or less - e.g. git
docs don't say this sort of thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, it's not comma-or-space, it's just comma - spaces are used to separate arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not what is implemented.
l3build check -e "foo bar"
this needs clarification either in the implementation of in the documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is there to support the --<long>[=]<option>
syntax in addition to the -<short><option>
- you can quickly test that --long option option2
treats option2
as a value not an option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really,
--<long>=<option>
is managed at line 228--<long> <option>
is managed at line 253--<short><option>
is managed at line 237
id est before line 270. This line is just there to split<option>
into a list. The separator is anything that contains a comma or a space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a while ago .. I will check :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking back, I used ,%s
since I added argparse
-like syntax at all - I guess just an oversight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've sorted this - just commas count here
l3build.dtx
Outdated
% \var{config} & Table \\ | ||
% \var{date} & String \\ | ||
% \var{dirty} & Boolean \\ | ||
% \var{dry-run} & Boolean \\ | ||
% \var{email} & String \\ | ||
% \var{engine} & Table \\ | ||
% \var{epoch} & String \\ | ||
% \var{config} & table \\ | ||
% \var{date} & string \\ | ||
% \var{dirty} & boolean \\ | ||
% \var{dry-run} & boolean \\ | ||
% \var{email} & string \\ | ||
% \var{engine} & table \\ | ||
% \var{epoch} & string \\ | ||
% \var{file} & string \\ | ||
% \var{first} & Boolean \\ | ||
% \var{full} & Boolean \\ | ||
% \var{halt-on-error} & Boolean \\ | ||
% \var{help} & Boolean \\ | ||
% \var{first} & boolean \\ | ||
% \var{full} & boolean \\ | ||
% \var{halt-on-error} & boolean \\ | ||
% \var{help} & boolean \\ | ||
% \var{message} & string \\ | ||
% \var{names} & Table \\ | ||
% \var{quiet} & Boolean \\ | ||
% \var{rerun} & Boolean \\ | ||
% \var{shuffle} & Boolean \\ | ||
% \var{stdengine} & Boolean \\ | ||
% \var{texmfhome} & String \\ | ||
% \var{names} & table \\ | ||
% \var{quiet} & boolean \\ | ||
% \var{rerun} & boolean \\ | ||
% \var{shuffle} & boolean \\ | ||
% \var{stdengine} & boolean \\ | ||
% \var{texmfhome} & string \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are deliberately capitalised as the cell starts a statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the type cannot really be capitalized because it refers to 2 things
- the output of the lua function
type
- section 5.6 "Each entry needs a type one of boolean, string or table.
So these are not words, these are case sensitive keywords that cannot be capitalized.
In fact they should be formatted as in section 5.6: I'll commit a change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this section 5.6 still useful?
% The Lua tables mentionned here are in fact arrays of strings. | ||
% From the |build.lua| file, one can modify the string and boolean values, | ||
% add or remove entries in arrays. But it is not recommended to affect a | ||
% whole new Lua table to |options| nor to its array entries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I',m not sure what you are getting at: options
is set by l3build <options>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, options is not a read only variable. It is set by l3buil-arguments
before build.lua
is executed and modified afterwards. Nothing prevents people from saying
options={...}
or
options.engine = {...}
in build.lua
or config-....lua
. This is an open door to insidious bugs.
@@ -1887,32 +1893,32 @@ | |||
% | |||
% \subsection{Components of \texttt{l3build}} | |||
% | |||
% Next functions return $0$ on a successful completion, a non $0$ error code otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what this is referring to here in 'next'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functions documented in the section?
I do not really understand the title of the section, as compared to the following section.
Last commit: In the documentation of |call|, there was
Not |target| field was exposed in the |options| table. |
I think it would be useful if you could split the PR into ones that deal with just one section/concept each - some are easy to agree to, others as we've seen more open ... |
documentation improvements: consistency and precision consistent wording in ...aux.lua *fmt in .gitignore
The |target| entry of options was not exposed in the documentation of |options| but mentioned in the documentation of the |call| function.
documentation improvements: consistency and precision consistent wording in ...aux.lua
*fmt in .gitignore