Closed gucci-on-fleek closed 11 months ago
This mailing list thread suggests that you can use the
$TEXMFAUXTREES
variable instead,
I don't think that this is an option. I would not like it at all if l3build would overwrite my texmfauxtrees settings. And using tlmgr conf auxtrees
would be too slow.
l3build
modifies the$TEXMFCNF
variable, which makes ConTeXt tests break completely.
l3build could probably add some option which suppresses the setting. But as I commented in the thread, it is imho more a context problem. As far as I know context doesn't use kpathsea anymore so it is not quite clear why they make use of a kpathsea variable and break if it is changed. I stopped to use TEXMFCNF years ago as every careless call to context to test something resulted in havoc.
As far as I know context doesn't use kpathsea anymore
The ConTeXt formats (luametatex
, luatex
) don't use kpathsea
, but the I believe that the context
executable (texlua
) still does. I could be completely wrong here though.
it is not quite clear why they make use of a kpathsea variable and break if it is changed
There's this comment in the code:
but I can't say that I understand it at all. There's also this:
but its suggestion of copying contextcnf.lua
and texmfcnf.lua
doesn't actually work.
I did manage to find a way to get l3build
to run ConTeXt and to successfully pass it a texmf
tree to search:
diff --git a/regression-test.old b/regression-test.tex
index 0a1ef5f..e2db047 100755
--- a/regression-test.old
+++ b/regression-test.tex
@@ -292,7 +292,15 @@
\fi
\fi
\fi
+
+\ifdefined\startluacode
+ \startluacode
+ local hashes = resolvers.gethashes()
+ hashes[#hashes + 1] = {cache = false, type = "file", name = os.getenv("EXTRATEXMF")}
+ resolvers.generators.file({filename = os.getenv("EXTRATEXMF")})
+ \stopluacode
+\fi
\reset@catcodes
diff --git a/l3build-check.old b/l3build-check.lua
index f016c25..d267f1c 100755
--- a/l3build-check.old
+++ b/l3build-check.lua
@@ -747,8 +747,16 @@ function runtest(name, engine, hide, ext, test_type, breakout)
local function setup(file)
return " -jobname=" .. name .. tokens .. ' "\\input ' .. file .. '" '
end
+ local texmfcnf
if match(checkformat,"^context$") then
function setup(file) return tokens .. ' "' .. file .. '" ' end
+ -- Only works for a `localtexmf()` that has a single path
+ texmfcnf = os_setenv .. " EXTRATEXMF=" .. localtexmf():gsub(";", ""):gsub("//", "/")
+ .. os_concat
+ else
+ -- Allow for local texmf files
+ texmfcnf = os_setenv .. " TEXMFCNF=." .. os_pathsep
+ .. os_concat
end
local basename = testdir .. "/" .. name
local gen_file = basename .. test_type.generated
@@ -781,9 +789,7 @@ function runtest(name, engine, hide, ext, test_type, breakout)
-- Avoid spurious output from (u)pTeX
os_setenv .. " GUESS_INPUT_KANJI_ENCODING=0"
.. os_concat ..
- -- Allow for local texmf files
- os_setenv .. " TEXMFCNF=." .. os_pathsep
- .. os_concat ..
+ texmfcnf ..
set_epoch_cmd(epoch, forcecheckepoch) ..
-- Ensure lines are of a known length
os_setenv .. " max_print_line=" .. maxprintline
This patch is fairly awful though; it seems to work, but it's also really ugly and fragile. Another solution that also works is setting $TEXMFHOME
, which is likely easier. Let me know if you want me to clean this up into a proper PR.
I've committed a partial fix: this simply avoids setting TEXMCNF
for ConTeXt at all. If you could test, that would be great. (I also want to address LuaTeX vs LuaMetaTeX - coming up.)
@josephwright
I've committed a partial fix: this simply avoids setting TEXMCNF for ConTeXt at all. If you could test, that would be great
I had been using a similar patch for just over a year and it worked great. I've just installed 2023-07-17 and my standard l3build config now works with ConTeXt, so I believe that this issue is resolved.
(I also want to address LuaTeX vs LuaMetaTeX - coming up.)
I've been using l3build to test MkIV+MkXL for almost a year and a half now, and my earlier patch was all that I needed to make it work. If you're curious, you can look at my l3build config at https://github.com/gucci-on-fleek/lua-widow-control, but the way I'm using l3build is very idiosyncratic.
I've had a pretty good experience with using l3build to test ConTeXt. My only complaint is that it's quite annoying to set up testing if you need to support 4 different formats like I do. Although I'm probably just doing something wrong.
Anyways, thanks for the fix!
I've committed a partial fix: this simply avoids setting TEXMCNF for ConTeXt at all. If you could test, that would be great
I had been using a similar patch for just over a year and it worked great. I've just installed 2023-07-17 and my standard l3build config now works with ConTeXt, so I believe that this issue is resolved.
Indeed, but leaves open the question of what happens when you need non-standard settings.
(I also want to address LuaTeX vs LuaMetaTeX - coming up.)
I've been using l3build to test MkIV+MkXL for almost a year and a half now, and my earlier patch was all that I needed to make it work.
I was thinking of the GitHub Actions side of things: something is not quite right.
l3build
modifies the$TEXMFCNF
variable, which makes ConTeXt tests break completely. Commenting out these lines:https://github.com/latex3/l3build/blob/fb53b22f1eb2f69ded2f129540a9ee8e9344537a/l3build-check.lua#L794-L796
allows ConTeXt to run, although this causes
tdsdirs
to be ignored. This issue is present in both ConTeXt LMTX/MkXL and MkIV.This mailing list thread suggests that you can use the
$TEXMFAUXTREES
variable instead, although I have not tried this.Setup
I'm currently running TL 2021,
l3build
2022-03-15, and ConTeXt MkXL2022.04.20 19:18
on Windows 10 x86_64.Files
Create these files to test:
build.lua
context.lvt
context.tlg
Unmodified
l3build
Saving
Testing
Patched
l3build
Saving
Testing