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

gitmeta.tex not found #153

Open
mcdittmar opened this issue Mar 13, 2025 · 13 comments
Open

gitmeta.tex not found #153

mcdittmar opened this issue Mar 13, 2025 · 13 comments

Comments

@mcdittmar
Copy link
Contributor

I was just working to install the workflows into the HighEnergyObsCoreExt repository and encountered a problem with this file.

First, the repo is looking at the most recent ivoatex (commit d772edd), pretty sure anyway.
The build was failing at \include gitmeta.tex because it couldn't find it.
It does generate fine when building on the command line.

It looks like the file is supposed to be auto-generated during the build (rather than included in the repository).

I've added a \IfFileExists clause around the input line, so it doesn't cause a problem for the build, but I'd prefer it works.

Let me know what simple detail I've missed!
Mark

@msdemlei
Copy link
Collaborator

msdemlei commented Mar 14, 2025 via email

@mcdittmar
Copy link
Contributor Author

Very shortly, the fix is to have

SOURCES = $(DOCNAME).tex gitmeta.tex

That's why this is baffling me, our Makefile has that (line 22).
The gitmeta.tex file is generated and the info is in the PDF when run on the command line, but not in the Git workflow.

@msdemlei
Copy link
Collaborator

msdemlei commented Mar 14, 2025 via email

@mcdittmar
Copy link
Contributor Author

container. Could you see if

make update-ci
git push

fixes the problem? I'd sure hope it does :-)

I executed this, but have not pushed it.
The command replaces the .github/workflow/[build|preview].yml files.
The only differences are:

  • doc_name: field is blank
  • on:push:branches: = master rather than main. This repository uses 'main'

Both of these are necessary changes to make before committing.
BTW: the instruction block which comes up from the command says nothing about updating the doc_name field before doing the commit & push.. it probably should.. right? The branch name depends on the repository.

@msdemlei
Copy link
Collaborator

msdemlei commented Mar 14, 2025 via email

@mcdittmar
Copy link
Contributor Author

That will certainly not fix it. Can I call in @gmantelet? He knows
a lot more about the CI integration than I do.

I wonder if this might be involved:
The workflow runs 'make biblio ${{ env.doc_name }}-draft.pdf'

  • the biblio thread does not include gitmeta.tex in the dependency path
    • biblio: ${DOCNAME}.bbl
    • ${DOCNAME}.bbl: ${DOCNAME}.tex ivoatex/ivoabib.bib ivoatexmeta.tex

So that thread would do the build without gitmeta.tex getting made.
The biblio step creates the ${DOCNAME}.pdf so maybe that isn't getting regenerated during the ${{ env.doc_name}}-draft.pdf phase.

That might be fixed if the .bbl step used ${SOURCES} ?
I'm not to sure what the biblio thread does exactly, but I'd guess we'd want it to scan all the source files (though probably not the gitmeta.tex since it will definitely not have any citations

@mcdittmar
Copy link
Contributor Author

So that thread would do the build without gitmeta.tex getting made. The biblio step creates the ${DOCNAME}.pdf so maybe that isn't getting regenerated during the ${{ env.doc_name}}-draft.pdf phase.

That might be fixed if the .bbl step used ${SOURCES} ? I'm not to sure what the biblio thread does exactly, but I'd guess we'd want it to scan all the source files (though probably not the gitmeta.tex since it will definitely not have any citations

On my command line, it does rebuild it, but the workflow log has:

latexmk -pdf HighEnergyObsCoreExt
Rc files read:
  /etc/LatexMk
Latexmk: This is Latexmk, John Collins, 31 Jan. 2024. Version 4.83.
Latexmk: Nothing to do for 'HighEnergyObsCoreExt.tex'.
Latexmk: All targets (HighEnergyObsCoreExt.pdf) are up-to-date

pdflatex ivoatex/draft-background.tex

@gmantele
Copy link
Collaborator

The problem seems to come from the fact that the rule gitmeta.tex is never called either in ivoatex/Makefile or in the CI actions.
I tried to add an explicit call to this rule in the preview action (in preview.yml) in my fork:

run: make gitmeta.tex biblio ${{ env.doc_name }}-draft.pdf

It seems to work.

However, @msdemlei may have a cleaner solution to solve this. It is strange that this rule is never called anywhere in the ivoatex/Makefile, except when it is added inside SOURCES in the document's Makefile. Or should it be called only from the CI?

@gmantele
Copy link
Collaborator

The difference between the build CI and the preview CI is that the first one runs a simple make while the second runs make biblio ${{ env.doc_name }}-draft.pdf. make will run everything inside SOURCES which is not the case of the preview CI. Maybe we should add SOURCES among the tasks to run in the preview CI. What do you think @msdemlei ?

@msdemlei
Copy link
Collaborator

msdemlei commented Mar 20, 2025 via email

@gmantele
Copy link
Collaborator

You seem to have a perfectly clear idea on how to do that. So, if ok with you, I let you do it.

msdemlei added a commit that referenced this issue Mar 20, 2025
…luded.

Also, the preview doesn't need make biblio any more.

This should fix bug #153.
@msdemlei
Copy link
Collaborator

msdemlei commented Mar 20, 2025 via email

msdemlei added a commit that referenced this issue Mar 21, 2025
…luded.

Also, the preview doesn't need make biblio any more.

This should fix bug #153.
@msdemlei
Copy link
Collaborator

msdemlei commented Mar 21, 2025

@mcdittmar, could you see if things are fixed now?

You'll have to update both ivoatex and the ci, so you would run

make update
make update-ci

(don't worry about the question whether to remove the CI, just say yes).

Oh, and if it works, would you close this bug?

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

3 participants