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

Fixes for errors and warnings on doc-it manual build #55

Open
alfsb opened this issue Dec 13, 2024 · 24 comments
Open

Fixes for errors and warnings on doc-it manual build #55

alfsb opened this issue Dec 13, 2024 · 24 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alfsb
Copy link
Member

alfsb commented Dec 13, 2024

Hi @php/doc-tr-team . To (almost) fix manual building, language/oop5.xml must be updated, to include:

diff --git a/language/oop5.xml b/language/oop5.xml
index 07471db8..53ab5ecc 100644
--- a/language/oop5.xml
+++ b/language/oop5.xml
@@ -28,6 +28,7 @@
 
   &language.oop5.basic;
   &language.oop5.properties;
+  &language.oop5.property-hooks;
   &language.oop5.constants;
   &language.oop5.autoload;
   &language.oop5.decon;
@@ -49,6 +50,7 @@
   &language.oop5.references;
   &language.oop5.serialization;
   &language.oop5.variance;
+  &language.oop5.lazy-objects;
   &language.oop5.changelog;
 </chapter>

There are various XInclude warnings. Most of then can be fixed by updating (or renaming out) reference/filesystem/functions/fgetcsv.xml.

This will leave only two other files causing XInclude warnings, the file for function.bcdiv and the file for function.gmp-init. These may be fixed after one change on doc-base goes live.

Let me know if these help, into making doc-it a live project again.

@ManueldG
Copy link

ManueldG commented Feb 2, 2025

I replaced the files from the Italian repo with those from the English repo then little by little I'm taking the files inside it/reference//function and putting them back in the new repo for now when I rebuild the documentation with "php ./base/configure. php --with-lang=it" I haven't finished yet but for now it seems to work

@alfsb
Copy link
Member Author

alfsb commented Feb 2, 2025

That's great. Two notes, thought. Replacing files in translations from doc-en is almost the same effect of removing or renaming out files in translations. In the doc-pt_BR translations, we renamed very outdated files from .xml to .old, as an first step into making documentation build again, an after that focused in updating less outdated parts, while renaming back the .old files.

And that removing or renaming files at least flag then tor translation, while replacing translated files from doc-en would not.

But a building translation is better than a not building one, so please open a PR with this changes.

@ManueldG
Copy link

ManueldG commented Feb 2, 2025

Once I've finished and checked that it works I do the PR

@ManueldG
Copy link

ManueldG commented Feb 4, 2025

The document didn't validate C:\Users\Manuel\OneDrive\Pictures\Documents\Sviluppo\php\phpdoc\base\.manual.xml:1169736:71: error: IDREF "language.oop5.lazy-objects.initialization-sequence" without matching ID C:\Users\Manuel\OneDrive\Pictures\Documents\Sviluppo\php\phpdoc\base\.manual.xml:1171384:71: error: IDREF "language.oop5.lazy-objects.initialization-sequence" without matching ID C:\Users\Manuel\OneDrive\Pictures\Documents\Sviluppo\php\phpdoc\base\.manual.xml:1171855:91: error: IDREF "language.oop5.lazy-objects.initialization-sequence" without matching ID

can now parse files but cannot validate .manual.xml

Hi i found error in these files

    modified:   language/oop5/abstract.xml
    modified:   language/oop5/autoload.xml
    modified:   language/oop5/basic.xml
    modified:   language/oop5/cloning.xml
    modified:   language/oop5/constants.xml
    modified:   reference/bc/functions/bcadd.xml
    modified:   reference/bc/functions/bccomp.xml
    modified:   reference/bc/functions/bcdiv.xml
    modified:   reference/bc/functions/bcmod.xml
    modified:   reference/bc/functions/bcmul.xml
    modified:   reference/bc/functions/bcpow.xml
    modified:   reference/bc/functions/bcpowmod.xml
    modified:   reference/bc/functions/bcscale.xml
    modified:   reference/bc/functions/bcsqrt.xml
    modified:   reference/bc/functions/bcsub.xml
    modified:   reference/filesystem/functions/basename.xml
    modified:   reference/filesystem/functions/chgrp.xml
    modified:   reference/filesystem/functions/chmod.xml
    modified:   reference/filesystem/functions/chown.xml
    modified:   reference/filesystem/functions/clearstatcache.xml
    modified:   reference/filesystem/functions/copy.xml
    modified:   reference/filesystem/functions/delete.xml
    modified:   reference/filesystem/functions/dirname.xml
    modified:   reference/filesystem/functions/disk-free-space.xml
    modified:   reference/filesystem/functions/disk-total-space.xml
    modified:   reference/filesystem/functions/diskfreespace.xml
    modified:   reference/filesystem/functions/fclose.xml
    modified:   reference/filesystem/functions/feof.xml
    modified:   reference/filesystem/functions/fflush.xml
    modified:   reference/filesystem/functions/fgetc.xml
    modified:   reference/filesystem/functions/fgetcsv.xml
    modified:   reference/filesystem/functions/fgets.xml
    modified:   reference/filesystem/functions/fgetss.xml
    modified:   reference/filesystem/functions/file-exists.xml
    modified:   reference/filesystem/functions/file-get-contents.xml
    modified:   reference/filesystem/functions/file.xml
    modified:   reference/filesystem/functions/fileatime.xml
    modified:   reference/filesystem/functions/filectime.xml
    modified:   reference/filesystem/functions/filegroup.xml
    modified:   reference/filesystem/functions/fileinode.xml
    modified:   reference/filesystem/functions/filemtime.xml
    modified:   reference/filesystem/functions/fileowner.xml
    modified:   reference/filesystem/functions/fileperms.xml
    modified:   reference/filesystem/functions/filesize.xml
    modified:   reference/filesystem/functions/filetype.xml
    modified:   reference/filesystem/functions/flock.xml
    modified:   reference/filesystem/functions/fopen.xml
    modified:   reference/filesystem/functions/fpassthru.xml
    modified:   reference/filesystem/functions/fputs.xml
    modified:   reference/filesystem/functions/fread.xml
    modified:   reference/filesystem/functions/fscanf.xml
    modified:   reference/filesystem/functions/fseek.xml
    modified:   reference/filesystem/functions/fstat.xml
    modified:   reference/filesystem/functions/ftell.xml
    modified:   reference/filesystem/functions/ftruncate.xml
    modified:   reference/filesystem/functions/fwrite.xml
    modified:   reference/filesystem/functions/is-dir.xml
    modified:   reference/filesystem/functions/is-executable.xml
    modified:   reference/filesystem/functions/is-file.xml
    modified:   reference/filesystem/functions/is-link.xml
    modified:   reference/filesystem/functions/is-readable.xml
    modified:   reference/filesystem/functions/is-uploaded-file.xml
    modified:   reference/filesystem/functions/is-writable.xml
    modified:   reference/filesystem/functions/is-writeable.xml
    modified:   reference/filesystem/functions/link.xml
    modified:   reference/filesystem/functions/linkinfo.xml
    modified:   reference/filesystem/functions/lstat.xml
    modified:   reference/filesystem/functions/mkdir.xml
    modified:   reference/filesystem/functions/move-uploaded-file.xml
    modified:   reference/filesystem/functions/parse-ini-file.xml
    modified:   reference/filesystem/functions/pathinfo.xml
    modified:   reference/filesystem/functions/pclose.xml
    modified:   reference/filesystem/functions/popen.xml
    modified:   reference/filesystem/functions/readfile.xml
    modified:   reference/filesystem/functions/readlink.xml
    modified:   reference/filesystem/functions/realpath.xml
    modified:   reference/filesystem/functions/rename.xml
    modified:   reference/filesystem/functions/rewind.xml
    modified:   reference/filesystem/functions/rmdir.xml
    modified:   reference/filesystem/functions/set-file-buffer.xml
    modified:   reference/filesystem/functions/stat.xml
    modified:   reference/filesystem/functions/symlink.xml
    modified:   reference/filesystem/functions/tempnam.xml
    modified:   reference/filesystem/functions/tmpfile.xml
    modified:   reference/filesystem/functions/touch.xml
    modified:   reference/filesystem/functions/umask.xml
    modified:   reference/filesystem/functions/unlink.xml
    modified:   reference/gmp/functions/gmp-abs.xml
    modified:   reference/gmp/functions/gmp-add.xml
    modified:   reference/gmp/functions/gmp-and.xml
    modified:   reference/gmp/functions/gmp-clrbit.xml
    modified:   reference/gmp/functions/gmp-cmp.xml
    modified:   reference/gmp/functions/gmp-com.xml
    modified:   reference/gmp/functions/gmp-div-q.xml
    modified:   reference/gmp/functions/gmp-div-qr.xml
    modified:   reference/gmp/functions/gmp-div-r.xml
    modified:   reference/gmp/functions/gmp-div.xml
    modified:   reference/gmp/functions/gmp-divexact.xml
    modified:   reference/gmp/functions/gmp-fact.xml
    modified:   reference/gmp/functions/gmp-gcd.xml
    modified:   reference/gmp/functions/gmp-gcdext.xml
    modified:   reference/gmp/functions/gmp-hamdist.xml
    modified:   reference/gmp/functions/gmp-init.xml
    modified:   reference/gmp/functions/gmp-intval.xml
    modified:   reference/gmp/functions/gmp-invert.xml
    modified:   reference/gmp/functions/gmp-jacobi.xml
    modified:   reference/gmp/functions/gmp-legendre.xml
    modified:   reference/gmp/functions/gmp-mod.xml
    modified:   reference/gmp/functions/gmp-mul.xml
    modified:   reference/gmp/functions/gmp-neg.xml
    modified:   reference/gmp/functions/gmp-or.xml
    modified:   reference/gmp/functions/gmp-perfect-square.xml
    modified:   reference/gmp/functions/gmp-popcount.xml
    modified:   reference/gmp/functions/gmp-pow.xml
    modified:   reference/gmp/functions/gmp-powm.xml
    modified:   reference/gmp/functions/gmp-prob-prime.xml
    modified:   reference/gmp/functions/gmp-random.xml
    modified:   reference/gmp/functions/gmp-scan0.xml
    modified:   reference/gmp/functions/gmp-scan1.xml
    modified:   reference/gmp/functions/gmp-setbit.xml
    modified:   reference/gmp/functions/gmp-sign.xml
    modified:   reference/gmp/functions/gmp-sqrt.xml
    modified:   reference/gmp/functions/gmp-sqrtrem.xml
    modified:   reference/gmp/functions/gmp-strval.xml
    modified:   reference/gmp/functions/gmp-sub.xml
    modified:   reference/gmp/functions/gmp-xor.xml
    modified:   reference/pcre/pattern.modifiers.xml

Untracked files:
(use "git add ..." to include in what will be committed)
language/oop5/anonymous.xml
language/oop5/changelog.xml
language/oop5/decon.xml
language/oop5/final.xml
language/oop5/inheritance.xml
language/oop5/interfaces.xml
language/oop5/iterations.xml
language/oop5/late-static-bindings.xml
language/oop5/lazy-objects.xml
language/oop5/magic.xml
language/oop5/object-comparison.xml
language/oop5/overloading.xml
language/oop5/paamayim-nekudotayim.xml
language/oop5/properties.xml
language/oop5/property-hooks.xml
language/oop5/references.xml
language/oop5/serialization.xml
language/oop5/static.xml
language/oop5/traits.xml
language/oop5/variance.xml
language/oop5/visibility.xml
language/types/array.xml
language/types/boolean.xml
language/types/callable.xml
language/types/enumerations.xml
language/types/iterable.xml
language/types/mixed.xml
language/types/never.xml
language/types/numeric-strings.xml
language/types/relative-class-types.xml
language/types/resource.xml
language/types/singleton.xml
language/types/string.xml
language/types/type-juggling.xml
language/types/type-system.xml
language/types/value.xml
language/types/void.xml
reference/bc/functions/bcceil.xml
reference/bc/functions/bcdivmod.xml
reference/bc/functions/bcfloor.xml
reference/bc/functions/bcround.xml
reference/filesystem/functions/fdatasync.xml
reference/filesystem/functions/file-put-contents.xml
reference/filesystem/functions/fnmatch.xml
reference/filesystem/functions/fputcsv.xml
reference/filesystem/functions/fsync.xml
reference/filesystem/functions/glob.xml
reference/filesystem/functions/lchgrp.xml
reference/filesystem/functions/lchown.xml
reference/filesystem/functions/parse-ini-string.xml
reference/filesystem/functions/realpath-cache-get.xml
reference/filesystem/functions/realpath-cache-size.xml
reference/gmp/functions/gmp-binomial.xml
reference/gmp/functions/gmp-export.xml
reference/gmp/functions/gmp-import.xml
reference/gmp/functions/gmp-kronecker.xml
reference/gmp/functions/gmp-lcm.xml
reference/gmp/functions/gmp-nextprime.xml
reference/gmp/functions/gmp-perfect-power.xml
reference/gmp/functions/gmp-random-bits.xml
reference/gmp/functions/gmp-random-range.xml
reference/gmp/functions/gmp-random-seed.xml
reference/gmp/functions/gmp-root.xml
reference/gmp/functions/gmp-rootrem.xml
reference/gmp/functions/gmp-testbit.xml

@ManueldG
Copy link

ManueldG commented Feb 4, 2025

PR #59 #60

@alfsb
Copy link
Member Author

alfsb commented Feb 4, 2025

After this PRs are reviewed and merged, I will try to help identifying key files that need to be updated to push doc-it into building state again. In fact, I'm working in a tool specifically for this.

The IDREF without matching ID error is somewhat hard to fix because it's caused by missing or misplaced XML entity references, in various places, and fixing one place may not cause a immediate effect. On the contrary, fixing one place may cause the errors go worse, initially, and only fixing all places makes the error go away.

There is no @php/doc-it-team to ping, so let's wait a while to see if someone reviews and merge these PRs.

@ManueldG
Copy link

ManueldG commented Feb 4, 2025

ok in the meantime I'll take this opportunity to study

@DavidePastore DavidePastore added good first issue Good for newcomers help wanted Extra attention is needed labels Feb 4, 2025
@DavidePastore
Copy link
Collaborator

Hi everyone. Thanks for the investigation that you did on the topic. As I privately shared with @ManueldG, I'm not going to merge these two PRs because they contain only English content. It's better to update the files and use Italian instead since this is the repository meant to contain the Italian translation of the PHP documentation. Feel free to propose new PRs that are updating the files accordingly. Thanks for the understanding.

@alfsb
Copy link
Member Author

alfsb commented Feb 5, 2025

I'm not going to merge these two PRs because they contain only English content.

About pushing English files, one alternative is simply renaming very outdated files from .xml to .old, as noted above.

It's better to update the files and use Italian instead since this is the repository meant to contain the Italian translation of the PHP documentation. Feel free to propose new PRs that are updating the files accordingly. Thanks for the understanding.

Please note that Italian manual build is broken, from several months now. While is better to have more texts translated, soon there will be no published Italian manual at all. I opened this issue to help point out what are the critical files necessary to push doc-it into building again, and avoid the manual being removed.

@ManueldG
Copy link

ManueldG commented Feb 5, 2025

I started using the basic structure of the English version and I'm comparing it with the Italian version so while I update the files I check if the project is built.
On the other hand, the project is only 1% updated and does not build

PR #61

@ManueldG
Copy link

ManueldG commented Feb 5, 2025

I'm not going to merge these two PRs because they contain only English content.

About pushing English files, one alternative is simply renaming very outdated files from .xml to .old, as noted above.

It's better to update the files and use Italian instead since this is the repository meant to contain the Italian translation of the PHP documentation. Feel free to propose new PRs that are updating the files accordingly. Thanks for the understanding.

Please note that Italian manual build is broken, from several months now. While is better to have more texts translated, soon there will be no published Italian manual at all. I opened this issue to help point out what are the critical files necessary to push doc-it into building again, and avoid the manual being removed.

its posssible restore the last working version ? or create a branch to fix the current version ?
locally I'm renaming folders that don't exist in the IT version as "folder-EN".
How can I see if a file is out of date?

@ManueldG
Copy link

ManueldG commented Feb 6, 2025

I send a message to [email protected]

@DavidePastore
Copy link
Collaborator

I'm not going to merge these two PRs because they contain only English content.

About pushing English files, one alternative is simply renaming very outdated files from .xml to .old, as noted above.

It's better to update the files and use Italian instead since this is the repository meant to contain the Italian translation of the PHP documentation. Feel free to propose new PRs that are updating the files accordingly. Thanks for the understanding.

Please note that Italian manual build is broken, from several months now. While is better to have more texts translated, soon there will be no published Italian manual at all. I opened this issue to help point out what are the critical files necessary to push doc-it into building again, and avoid the manual being removed.

I understand your point but I prefer to solve the issue the right way by updating and fixing the files that are causing the issue. I will take a look at it this evening.

@alfsb
Copy link
Member Author

alfsb commented Feb 6, 2025

I started using the basic structure of the English version and I'm comparing it with the Italian version

There are some tools I created to automate these comparisons. They are in https://github.com/php/doc-base/tree/master/scripts/translation . They already helped other translators to push their manual into building state.

doc-it need more the changes pointed out from qaxml.e.php and qaxml.a.php.

 so while I update the files I check if the project is built.

This is a nice habit to have, but doc-it is so outdated there will be various changes that will not build the manual. Only when all changes necessary are in place that it will start building again.


its posssible restore the last working version ?

No. Most translations already made the changes, so reverting doc-en to build doc-it would break all others.

or create a branch to fix the current version ?

Yes, but it's necessary to coordinate it with the people that have pull/merge access, or it would be not used in the end.

I may continue to help pointing out what are the key files or how to fix some errors in the meanwhile.

locally I'm renaming folders that don't exist in the IT version as "folder-EN".

Do not do that. Files that do not exist in doc-it are automatically pulled from doc-en. doc-en is the base, the translations are more an overlay.

How can I see if a file is out of date?

The doc-it wiki mentions how in https://github.com/php/doc-it/blob/master/CONTRIBUTING.md#3-revision-tracking . To generate the same file locally, you can use

php doc-base/scripts/revcheck.php if > revcheck.html

Yet, I will insist that qaxml.e.php and qaxml.a.php are the best to indicate what files to update, while the manual is not building.

@alfsb
Copy link
Member Author

alfsb commented Feb 6, 2025

I understand your point but I prefer to solve the issue the right way by updating and fixing the files that are causing the issue. I will take a look at it this evening.

Thanks, The Italian speaking developers will appreciate that. One question, you are aware the build manual failures are send to lists no more?

Also, you may be interested in read this: php/doc-base#111 (review) . This was the case of another language that have a comeback from being unpublished.

Another thing that helped so much another language was organizing an "translation fest".

@ManueldG
Copy link

ManueldG commented Feb 6, 2025

How should I use these files? qaxml.e.php and qaxml.a.php?

@DavidePastore
Copy link
Collaborator

@alfsb and @ManueldG, the build is now green. Can I close this issue now or do you need any support?

@alfsb
Copy link
Member Author

alfsb commented Feb 10, 2025

Close, yes. On the question of support, I'm rewriting the qaxml tools under doc-base/scritps/translations/, the better help translations in behind or broken status.

The actual qaxml tools are mostly focused on languages with no outdated files in revcheck. The new tools will inspect all files.

As there is email alerts no more, the only way to detect broken builds is to run the configure.php from time to time.

@alfsb
Copy link
Member Author

alfsb commented Feb 10, 2025

How should I use these files? qaxml.e.php and qaxml.a.php?

There is a README.md on the link https://github.com/php/doc-base/tree/master/scripts/translation . But as comment above, these tools help, but are not focused on languages in broken state. I'm creating new tools that will serve doc-it better, in the same directory. Keep a watch on this folder, as the new tools will placed here.

@ManueldG
Copy link

ManueldG commented Feb 10, 2025 via email

@DavidePastore
Copy link
Collaborator

I understand your point but I prefer to solve the issue the right way by updating and fixing the files that are causing the issue. I will take a look at it this evening.

Thanks, The Italian speaking developers will appreciate that. One question, you are aware the build manual failures are send to lists no more?

Also, you may be interested in read this: php/doc-base#111 (review) . This was the case of another language that have a comeback from being unpublished.

Another thing that helped so much another language was organizing an "translation fest".

Thanks for your tips and information. I wasn't aware that the manual build failures weren't sent any more. I don't understand why this choice was taken. Do you have any additional details about this?

@alfsb
Copy link
Member Author

alfsb commented Feb 18, 2025

Thanks for your tips and information. I wasn't aware that the manual build failures weren't sent any more. I don't understand why this choice was taken. Do you have any additional details about this?

Several months ago, the machine that builds manuals broke, and while configuring the new machine, emails from broken builds, and emails from commits are removed or not added. You need to interview the new machine maintainers for more details.

@alfsb
Copy link
Member Author

alfsb commented Feb 18, 2025

Before closing, I suggest running doc-base/scripts/broken.php it on a Linux and Windows machines, and fix the issues. There was several different alerts on Windows and Linux. These problems are minor, but will mislead revcheck.php and qaxml tools.

@ManueldG
Copy link

ManueldG commented Feb 21, 2025

I tried to run doc-base/scripts/broken.php it under windows there are only one file with error:
Broken XML file:
Path: it\reference\dom\reference.xml [37,59]
Error: Input is not proper UTF-8, indicate encoding !
Bytes: 0xF9 0x20 0x66 0x65

I would like to report the error in issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants