Problem/Motivation
Steps to reproduce
Proposed resolution
- vals -> values
- vancode -> (ignore)
- veeeery -> (rewrite)
- vendored -> (ignore)
- veniam -> (ignore)
- verison -> version
- verygreatdrupalmodule -> (ignore)
- vibber -> (ignore)
- viewsviewfiles -> (ignore)
- vivamus -> (ignore)
- vmov -> (ignore)
- vocabs -> vocabularies/vids
- volgende -> (ignore)
- vorige -> (ignore)
- vous -> (ignore)
- vxezb -> (ignore)
- vxfbk -> (ignore)
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #50 | 3185640-50.patch | 23.87 KB | lucienchalom |
| #47 | 3185640-47.patch | 23.84 KB | lucienchalom |
| #39 | interdiff_29-39.txt | 567 bytes | lucienchalom |
| #39 | 3185640-39.patch | 17.58 KB | lucienchalom |
| #29 | interdiff_21-29.txt | 6.15 KB | lucienchalom |
Comments
Comment #2
jungleAfter:
Comment #4
jungleFixing #2
Comment #5
jungleComment #6
quietone commentedThis is used once in a comment. I think we should reword the comment. Instead of
* Remove possibly problematic test files from vendored projects.it can be* Remove possibly problematic test files from vendor projects.This is a few characters is a placeholder and used 6 times. I wonder if it would be better to have 6 ignore lines instead.
As above
As above
This is part of alt text for an image. Can we change it to English words and still have a valid test?
The search tests are using lots of non English words. Maybe it would be better to do the search module tests in a separate issue.
Comment #9
andregp commentedI'll work on a reroll and apply the comments from @quietone #6
Comment #10
andregp commentedFinished reroll. Regarding comment #6:
1. Done.
2-4. Added
// cSpell:disable-next-linefor each occurrence.5. Was solved on some other commit in between versions.
6. I left SearchMatchTest and SearchSimplifyTest unchanged so them can be addressed on a separate issue.
Comment #12
andregp commentedI haven't noticed it didn't apply.
Comment #14
quietone commentedAdding tag for the cspell spelling error issues.
Comment #15
ravi.shankar commentedAdded reroll of patch #15 on Drupal 10.1.x.
Comment #16
smustgrave commentedPatch failed. You can test a patch before uploading with core/scripts/dev/commit-code-check.sh
Comment #17
smustgrave commentedFixed patch error.
Also removed change to generate-d7 script as I wasn't sure how that pretained to this.
Comment #18
lucienchalom commentedI found the word "vampirize" on the dictionary, and is used only once on core/lib/Drupal/Core/Render/theme.api.php: 891.
Should we '// cspell:ignore vampirize' ?
I added '// cSpell:disable-next-line' for vxfbk on core/modules/ckeditor5/src/HTMLRestrictions.php:562
and changed veeeery to very_very on core/modules/pgsql/tests/src/Unit/SchemaTest.php:77
As #6 6. "Maybe it would be better to do the search module tests in a separate issue."
I added back verygreatdrupalmodule to the dictionary found on core/modules/search/tests/src/Kernel/SearchTextProcessorTest.php:82
Or should we '// cspell:ignore verygreatdrupalmodule' too?
Comment #20
lucienchalom commentedI am sorry, I have no idea how to fix this error....
Comment #21
lucienchalom commentedchanged the veeeery back, and added a '// cSpell:disable-next-line' on core/modules/pgsql/tests/src/Unit/SchemaTest.php:77
That fixed the error.
also added back to the dictionary the other 'veniam' and 'vocabs', with 'verygreatdrupalmodule' to became the ToDo list for "Maybe it would be better to do the search module tests in a separate issue." as comment on #6
Comment #22
lucienchalom commentedComment #23
elberHi I revised the #21 patch.
Patch was applied cleanly
I also ran the spellcheck command to see if the words were ignored or rewrite with successful.
They were rewrited and ignored as expected.
Moving to RTBC.
Comment #24
xjmThanks folks for working on this.
It looks like these are all the same token. Instead of ignoring it on six separate lines, maybe we could store it to a variable? Or, would CSPell understand to ignore the whole token as one word for this file (despite its mixed case)?
That
Vis not the first capital letter in this token, either, so can we check the dictionary for other entries that this fix makes unnecessary?I looked up the test, and this seems like a weird class name component to generate. Why isn't it hyphenated? Moreover, aren't all the views always going to be
views.view.something, so why even add theviewviewprefix at all?This change is fine for the scope of the cspell issue, but maybe worth a followup for Views' behavior?
There are two French sentences in this file, full of French words that will fail spelling in English. Instead of just ignoring "vous", let's ignore the two French lines, and then we can remove the other corresponding words from the dictionary.
As above.
I was going to say we could just replace "veeeery" and "veery" with "very", but there is also the token on the line. We still could use "very" spelled properly for consistency, though, even though the line would still be ignored for the token. We'd need to change the test to prevent the earlier fail as well.
As above.
These are Afrikaans words in this file. There are two other Afrikaans words also in the file that could be ignored and removed from the dictionary.
Since my suggestions for the French in the migrate tests and the Afrikaans in
PagerTestare scope-creep-y, they could be split into their own issues. Overall, real words in foreign languages should be handled on a per-sentence or per-test basis, not on a per-word basis.Thanks everyone!
Comment #25
lucienchalom commentedI agree with most of these changes, so will work on it.
About the 5. tho, changing the word veeeery to very_very on core/modules/pgsql/tests/src/Unit/SchemaTest.php:77 makes the test to break as we can see on #18. Any suggestion on how to fix it?
Comment #26
lucienchalom commentedI was checking and on comment #6
@xjm should we keep it or change back?
and about 6. from #24 I believe is the same point made in #6 6.
Comment #27
xjmFor point 5, the failing test you encountered above actually tells you what to do. From https://www.drupal.org/pift-ci-job/2549835:
You can research what this means and why it was introduced by using
git log -Lfor the line containing the expected value:That leads us to #2561129: Composite indexes are not correctly deleted/re-created when updating a field storage definition. Reading that issue, and the bug it is addressing, leads us to:
Drupal\pgsql\Driver\Database\pgsql\Schema::ensureIdentifiersLength()This is the relevant bit of code in that method:
And:
The code for the
hashBase64()method is:So, basically, we have to (a) make sure the key is over 63 characters for the test to work (edit: so we might need to add an extra "very" or two in there), (b) concatenate it with the table name with a
__separator, and then (c) run it throughstrtr(base64_encode(hash('sha256', $data, TRUE), ['+' => '_', '/' => '_', '=' => ''])And that should give us the new test value. :)
You can sub the value in here to test:
https://3v4l.org/s2mNI
Comment #28
xjm@lucienchalom, sorry, we are crossposting. Regarding #6, I am not suggesting changing it back to what it was before, but rather doing:
...and then concatenating that variable into the six assertion lines afterward, so only the one line will need to be ignored since the rest will instead have the English word
token. @quietone and I are trying to solve the same problem, I think, just differently. :) And it will clean up more than one "word" from the dictionary that way.Comment #29
lucienchalom commented1. I could create the token, that was a great idea.
2. Also thank you so much for the step by step on how to fix the test of the very_very.
3. About the French words, I suggest that we create an issue for cspell on all the French words and remove them form this scope.
For the other words they are actually Dutch.
So I think is better to leave with cspell ignore for the 4 words.
4. The last thing to do then is the viewsview.
Should we create a new issue for it?
Comment #30
lucienchalom commentedComment #31
xjmEh well at least Dutch and Afrikaans have a lot of cognates, right? 😅
The decision to address non-English words in a separate issue seems like a sound one to me. Can you create another child issue of the meta for that? The scope might be something like "Handle valid words from other languages consistently in cspell" or something.
Oh, and yes, I think a separate issue is good for the viewsview thing also.
Comment #32
lucienchalom commentedA cording to Wikipedia about Afrikaans "An estimated 90 to 95% of the vocabulary is of Dutch origin with adopted words from other languages including German and the Khoisan languages of Southern Africa. There is a large degree of mutual intelligibility between the two languages, especially in written form." 😅😅😅
Anyway, here is the new issue #3333267: Handle valid words from other languages consistently in cspell. XD
And the viewsview issue #3333327: viewsviewfiles in configTranslationUiTest.
Comment #33
xjm👍
Comment #34
xjmComment #35
sergiogsanchez commentedI tested patch #29:
The ignored CSpell words in the test files work as expected.
I checked all the words we are removing from the dictionary, and it makes sense.
The lines excluded from CSpell with cSpell:disable-next-line are tokens or random strings, so I agree with the approach.
Comment #36
quietone commentedI reviewed each word change and grepped core for each as well. The changes in the patch look correct.
However, I disagree with keeping a French word in the dictionary but moving two Dutch words to an ignore line. These should be handled consistently. Plus, as pointed out in #29 there are other Dutch words in the dictionary.
I am setting back to needs works to move those words back to the dictionary.
Comment #37
xjm@quietone, I already signed off on handling the foreign-language words in the dictionary (all of them) as a separate language scope.
Setting back to RTBC, but marking for release manager review while we compare notes.
Comment #38
xjmRead this a second time; actually I do agree with that. Let's update the patch. :)
Comment #39
lucienchalom commentedThank you for catching that, makes totally sense.
Added back volgende and vorige to the dictionary.
Comment #40
smustgrave commentedConfirmed issues from #36 has been addressed.
Comment #41
xjmReviewed this one more time with:
git diff --color-words='\w+|.' --stagedNormally, I would give the feedback that this should be above the line that contained it. However, this is the code's author's name and is in the class docblock, so it would have to be here.
This is another one where I would have moved it down to the relevant line(s), but we have a followup, so this is fine for now.
I confirmed with
wcthat the old key was 48 chars and that the new one is 49, so this test is still working as intended:Comment #43
xjmCommitted to 10.1.x. Thanks!
I queued tests against 10.0.x and 9.5.x to make sure the same change set works on those branches before backporting it.
Comment #45
xjmCSpell passed in the above 10.0.x test results' console log, so I went ahead and cherry-picked this to 10.0.x. However, the patch does not apply to 9.5.x, so we need a separate 9.5.x. backport. Thanks!
Comment #46
xjmBetter status for the backport version.
Comment #47
lucienchalom commentedRerolled for 9.5.x, the major changes were related to ES6.
https://www.drupal.org/node/2815083
Comment #48
spokjeyarn build:jsloves your work, sadlyyarn prettierhas a different opinion...Comment #49
lucienchalom commented😅😅
thank you, I hope the core script likes my work now XD
Comment #50
lucienchalom commentedempty files are not helpful, sorry....
Comment #51
smustgrave commentedChanges look good!
Good work!
Comment #52
dpiI noticed the patch changed parameter naming for TermStorage/TermStorageInterface.
Since PHP 8.0 parameter naming are a part of the API contract, as named arguments may be used by callers.
As much as its unlikely to happen in this case, as it is the first non optional, it is still possible and will break usages. I've certainly made use of parameter names when its redundant, in the name of legibility.
How can we make sure parameters are not affected by these spelling issues?
Comment #53
xjmThat's an interesting point @dpi and we might need to change our practices for it. Since it's just that one change we need to be concerned about, let's open a followup issue to discuss whether we should not allow parameter names to change for cspell and how to handle BC for them generally in a second policy issue.
Comment #54
xjmI opened #3335354: [policy, no patch] Decide how to handle parameter renaming now that PHP 8 allows it to be used as an API to discuss BC for parameter names.
Comment #56
xjmCommitted and pushed the backport to 9.5.x. Thanks!