-
Notifications
You must be signed in to change notification settings - Fork 97
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
Strict [skip-revcheck]
#132
Conversation
PR ready for review and comments. As this changes a tool that is used by (all?) translations, this is a thing I would like to hear comments before merging. I would especially like to hear from people with access to web-php revcheck.php to comment, and try to synchronize the change here and there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for tackling this!
I got slightly frustrated with having multiple commits that skip the rev-checked actually marking the translation as outdated.
I wasn't aware of the bigger issue with it skipping squashed commits.
I haven't looked at the revcheck script in years, and I am busy so if my review is required it might take a bit longer, but I am happy to merge a PR which is made to the relevant doc repo to have them in sync.
I don't see a problem with waiting a little, and I'm glad that you can make the change to the web-doc/revcheck.php, and thus not have the problem of desynchronization. As these changes will trigger revisions of dozens of files in each translation, I think it's important to ping the lists, right before or right after the merge. With this PR merged, I will try to start the work of removing code duplication from revchecks, so that future changes do not depend on so much repo coordination/code duplication. |
I'm now confident that this PR will only mark files incorrectly skipped (squashed commits that contain an This version also runs 10x faster on pt_BR translation, which is somewhat expected as this new code executes way less shell git commands. Before and after timing:
|
This is a committer error. [skip-revcheck] is used incorrectly. This should be two separate commits.
These have already been done in all languages' files. Otherwise configure.php would fail.
The first issue was already done in all languages' files, as far as I remember. That's why they are skip-revchecked. Otherwise configure.php would fail. The second issue does not affect translations. I don't understand why the third issue is objected. -- I don't think any changes are needed. Committers should be trained better. |
The original committer used separate commits. The issue above occurs when commits are squashed. This is a fix for squashed commits.
|
These are DTD changes. It is not possible to apply them to doc-en and not to others. When I look at it, I see that it is also applied to pt_BR: |
The link of first issue already shows a case not related with DTD changes: php/doc-en@8f6fd5c Also, there are dozen of other cases in git history, showing that sequential commits occurs, outside coordinated efforts.
|
If your claim is true, the PHP documentation seems to be a mess in terms of translations. If previous commits have made things so confusing, I will not translate the PHP documentation from now on. Do what you want. It does not concern me anymore. |
I will try, in the following weeks, to make a PR to the other |
Now that the infrastructure for doc.php.net has been moved (nearly), I'd be happy to revisit merging or getting rid of the separate implementations of this between (On the |
To eliminate the various implementations, I suggest moving the doc-base
`revcheck.php` to use the files at
https://github.com/php/doc-base/tree/master/scripts/translation/lib , and
to move web-doc `revcheck.php` to use the same code, as an git submodule[1].
The lib code already generates all data necessary for both revchecks,
nicely typed, that in turn can be saved in serialized form, and by so can
also dismiss the SQLite dependency entirely (but data aggregations, then,
need to be coded).
While I think this PR makes things better, I suggest first moving both
revchecks to use the lib code, and, after that, changing this PR directly
in lib code, as this PR implies some breakage, and needs to be coordinated
with translation teams. In this order, the first priority is making the new
revchecks to produce the same results as now, that could be done without
any coordination.
I can work in doc-base `revcheck.php` lib migration, in the following
weeks, in another PR.
[1] https://git-scm.com/book/en/v2/Git-Tools-Submodules
|
No, relying on code in |
The inverse. Having code from
It's possible do have So anytime the manual configure, the revcheck data can be made available as static data, near by the generated manual pages. |
We're saying the same thing. It would be a hard pass in the other direction, too.
Sure, that would also be fine, and probably makes the most sense in the long run instead of generating them independently. That way the translation status on doc.php.net would be basically in sync with the translations live on www.php.net. (The scripts that drive this on the systems side are |
Accidentally closed when cleaning up my fork, to first start working on code duplication of Re-post the opening as an separate issue? |
I think so yes |
An fix for issue two (sequential [skip-revcheck] marks files outdated in translations) was proposed in PR 178. A solution for issue one (squashed commits doesn't mark files outdated) are in the works. It's simple in principle, but will take time to make it robust. As the PRs opened until now cause little or no changes, I will prefer to merge each one separately, wait for if there is any problem, before opening an PR for the squashed commit issue, that will change a lot of file status, in all translations. This is a battle that I prefer to not mix with other modifications. There already an issue opened on the squashed issue (133), so no further issues need to be opened. TL:DR; The only missing PR is for squashed commits, all other issues have open PRs or are already merged. |
This is a tentative PR to fix the issues below. This PR changes doc-base's
revcheck.php
to:[skip-revcheck]
as the first text on the first line of a commit message;[skip-revcheck]
commits.Issue one
First observe the contents of commit php/doc-en@8f6fd5c and after his commit message, below:
This commit should mark the translations as outdated or be skiped?
As now, the code searches for
[skip-revcheck]
in any part of the commit message. See:doc-base/scripts/revcheck.php
Lines 302 to 305 in 8b31698
Issue two
Observe these commit history:
That is, a sequence of commits marked with
[skip-revcheck]
. Should these files be marked as outdated each time there are two or more commits marked with[skip-revcheck]
in sequence?The current code always gets the commit
-2
of history when the last commit is marked[skip-revcheck]
. See:doc-base/scripts/revcheck.php
Line 384 in 8b31698
Possible another issue
In the case of https://github.com/php/doc-en/commits/765b2d6eec7dfbaeed900b32aa91a1360d73df42/reference/ds/ds.deque.xml , with the hashes and messages as:
What hash should appear in revcheck as the "target" of translations and diffs? The most recent (
4d17b7
) or the last non-skipped (b2a26b
)?The first issue caused about 40 files to not be marked outdated in all translations. The second issue is harder to calculate, as it involves analysing the commit history of each file, against each revtag.
If this PR gets approval, it will generate about a hundred of files to be marked as outdated in all translations, and will also desynchronize the revcheck script of
doc-base
andweb-doc
.I plan to, after merging this, to change the lib version of this code in
doc-base/tree/master/scripts/translation
to reflect the new strict rules on lib code, and to open issues against code duplication ondoc-base
andweb-doc
. I would also resolve the issue againstdoc-base
, but I probably will not tackle theweb-doc
issue as I do not know to test or deploy this infrastructure.