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

Site generate for collection should not generate component PDFs twice #209

Open
ronaldtse opened this issue Nov 7, 2022 · 3 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

The si-brochure-en.pdf and si-brochure-fr.pdf files are compiled twice when using metanorma site generate, once under site/documents and once under site/brochure.

This needs to be fixed. (cc @abunashir)

Originally posted by @ronaldtse in #186 (comment)

@ronaldtse ronaldtse added the bug Something isn't working label Nov 7, 2022
@ronaldtse ronaldtse moved this to 🆕 New in Metanorma Nov 7, 2022
@ronaldtse ronaldtse moved this from 🆕 New to 🌋 Urgent in Metanorma Nov 7, 2022
@ronaldtse
Copy link
Contributor Author

Here's the full log. You can clearly see the duplicated commands:

[info]: Compiling /Users/me/src/mn/bipm-si-brochure/sources/si-brochure-en.adoc ...
...
java -Xss5m -Xmx2048m -Dapple.awt.UIElement=true -jar /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/mn2pdf-1.50/lib/../bin/mn2pdf.jar --xml-file "/Users/me/src/mn/bipm-si-brochure/site/documents/si-brochure-en.presentation.xml" --xsl-file "/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/metanorma-bipm-7a70de29bfeb/lib/isodoc/bipm/bipm.brochure.xsl" --pdf-file "/Users/me/src/mn/bipm-si-brochure/site/documents/si-brochure-en.pdf" --param baseassetpath="/Users/me/src/mn/bipm-si-brochure/sources" --syntax-highlight  --font-manifest "/var/folders/2t/xmdrn2sd2lv2w49dv0zw9_q00000gp/T/fontist_locations20221107-22882-33x4gf.yml"
...

[info]: Compiling /Users/me/src/mn/bipm-si-brochure/sources/si-brochure-fr.adoc ...
...
java -Xss5m -Xmx2048m -Dapple.awt.UIElement=true -jar /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/mn2pdf-1.50/lib/../bin/mn2pdf.jar --xml-file "/Users/me/src/mn/bipm-si-brochure/site/documents/si-brochure-fr.presentation.xml" --xsl-file "/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/metanorma-bipm-7a70de29bfeb/lib/isodoc/bipm/bipm.brochure.xsl" --pdf-file "/Users/me/src/mn/bipm-si-brochure/site/documents/si-brochure-fr.pdf" --param baseassetpath="/Users/me/src/mn/bipm-si-brochure/sources" --syntax-highlight  --font-manifest "/var/folders/2t/xmdrn2sd2lv2w49dv0zw9_q00000gp/T/fontist_locations20221107-22882-zzzr08.yml"
[info]: Building collection file: /Users/me/src/mn/bipm-si-brochure/site/documents.xml ...
[info]: Generating html site in /Users/me/src/mn/bipm-si-brochure/site ...
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
...

Render Init: 15:35:05
...
Render Files: 15:35:07
...
Internal Refs: 15:35:07
...

Process si-brochure-fr.html: 15:35:07
java -Xss5m -Xmx2048m -Dapple.awt.UIElement=true -jar /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/mn2pdf-1.50/lib/../bin/mn2pdf.jar --xml-file "/Users/me/src/mn/bipm-si-brochure/site/brochure/si-brochure-fr.presentation.xml" --xsl-file "/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/metanorma-bipm-7a70de29bfeb/lib/isodoc/bipm/bipm.brochure.xsl" --pdf-file "/Users/me/src/mn/bipm-si-brochure/site/brochure/si-brochure-fr.pdf" --syntax-highlight  --font-manifest "/var/folders/2t/xmdrn2sd2lv2w49dv0zw9_q00000gp/T/fontist_locations20221107-22882-sitrum.yml"
...

Process si-brochure-en.html: 15:35:58
java -Xss5m -Xmx2048m -Dapple.awt.UIElement=true -jar /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/mn2pdf-1.50/lib/../bin/mn2pdf.jar --xml-file "/Users/me/src/mn/bipm-si-brochure/site/brochure/si-brochure-en.presentation.xml" --xsl-file "/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/metanorma-bipm-7a70de29bfeb/lib/isodoc/bipm/bipm.brochure.xsl" --pdf-file "/Users/me/src/mn/bipm-si-brochure/site/brochure/si-brochure-en.pdf" --syntax-highlight  --font-manifest "/var/folders/2t/xmdrn2sd2lv2w49dv0zw9_q00000gp/T/fontist_locations20221107-22882-lm3p5x.yml"
...

Concatenate: 15:36:49
java -Xss5m -Xmx2048m -Dapple.awt.UIElement=true -jar /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/mn2pdf-1.50/lib/../bin/mn2pdf.jar --xml-file "/Users/me/src/mn/bipm-si-brochure/site/brochure/collection.presentation.xml" --xsl-file "/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/metanorma-bipm-7a70de29bfeb/lib/isodoc/bipm/bipm.brochure.xsl" --pdf-file "/Users/me/src/mn/bipm-si-brochure/site/brochure/collection.pdf" --syntax-highlight  --split-by-language  --font-manifest "/var/folders/2t/xmdrn2sd2lv2w49dv0zw9_q00000gp/T/fontist_locations20221107-22882-baqyuv.yml"
...

Coverpage: 15:39:15
...

Done: 15:39:15
Site has been generated at /Users/me/src/mn/bipm-si-brochure/site

Duplicated commands: English

[info]: Compiling /Users/me/src/mn/bipm-si-brochure/sources/si-brochure-en.adoc ...
...
java -Xss5m -Xmx2048m -Dapple.awt.UIElement=true -jar /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/mn2pdf-1.50/lib/../bin/mn2pdf.jar --xml-file "/Users/me/src/mn/bipm-si-brochure/site/documents/si-brochure-en.presentation.xml" --xsl-file "/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/metanorma-bipm-7a70de29bfeb/lib/isodoc/bipm/bipm.brochure.xsl" --pdf-file "/Users/me/src/mn/bipm-si-brochure/site/documents/si-brochure-en.pdf" --param baseassetpath="/Users/me/src/mn/bipm-si-brochure/sources" --syntax-highlight  --font-manifest "/var/folders/2t/xmdrn2sd2lv2w49dv0zw9_q00000gp/T/fontist_locations20221107-22882-33x4gf.yml"
...
Process si-brochure-en.html: 15:35:58
java -Xss5m -Xmx2048m -Dapple.awt.UIElement=true -jar /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/mn2pdf-1.50/lib/../bin/mn2pdf.jar --xml-file "/Users/me/src/mn/bipm-si-brochure/site/brochure/si-brochure-en.presentation.xml" --xsl-file "/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/metanorma-bipm-7a70de29bfeb/lib/isodoc/bipm/bipm.brochure.xsl" --pdf-file "/Users/me/src/mn/bipm-si-brochure/site/brochure/si-brochure-en.pdf" --syntax-highlight  --font-manifest "/var/folders/2t/xmdrn2sd2lv2w49dv0zw9_q00000gp/T/fontist_locations20221107-22882-lm3p5x.yml"

Duplicated commands: French

[info]: Compiling /Users/me/src/mn/bipm-si-brochure/sources/si-brochure-fr.adoc ...
...
java -Xss5m -Xmx2048m -Dapple.awt.UIElement=true -jar /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/mn2pdf-1.50/lib/../bin/mn2pdf.jar --xml-file "/Users/me/src/mn/bipm-si-brochure/site/documents/si-brochure-fr.presentation.xml" --xsl-file "/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/metanorma-bipm-7a70de29bfeb/lib/isodoc/bipm/bipm.brochure.xsl" --pdf-file "/Users/me/src/mn/bipm-si-brochure/site/documents/si-brochure-fr.pdf" --param baseassetpath="/Users/me/src/mn/bipm-si-brochure/sources" --syntax-highlight  --font-manifest "/var/folders/2t/xmdrn2sd2lv2w49dv0zw9_q00000gp/T/fontist_locations20221107-22882-zzzr08.yml"
...
Process si-brochure-fr.html: 15:35:07
java -Xss5m -Xmx2048m -Dapple.awt.UIElement=true -jar /Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/mn2pdf-1.50/lib/../bin/mn2pdf.jar --xml-file "/Users/me/src/mn/bipm-si-brochure/site/brochure/si-brochure-fr.presentation.xml" --xsl-file "/Users/me/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/metanorma-bipm-7a70de29bfeb/lib/isodoc/bipm/bipm.brochure.xsl" --pdf-file "/Users/me/src/mn/bipm-si-brochure/site/brochure/si-brochure-fr.pdf" --syntax-highlight  --font-manifest "/var/folders/2t/xmdrn2sd2lv2w49dv0zw9_q00000gp/T/fontist_locations20221107-22882-sitrum.yml"

@abunashir abunashir moved this from 🌋 Urgent to 🏗 In progress in Metanorma Nov 13, 2022
@abunashir
Copy link
Member

Hi @ronaldtse, I was trying to look into it but I'm not sure if I understand it correctly. So, we are basically explicitly specifying the files once in metanorma.yml, where the file is specifying that the compiler should output pdf along with others.

And we are also specifying to generate pdf files in collection.yml file reference files, which is triggering the second pdf file generation for dependent files from here

What's the expected behaviour here? do we need to adjust the output extension we are expecting in each of those file, or generate one over another?

@abunashir
Copy link
Member

@ronaldtse - When you have sometime could you please have a look on the last comment ⬆️

@ronaldtse ronaldtse assigned opoudjis and unassigned abunashir Dec 16, 2024
@ronaldtse ronaldtse moved this from 🏗 In progress to 🌋 Urgent in Metanorma Dec 16, 2024
@ronaldtse ronaldtse changed the title Site generate for collection generates component PDFs twice Site generate for collection should not generate component PDFs twice Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🌋 Urgent
Development

No branches or pull requests

3 participants