Rebuild dictionary.txt

Created on 23 May 2024, 7 months ago
Updated 31 May 2024, 7 months ago

Problem/Motivation

The dictionary is out of sync, possibly due to cspell being updated.

Steps to reproduce

Proposed resolution

Rebuild the dictionary

Remaining tasks

Run yarn spellcheck:make-dict and make an MR

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
OtherΒ  β†’

Last updated 1 day ago

Created by

πŸ‡³πŸ‡ΏNew Zealand quietone

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @quietone
  • Merge request !8242rebuild dictionary β†’ (Closed) created by quietone
  • Pipeline finished with Success
    7 months ago
    Total: 701s
    #187026
  • Status changed to Needs review 7 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone
  • Status changed to Needs work 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    So I ran locally on 11.x but I got 36 changes.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This is the file I ended up with. Wasn't sure if best to start a new MR. Didn't want to alter @quietone's yet

  • Status changed to Needs review 7 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    It probably would be better to update the existing MR so that your suggestion is tested.

    I rebased and rebuilt the dictionary. There were no changes to the dictionary.

    The file in #5 is smaller and one of the words it does not contain, which the MR does, is 'uninstallation'. Searching core shows that there are many instances of this word. I don't see how #5 can not have the word. And yarn cspell trace uninstallation shows that the only dictionary that Drupal core uses that has that word is 'dictionary.txt'.

    @smustgrave, can you check your results again.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Switched to this branch and ran npm run spellcheck:make-dict and got more changes. I pushed to the MR and still appears green

  • Pipeline finished with Success
    7 months ago
    Total: 552s
    #191885
  • Status changed to Needs work 7 months ago
  • The Needs Review Queue Bot β†’ tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

  • Status changed to Needs review 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Not sure what bot found

  • Status changed to Needs work 7 months ago
  • The Needs Review Queue Bot β†’ tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    @smustgrave, The passing of tests is meaningless in this case. If you look at the test output, cspell is not checking any files or rebuilding the dictionary.
    CSpell: Files checked: 0, Issues found: 0 in 0 files. For now, we have to do manual testing to confirm results.

    I applied the latest diff and ran yarn spellcheck:core on core and got many errors, including my example of 'uninstallation'.

    I am not sure yet what the difference here is. Since the lastest patch has removed 'uninstallation' lets find out where that word is defined.

    For me, the following shows it is not defined in any dictionary being used by Drupal core.

    $ yarn cspell trace uninstallation
    Word           F Dictionary                Dictionary Location
    uninstallation - [flagWords]*              From Settings `flagWords`
    uninstallation - [ignoreWords]*            From Settings `ignoreWords`
    uninstallation - [suggestWords]*           From Settings `suggestWords`
    uninstallation - [words]*                  From Settings `words`
    uninstallation - aws*                      node_modules/@cspell/dict-aws/dict/aws.txt
    uninstallation - companies*                node_modules/@cspell/dict-companies/dict/companies.txt
    uninstallation - computing-acronyms*       node_modules/@cspell/dict-software-terms/dict/computing-acronyms.txt
    uninstallation - cryptocurrencies*         node_modules/@cspell/dict-cryptocurrencies/dict/cryptocurrencies.txt
    uninstallation - dictionary*               misc/cspell/dictionary.txt
    uninstallation - drupal*                   misc/cspell/drupal-dictionary.txt
    uninstallation - en_us*                    node_modules/@cspell/dict-en_us/en_US.trie.gz
    uninstallation * en-gb                     node_modules/@cspell/dict-en-gb/en_GB.trie.gz
    uninstallation - en-us-common-misspelling* node_modules/@cspell/dict-en-common-misspellings/dict-en-us.yaml
    uninstallation - filetypes*                node_modules/@cspell/dict-filetypes/filetypes.txt.gz
    uninstallation - fonts*                    node_modules/@cspell/dict-fonts/dict/fonts.txt
    uninstallation - html*                     node_modules/@cspell/dict-html/dict/html.txt
    uninstallation * makefile                  node_modules/@cspell/dict-makefile/dict/makefile.txt
    uninstallation - php*                      node_modules/@cspell/dict-php/dict/php.txt
    uninstallation - public-licenses*          node_modules/@cspell/dict-public-licenses/public-licenses.txt.gz
    uninstallation - softwareTerms*            node_modules/@cspell/dict-software-terms/dict/softwareTerms.txt
    uninstallation - web-services*             node_modules/@cspell/dict-software-terms/dict/webServices.txt

    @smustgrave, can you run the same command and post the output?

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    So I ran npm run vs yarn think that could be a difference?

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Can revert my changes though.

  • Status changed to RTBC 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    So that was it. Yarn vs npm. Tried again and got exactly same as @quietone. Will chalk that up to a lessoned learned personally.

  • Pipeline finished with Success
    7 months ago
    Total: 611s
    #192243
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    @smustgrave, thanks.

    • longwave β†’ committed 3e28e434 on 11.0.x
      Issue #3449356 by quietone, smustgrave: Rebuild dictionary.txt
      
      (cherry...
  • Status changed to Fixed 7 months ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Committed and pushed to 11.x and 11.0.x, thanks!

    The issue isn't entirely clear but I found at least one word in the 10.4.x codebase so I'm assuming this was not meant for backport - if dictionary rebuild is needed there that is better off in a separate issue.

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • πŸ‡¬πŸ‡§United Kingdom jonathan1055

    Just making a note here that removing some of these words from the core dictioinary has caused Contrib cspell jobs to fail at 11.x when they were passing at 10.x. Not a big problem, but it does mean that contrib maintainers now have to add words into a project dictionary file which they may not have had before. A particular example is the word 'mdhash' which was removed in this issue, and it appears in asset files used in Contrib tests. See this thread on Slack, now that contrib pipelines are defaulting to using Core 11.x from this week.

Production build 0.71.5 2024