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

Refine error mesasage "attempt to index a nil value" #303

Closed
koppor opened this issue Jul 16, 2023 · 4 comments
Closed

Refine error mesasage "attempt to index a nil value" #303

koppor opened this issue Jul 16, 2023 · 4 comments
Assignees
Labels

Comments

@koppor
Copy link
Contributor

koppor commented Jul 16, 2023

I am a newcomer to l3build. Wanted to "quickly" create a GitHub actions based CI environment for tagpdf. However, I cannot get l3build check working on the repository. The output is "attempt to index a nil value".

Is it possible to output a more informative error message?

$ l3build check
Running l3build with target "check" with configuration build
C:/MiKTeX/scripts/l3build/l3build-unpack.lua:87: attempt to index a nil value
Running l3build with target "check" with configuration config-pdftex
C:/MiKTeX/scripts/l3build/l3build-unpack.lua:87: attempt to index a nil value
Running l3build with target "check" with configuration config-luatex
C:/MiKTeX/scripts/l3build/l3build-unpack.lua:87: attempt to index a nil value
Failed tests for configuration build:

  Check failed with difference files

Failed tests for configuration config-pdftex:

  Check failed with difference files

Failed tests for configuration config-luatex:

  Check failed with difference files

The respective part of l3build-unpack.lua looks like follows in my MiKTeX installation?

      local success = io.popen(
        "cd " .. unpackdir .. "/" .. path .. os_concat ..
        os_setenv .. " TEXINPUTS=." .. os_pathsep
          .. localdir .. (unpacksearch and os_pathsep or "") ..
        os_concat  ..
        os_setenv .. " LUAINPUTS=." .. os_pathsep
          .. localdir .. (unpacksearch and os_pathsep or "") ..
        os_concat ..
        unpackexe .. " " .. unpackopts .. " " .. name
          .. (options["quiet"] and (" > " .. os_null) or ""),
        "w"
      ):write(string.rep("y\n", 300)):close()
@josephwright
Copy link
Member

@koppor Ah, MiKTeX :) @u-fischer mentioned that we should look at this again (basically, it doesn't work as MiKTeX doesn't return the same info as TeX Live). I promised I'd look at her issue on my way back, so I'll add this to the immediate list.

@josephwright josephwright self-assigned this Jul 16, 2023
This was referenced Jul 16, 2023
@josephwright josephwright added invalid and removed bug labels Jul 16, 2023
@josephwright
Copy link
Member

It's not out fault :) You can minimise to

--[[

% !TeX program = texlua

--]]

-- io.popen("echo","w"):write(""):close() -- Works
-- io.popen("echo","w"):write("")         -- Works
io.popen("echo","w"):write("y"):close()

which as I've commented works if you don't have any content to the write or don't close the stream, but if you have both content and closing. Do you want to report against MiKTeX or should I?

@josephwright
Copy link
Member

Note that if you bypass the issue in a locally-edited l3build, running the tests for l3build itself

texlua .\l3build.lua check -epdftex -cbuild

shows two other problems. First, for some reason not all of the tests are picked up. Second, the allowed variation if glue setting pops up. Thus, TeX Live on Windows gives

  00-test-1 (1/2)
  01-expect-1 (2/2)

  All checks passed

but MiKTeX gives

Running checks on
  00-test-1 (1/1)
          --> failed

An example line that changes (TeX Live first):

...\hbox(6.94444+0.83333)x469.75499, glue set 427.75536fil
...\hbox(6.94444+0.83333)x469.75499, glue set 427.75537fil

@josephwright
Copy link
Member

I've reported to MiKTeX: I think we can't really do anything here as it's not an l3build bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants