Rewrite, new file-entities.txt to debug entity collisions#313
Draft
alfsb wants to merge 2 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes two changes
file-entities.phpfile-entities.txtfile on manual build.The rewriting is incidental, but was a consequence of simplifying and heavily documenting the file. But it is rewrite anyway, so inspecting the final file may be easier than the diff.
The second point is the important one. The script will now generate a
file-entities.txtinsidedoc-base/temp, to make analysing DTD entity collisions easier in the future.The PR is opened as a draft, for now, as testing is not completed. I expect no funcional changes, but it will take time until all testing is done. Anyways, reviews and comments are welcome. In fact, there are two points where I would ask for additional comments, even after this PR is merged.
RFC 1
The script generates an anomalous entity,
global.function-index, that maps tofuncindex.xmlinsidedoc-base. I would like hear comments about moving this file todoc-en, marking it as<?do-not-translate?>, so it would be possible to remove this hardcoded path fromdoc-base.RFC 2
AFAIK, the file entities infrastructure always replaced underscores to hyphens. This always surprises me, as it makes some file entity names to mismatch the real file paths on disk. But I do not know why this replacement takes place.
I would like to hear comments about removing this replacement. It would be necessary to add the disappearing entities into
doc-en/entities/entitites-remove.ent, and also change file entities ondoc-enas match folder and file names from hyphens to underlines.The reason to make this change now is that
file-entities.phpis now idempotent and and has a very clean implementation, but this replacing may cause subtle miscomputation and hard to debug failures, because any replacements may cause silent collisions, for example:whereas they are very possible and distinct files and directories, in both cases, but will map to the same file entity in the current implementation.