Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Conversation

jlaurens
Copy link
Contributor

documentation improvements: consistency and precision consistent wording in ...aux.lua
*fmt in .gitignore

% 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.
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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 :)

Copy link
Member

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

Copy link
Member

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
Comment on lines 1672 to 1692
% \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 \\
Copy link
Member

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

Copy link
Contributor Author

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

  1. the output of the lua function type
  2. 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.

Copy link
Contributor Author

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?

Comment on lines +1696 to +1701
% 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.
Copy link
Member

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>

Copy link
Contributor Author

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.
Copy link
Member

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'

Copy link
Contributor Author

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.

@jlaurens
Copy link
Contributor Author

Last commit: In the documentation of |call|, there was

The ⟨options⟩ table should take the same form as the global ⟨options⟩, described above.[...].
Note that any entry for the |target| in this table is ignored.

Not |target| field was exposed in the |options| table.

josephwright added a commit that referenced this pull request Jun 27, 2024
@josephwright
Copy link
Member

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 ...

jlaurens added 3 commits June 27, 2024 13:32
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants