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

Changing lvtext in non-default configs does not work #403

Open
muzimuzhi opened this issue Nov 22, 2024 · 2 comments
Open

Changing lvtext in non-default configs does not work #403

muzimuzhi opened this issue Nov 22, 2024 · 2 comments

Comments

@muzimuzhi
Copy link
Contributor

muzimuzhi commented Nov 22, 2024

If lvtext is only changed in a non-default config (for example, lvtext = ".tex"), then the new lvtext is never used when checking with config.

Use this repository as an example,

  1. add lvtext = ".tex" to config-plain.lua and an empty test.tex to ./testfiles-plain
  2. run either l3build check -q or l3build check -cconfig-plain -q and see test.tex is not checked, and the *.lvt tests in ./testfiles-plain are still being checked.
$ l3build check -q -cconfig-plain
Running checks on
  plain-pdftex (1/1)
(guessed encoding #3: ASCII = utf8)(guessed encoding #5: ASCII = utf8)(guessed encoding #6: ASCII = utf8)

The cause is, the values of lvtext and other ...ext variables are stored in and in latter uses retrieved from table test_types, which is only set once in l3build-variables.lua, and not updated after a non-default config is loaded by l3build.lua (see line 227 in l3build.lua snippet below, dofile(config)).

test_types = test_types or { }
test_types.log = test_types.log or {
test = lvtext,
generated = logext,
reference = tlgext,
expectation = lveext,
compare = compare_tlg,
rewrite = rewrite_log,
}
test_types.pdf = test_types.pdf or {
test = pvtext,
generated = pdfext,
reference = tpfext,
rewrite = rewrite_pdf,
}

l3build/l3build.lua

Lines 225 to 229 in f757458

if fileexists(config) then
local savedtestfiledir = testfiledir
dofile(config)
-- Sanity check for non-default config
check_engines(configname .. ".lua")

@muzimuzhi
Copy link
Contributor Author

If lvtext is only changed in a non-default config (for example, lvtext = ".tex"), then the new lvtext is never used when checking with config.

Just in case, is this valid usage?

I switched to this kind of setting in muzimuzhi/tabularray-dev@5290480. The lvtext = ".tex" set for a specific config was inherited from https://github.com/lvjr/tabularray, and I decided to use the default .lvt extension in new set(s) of tests and keep old settings for inherited set of tests.

muzimuzhi added a commit to muzimuzhi/tabularray-dev that referenced this issue Nov 22, 2024
5290480 (test: restrict `lvtext = ".tex"` to config-old, 2024-11-21)
silenced config-old tests, due to a l3build problem latex3/l3build#403.

Work around that issue.
@josephwright
Copy link
Member

Ah, that's a bit tricky - it used to work before we split the different types of test; I wonder if we should make it work again or change the docs here?

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

No branches or pull requests

2 participants