Skip to content

Support exhibitfiles to set files that need to be "exhibited" in the current workspace; fix a typo#417

Open
myhsia wants to merge 10 commits into
latex3:mainfrom
myhsia:main
Open

Support exhibitfiles to set files that need to be "exhibited" in the current workspace; fix a typo#417
myhsia wants to merge 10 commits into
latex3:mainfrom
myhsia:main

Conversation

@myhsia

@myhsia myhsia commented May 24, 2025

Copy link
Copy Markdown

Support exhibitfiles to set files that need to be "exhibited" in the current workspace

Some users merge a README.md file, for example, into a *.dtx file.
Once they change the markdown file, they should modify the source *.dtx file.

But l3build won't move the generated (unpacked) markdown file to the main directory (corresponding to currentdir in l3build-variables), and users usually need to keep the markdown file (or other files) in the main directory so that it can be displayed on the GitHub repository homepage.

So, a variable exhibitfiles is added: after unpack is executed, the enumerated text files will be copied from unpackdir to currentdir; and certainly, these exhibitfiles will be cleaned after l3build clean.

Fix a typo

In l3build.dtx, line 2249: \loggingoutput is misspelled in the macro environment.

myhsia added 4 commits May 25, 2025 03:02
- Support `exhibitfiles` to set files that need to be "exhibited" in the current workspace
Comment thread l3build.dtx Outdated
Comment thread l3build-unpack.lua Outdated
end
end
for _,i in ipairs(exhibitfiles) do
cp(i, unpackdir, currentdir)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this assume currentdir is maindir, which may often not be the case?

@cfr42

cfr42 commented Jul 20, 2025

Copy link
Copy Markdown
Contributor

I think this would be better accommodated by implementing existing requests for additional hooks e.g. unpackinit_hook().

@myhsia

myhsia commented Nov 15, 2025

Copy link
Copy Markdown
Author

I think this would be better accommodated by implementing existing requests for additional hooks e.g. unpackinit_hook().

Actually, in order to handle this problem, I used a "trick"

function docinit_hook()
  cp(ctanreadme, unpackdir, currentdir)
  return 0
end

in some of my packages. The docinit_hook actually also works, but I think it would be better to provide a more friendly interface for users.

@myhsia

myhsia commented Nov 15, 2025

Copy link
Copy Markdown
Author

Anyone to review it? @davidcarlisle @josephwright @cfr42

@myhsia myhsia requested a review from cfr42 December 23, 2025 13:07
@cfr42

cfr42 commented Dec 24, 2025

Copy link
Copy Markdown
Contributor

you move the files into maindir but remove them from currentdir.

but I am not sure sure l3build should be removing files outside the build directory and I am not sure how this is supposed to work when you have multiple projects in subdirectories of a single repo or, say, bundles. (but I'm a bit unclear re. the concept of a bundle.)

since ctan want to have the readme at the top level, I'm not quite seeing how it makes sense to have it in a .dtx. don't you then effectively have to always distribute two copies?

@cfr42

cfr42 commented Dec 24, 2025

Copy link
Copy Markdown
Contributor

but you need to ask the maintainers to consider this rather than me ;).

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