- Issue created by @mstrelan
- 🇬🇧United Kingdom jonathan1055
Thanks for reporting this. I did not know that
drupal-dictionary.txt
was a new file. Can you find the commit and/or issue where it was added, just so we know exactly the scenarios. Thank you. - 🇦🇺Australia mstrelan
Looks like it was 📌 Add a dictionary for Drupal-specific words RTBC
$ git log --oneline -S drupal-dictionary.txt a10e0f8d1f Issue #3328741 by quietone, smustgrave, xjm, catch, alexpott, longwave: Add a dictionary for Drupal-specific words
- 🇬🇧United Kingdom jonathan1055
Thanks, that's helpful. So the file was added to 10.2.x-dev on 11 November 2023 when 10.2.0-alpha1 had already been released but before 10.2.0-beta1 had been released.
- 🇪🇸Spain fjgarlin
Maybe we can just do a
file_exists
in theprepare-cspell.php
script. That way we don't need to worry about versions. - 🇬🇧United Kingdom jonathan1055
Maybe we can just do a file_exists
Oh, absolutely, yes I was not going to check the version. I just wanted to make sure we knew what had happened. It was my error that I assumed that file was around for a long time. I'd not been involved with any CSpell work before writing the pipeline job for contrib.
I will push an initial test, but it may fail. The cspell job uses
$CI_PROJECT_DIR/$_WEB_ROOT
but we only reference_WEB_ROOT
in the script. We will see. - Status changed to Needs review
5 months ago 12:57pm 3 July 2024 - 🇬🇧United Kingdom jonathan1055
Testing at default "current" 10.3
https://git.drupalcode.org/project/scheduler/-/jobs/2023978#L33
The array is written out the log, you can see the 'drupal' dictionary has been added ok. Also the .cspell.json is written to the log for good measure. This debug will be removed when all done.Testing with
_TARGET_CORE: 10.1
https://git.drupalcode.org/project/scheduler/-/jobs/2024171#L36
All works as expected. There are only two entries in the custom dictionaries array, instead of three.Ready for review. If some else also wants to test, use
- project: issue/gitlab_templates-3458411 ref: 3458411-check-for-dictionary-txt
and
variables: _CURL_TEMPLATES_REPO: issue/gitlab_templates-3458411 _CURL_TEMPLATES_REF: 3458411-check-for-dictionary-txt
- 🇦🇺Australia mstrelan
IMHO we should add file_exists around every file that's loaded from the prepare script rather than having a special case for this one file.
- Status changed to Needs work
5 months ago 8:34am 4 July 2024 - 🇪🇸Spain fjgarlin
Agree. A generic loop with "file_exists" on the files that we are trying would be best here.
- Status changed to Needs review
5 months ago 7:55am 5 July 2024 - 🇬🇧United Kingdom jonathan1055
I've pushed a change to test all of the potential dictionary files. This also means we do not need the
touch .cspell-project-words.txt
in the job script. - 🇪🇸Spain fjgarlin
The code looks good. Can you re-trigger a pipeline (as in #9) to make sure that it's still working as expected? Once that's done and works, I'm happy for it to go directly to RTBC.
- 🇬🇧United Kingdom jonathan1055
Yes I had already started one :-)
Test with core 10.1 - two files found because the project has its own dictionary
https://git.drupalcode.org/project/scheduler/-/jobs/2040812#L37Test with core 10.3 - thre files found
https://git.drupalcode.org/project/scheduler/-/jobs/2040933#L39I would also like to test when the project does not have its own dictionary, given that the
touch
is now deleted. - 🇪🇸Spain fjgarlin
Great! I'll wait for that test then. Once done, feel free to set it as RTBC.
- 🇬🇧United Kingdom jonathan1055
Test with
.cspell-project-words.txt
removed. The job runs fine, ends amber due to spelling, but the script output is as expected.
https://git.drupalcode.org/project/scheduler/-/jobs/2041044#L39I will remove the debug, before you merge.
- Status changed to RTBC
5 months ago 8:46am 5 July 2024 -
fjgarlin →
committed 2e4711aa on main authored by
jonathan1055 →
Issue #3458411 by jonathan1055, fjgarlin, mstrelan: CSpell fails when...
-
fjgarlin →
committed 2e4711aa on main authored by
jonathan1055 →
- Status changed to Fixed
5 months ago 9:39am 5 July 2024 Automatically closed - issue fixed for 2 weeks with no activity.