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

Throw warnings on unknown doc name(s) #329

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.

## [Unreleased]

### Changed
- Throw warnings on unknown doc name(s)

## [2023-12-15]

### Fixed
Expand Down
13 changes: 13 additions & 0 deletions l3build-typesetting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ function doc(files)
local errorlevel = docinit()
if errorlevel ~= 0 then return errorlevel end
local done = {}
local files_unknown = {}
if files and next(files) then
for _, file in pairs(files) do
files_unknown[file] = true
end
end
for _,typesetfiles in ipairs({typesetdemofiles,typesetfiles}) do
for _,glob in pairs(typesetfiles) do
local destpath,globstub = splitpath(glob)
Expand All @@ -198,6 +204,7 @@ function doc(files)
typeset = false
for _,file in pairs(files) do
if name == file then
files_unknown[file] = nil
typeset = true
break
end
Expand All @@ -219,5 +226,11 @@ function doc(files)
end
end
end
if next(files_unknown) then
for file, _ in pairs(files_unknown) do
print("Unknown doc name \"" .. file .. "\"")
end
return 1
end
return 0
end