wikipeg (main)

sourcepatches
$ date
Fri Jan 14 13:45:09 UTC 2022

$ git clone file:///srv/git/wikipeg.git repo --depth=1 -b master
Cloning into 'repo'...

$ git config user.name libraryupgrader

$ git config user.email tools.libraryupgrader@tools.wmflabs.org

$ git submodule update --init

$ grr init
Installed commit-msg hook.

$ git show-ref refs/heads/master
56a5d8a74804fb202435bcf01d0efeb901190e69 refs/heads/master

$ composer install
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Updating dependencies (including require-dev)
Package operations: 65 installs, 0 updates, 0 removals
  - Installing squizlabs/php_codesniffer (3.6.1): Loading from cache
  - Installing composer/spdx-licenses (1.5.6): Loading from cache
  - Installing composer/semver (3.2.7): Loading from cache
  - Installing mediawiki/mediawiki-codesniffer (v38.0.0): Loading from cache
  - Installing tysonandre/var_representation_polyfill (0.1.1): Loading from cache
  - Installing symfony/polyfill-php80 (v1.24.0): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.24.0): Loading from cache
  - Installing symfony/polyfill-intl-normalizer (v1.24.0): Loading from cache
  - Installing symfony/polyfill-intl-grapheme (v1.24.0): Loading from cache
  - Installing symfony/polyfill-ctype (v1.24.0): Loading from cache
  - Installing symfony/string (v5.4.2): Loading from cache
  - Installing symfony/deprecation-contracts (v2.5.0): Loading from cache
  - Installing psr/container (1.1.1): Loading from cache
  - Installing symfony/service-contracts (v2.5.0): Loading from cache
  - Installing symfony/polyfill-php73 (v1.24.0): Loading from cache
  - Installing symfony/console (v5.4.2): Loading from cache
  - Installing psr/log (1.1.4): Loading from cache
  - Installing sabre/event (5.1.4): Loading from cache
  - Installing netresearch/jsonmapper (v4.0.0): Loading from cache
  - Installing microsoft/tolerant-php-parser (v0.1.1): Loading from cache
  - Installing phpdocumentor/reflection-common (2.2.0): Loading from cache
  - Installing webmozart/assert (1.10.0): Loading from cache
  - Installing phpdocumentor/type-resolver (1.6.0): Loading from cache
  - Installing phpdocumentor/reflection-docblock (5.3.0): Loading from cache
  - Installing felixfbecker/advanced-json-rpc (v3.2.1): Loading from cache
  - Installing composer/pcre (1.0.0): Loading from cache
  - Installing composer/xdebug-handler (2.0.4): Loading from cache
  - Installing phan/phan (5.2.0): Loading from cache
  - Installing mediawiki/phan-taint-check-plugin (3.3.2): Loading from cache
  - Installing mediawiki/mediawiki-phan-config (0.11.1): Loading from cache
  - Installing mediawiki/minus-x (1.1.1): Loading from cache
  - Installing sebastian/version (3.0.2): Loading from cache
  - Installing sebastian/type (2.3.4): Loading from cache
  - Installing sebastian/resource-operations (3.0.3): Loading from cache
  - Installing sebastian/recursion-context (4.0.4): Loading from cache
  - Installing sebastian/object-reflector (2.0.4): Loading from cache
  - Installing sebastian/object-enumerator (4.0.4): Loading from cache
  - Installing sebastian/global-state (5.0.3): Loading from cache
  - Installing sebastian/exporter (4.0.4): Loading from cache
  - Installing sebastian/environment (5.1.3): Loading from cache
  - Installing sebastian/diff (4.0.4): Loading from cache
  - Installing sebastian/comparator (4.0.6): Loading from cache
  - Installing sebastian/code-unit (1.0.8): Loading from cache
  - Installing sebastian/cli-parser (1.0.1): Loading from cache
  - Installing phpunit/php-timer (5.0.3): Loading from cache
  - Installing phpunit/php-text-template (2.0.4): Loading from cache
  - Installing phpunit/php-invoker (3.1.1): Loading from cache
  - Installing phpunit/php-file-iterator (3.0.6): Loading from cache
  - Installing theseer/tokenizer (1.2.1): Loading from cache
  - Installing nikic/php-parser (v4.13.2): Loading from cache
  - Installing sebastian/lines-of-code (1.0.3): Loading from cache
  - Installing sebastian/complexity (2.0.2): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Loading from cache
  - Installing phpunit/php-code-coverage (9.2.10): Loading from cache
  - Installing doctrine/instantiator (1.4.0): Loading from cache
  - Installing phpspec/prophecy (v1.15.0): Loading from cache
  - Installing phar-io/version (3.1.0): Loading from cache
  - Installing phar-io/manifest (2.0.3): Loading from cache
  - Installing myclabs/deep-copy (1.10.2): Loading from cache
  - Installing phpunit/phpunit (9.5.11): Loading from cache
  - Installing ockcyp/covers-validator (v1.4.0): Loading from cache
  - Installing php-parallel-lint/php-console-color (v0.3): Loading from cache
  - Installing php-parallel-lint/php-console-highlighter (v0.5): Loading from cache
  - Installing php-parallel-lint/php-parallel-lint (v1.3.1): Loading from cache
  - Installing wikimedia/update-history (1.0.1): Loading from cache
tysonandre/var_representation_polyfill suggests installing ext-var_representation (*)
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/event-dispatcher
symfony/console suggests installing symfony/lock
symfony/console suggests installing symfony/process
phan/phan suggests installing ext-ast (Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.14+ is recommended.)
phan/phan suggests installing ext-var_representation (Suggested for converting values to strings in issue messages)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-pcov (*)
phpunit/php-code-coverage suggests installing ext-xdebug (*)
phpunit/phpunit suggests installing ext-soap (*)
phpunit/phpunit suggests installing ext-xdebug (*)
Writing lock file
Generating autoload files
39 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Attempting to npm audit fix
$ npm audit fix --only=dev
added 122 packages from 74 contributors in 2.613s

12 packages are looking for funding
  run `npm fund` for details

fixed 0 of 1 vulnerability in 122 scanned packages
  1 vulnerability required manual review and could not be updated

$ npm audit fix --only=dev
up to date in 0.795s

12 packages are looking for funding
  run `npm fund` for details

fixed 0 of 1 vulnerability in 122 scanned packages
  1 vulnerability required manual review and could not be updated

$ npm audit fix --only=dev
up to date in 0.826s

12 packages are looking for funding
  run `npm fund` for details

fixed 0 of 1 vulnerability in 122 scanned packages
  1 vulnerability required manual review and could not be updated

$ package-lock-lint package-lock.json
Checking package-lock.json

Verifying that tests still pass
$ npm ci
npm WARN prepare removing existing node_modules/ before installation
added 122 packages in 2.436s

$ npm test

> wikipeg@2.0.6-git test /src/repo
> make eslint && make test


generated parser API - 16 ms

    parse - 16 ms
        parses input - 5 ms
        throws an exception on syntax error - 4 ms

        start rule - 1 ms

            when |startRule| is not set - 0 ms
                starts parsing from the first allowed rule - 0 ms

            when |startRule| is set to an allowed rule - 0 ms
                starts parsing from specified rule - 0 ms

            when |startRule| is set to a disallowed start rule - 1 ms
                throws an exception - 1 ms

        tracing - 3 ms

            default tracer - 2 ms
                traces using console.log - 2 ms

            custom tracers - 1 ms

                trace - 1 ms
                    receives tracing events - 1 ms
        accepts custom options - 3 ms

PEG.js API - 70 ms

    buildParser - 70 ms
        builds a parser - 2 ms
        throws an exception on syntax error - 1 ms
        throws an exception on semantic error - 0 ms

        allowed start rules - 16 ms

            when optimizing for parsing speed - 7 ms

                when |allowedStartRules| is not set - 4 ms
                    generated parser can start only from the first rule - 4 ms

                when |allowedStartRules| is set - 3 ms
                    generated parser can start only from specified rules - 3 ms

            when optimizing for code size - 9 ms

                when |allowedStartRules| is not set - 4 ms
                    generated parser can start only from the first rule - 4 ms

                when |allowedStartRules| is set - 5 ms
                    generated parser can start only from specified rules - 5 ms

        intermediate results caching - 16 ms

            when |cache| is not set - 7 ms
                generated parser doesn't cache intermediate parse results - 7 ms

            when |cache| is set to |false| - 4 ms
                generated parser doesn't cache intermediate parse results - 4 ms

            when |cache| is set to |true| - 5 ms
                generated parser caches intermediate parse results - 5 ms

        tracing - 8 ms

            when |trace| is not set - 3 ms
                generated parser doesn't trace - 3 ms

            when |trace| is set to |false| - 2 ms
                generated parser doesn't trace - 2 ms

            when |trace| is set to |true| - 3 ms
                generated parser traces - 3 ms

        output - 24 ms

            when |output| is not set - 3 ms
                returns generated parser object - 3 ms

            when |output| is set to |"parser"| - 5 ms
                returns generated parser object - 5 ms

            when |output| is set to |"source"| - 8 ms
                returns generated parser source code - 8 ms

            when |headerComment| is set to |/*
 * some comment
 */| - 5 ms
                returns generated parser source code with that comment - 5 ms

            when |headerComment| is set to |/*
 * some comment
 */| and |language| is set to |php| - 3 ms
                returns generated php parser source code with that comment - 3 ms
        accepts custom options - 3 ms

plugin API - 17 ms

    use - 17 ms
        is called for each plugin - 4 ms
        receives configuration - 3 ms
        receives options - 2 ms
        can replace parser - 6 ms
        can change compiler passes - 0 ms
        can change options - 2 ms

generated parser behavior - 335 ms

    with options { cache : false } - 171 ms

        initializer - 15 ms
            executes the code before parsing starts - 3 ms

            available variables and functions - 12 ms
                |parser| contains the parser object - 4 ms
                |options| contains options - 8 ms

        rule - 14 ms
            doesn't cache rule match results - 4 ms

            when the expression matches - 2 ms
                returns its match result - 2 ms

            when the expression doesn't match - 8 ms

                without display name - 2 ms
                    reports match failure and doesn't record any expectation - 2 ms

                with display name - 6 ms
                    reports match failure and records an expectation of type "other" - 3 ms
                    discards any expectations recorded when matching the expression - 3 ms

        positive semantic predicate - 21 ms

            initializer variables & functions - 5 ms
                can access variables defined in the initializer - 3 ms
                can access functions defined in the initializer - 2 ms

            available variables & functions - 16 ms
                |parser| contains the parser object - 3 ms
                |options| contains options - 2 ms
                |location| returns current location info - 11 ms

        negative semantic predicate - 16 ms

            initializer variables & functions - 5 ms
                can access variables defined in the initializer - 2 ms
                can access functions defined in the initializer - 3 ms

            available variables & functions - 11 ms
                |parser| contains the parser object - 3 ms
                |options| contains options - 2 ms
                |location| returns current location info - 6 ms

        action - 27 ms

            initializer variables & functions - 5 ms
                can access variables defined in the initializer - 2 ms
                can access functions defined in the initializer - 3 ms

            available variables & functions - 22 ms
                |parser| contains the parser object - 3 ms
                |options| contains options - 3 ms
                |text| returns text matched by the expression - 3 ms
                |location| returns location info of the expression - 7 ms
                |expected| terminates parsing and throws an exception - 3 ms
                |error| terminates parsing and throws an exception - 3 ms

        error reporting - 32 ms

            found string reporting - 4 ms
                reports found string correctly at the end of input - 2 ms
                reports found string correctly in the middle of input - 2 ms

            message building - 16 ms
                builds message correctly with no alternative - 2 ms
                builds message correctly with one alternative - 2 ms
                builds message correctly with multiple alternatives - 4 ms
                builds message correctly at the end of input - 6 ms
                builds message correctly in the middle of input - 2 ms

            position reporting - 12 ms
                reports position correctly at the end of input - 2 ms
                reports position correctly in the middle of input - 2 ms
                reports position correctly with trailing input - 1 ms
                reports position correctly in complex cases - 7 ms

        complex examples - 46 ms
            handles arithmetics example correctly - 12 ms
            handles non-context-free language correctly - 26 ms
            handles nested comments example correctly - 8 ms

    with options { cache : true } - 164 ms

        initializer - 10 ms
            executes the code before parsing starts - 3 ms

            available variables and functions - 7 ms
                |parser| contains the parser object - 3 ms
                |options| contains options - 4 ms

        rule - 19 ms
            caches rule match results - 5 ms

            when the expression matches - 2 ms
                returns its match result - 2 ms

            when the expression doesn't match - 12 ms

                without display name - 2 ms
                    reports match failure and doesn't record any expectation - 2 ms

                with display name - 10 ms
                    reports match failure and records an expectation of type "other" - 3 ms
                    discards any expectations recorded when matching the expression - 7 ms

        positive semantic predicate - 19 ms

            initializer variables & functions - 5 ms
                can access variables defined in the initializer - 2 ms
                can access functions defined in the initializer - 3 ms

            available variables & functions - 14 ms
                |parser| contains the parser object - 3 ms
                |options| contains options - 3 ms
                |location| returns current location info - 8 ms

        negative semantic predicate - 20 ms

            initializer variables & functions - 6 ms
                can access variables defined in the initializer - 3 ms
                can access functions defined in the initializer - 3 ms

            available variables & functions - 14 ms
                |parser| contains the parser object - 3 ms
                |options| contains options - 3 ms
                |location| returns current location info - 8 ms

        action - 36 ms

            initializer variables & functions - 6 ms
                can access variables defined in the initializer - 3 ms
                can access functions defined in the initializer - 3 ms

            available variables & functions - 30 ms
                |parser| contains the parser object - 2 ms
                |options| contains options - 3 ms
                |text| returns text matched by the expression - 3 ms
                |location| returns location info of the expression - 7 ms
                |expected| terminates parsing and throws an exception - 4 ms
                |error| terminates parsing and throws an exception - 11 ms

        error reporting - 34 ms

            found string reporting - 7 ms
                reports found string correctly at the end of input - 3 ms
                reports found string correctly in the middle of input - 4 ms

            message building - 14 ms
                builds message correctly with no alternative - 2 ms
                builds message correctly with one alternative - 1 ms
                builds message correctly with multiple alternatives - 4 ms
                builds message correctly at the end of input - 5 ms
                builds message correctly in the middle of input - 2 ms

            position reporting - 13 ms
                reports position correctly at the end of input - 2 ms
                reports position correctly in the middle of input - 2 ms
                reports position correctly with trailing input - 1 ms
                reports position correctly in complex cases - 8 ms

        complex examples - 26 ms
            handles arithmetics example correctly - 9 ms
            handles non-context-free language correctly - 10 ms
            handles nested comments example correctly - 7 ms

compiler pass |removeProxyRules| - 1 ms

    when a proxy rule isn't listed in |allowedStartRules| - 0 ms
        updates references and removes it - 0 ms

    when a proxy rule is listed in |allowedStartRules| - 1 ms
        updates references but doesn't remove it - 1 ms

compiler pass |reportLeftRecursion| - 14 ms
    reports infinite loops for zero_or_more - 3 ms
    reports infinite loops for one_or_more - 4 ms
    computes empty string matching correctly - 7 ms

compiler pass |reportLeftRecursion| - 11 ms
    reports direct left recursion - 0 ms
    reports indirect left recursion - 1 ms

    in sequences - 10 ms
        reports left recursion if all preceding elements match empty string - 0 ms
        doesn't report left recursion if some preceding element doesn't match empty string - 1 ms
        computes empty string matching correctly - 9 ms

compiler pass |reportMissingRules| - 0 ms
    reports missing rules - 0 ms

PEG.js grammar parser - 38 ms
    parses Grammar - 2 ms
    parses Initializer - 1 ms
    parses Rule - 1 ms
    parses Expression - 1 ms
    parses ChoiceExpression - 0 ms
    parses ActionExpression - 2 ms
    parses SequenceExpression - 1 ms
    parses LabeledExpression - 0 ms
    parses PrefixedExpression - 0 ms
    parses PrefixedOperator - 1 ms
    parses SuffixedExpression - 0 ms
    parses SuffixedOperator - 2 ms
    parses PrimaryExpression - 2 ms
    parses RuleReferenceExpression - 0 ms
    parses SemanticPredicateExpression - 1 ms
    parses SemanticPredicateOperator - 0 ms
    parses WhiteSpace - 2 ms
    parses LineTerminator - 0 ms
    parses LineTerminatorSequence - 1 ms
    parses Comment - 0 ms
    parses MultiLineComment - 1 ms
    parses MultiLineCommentNoLineTerminator - 1 ms
    parses SingleLineComment - 1 ms
    parses Identifier - 0 ms
    parses IdentifierName - 0 ms
    parses IdentifierStart - 1 ms
    parses IdentifierPart - 2 ms
    parses LiteralMatcher - 0 ms
    parses StringLiteral - 2 ms
    parses DoubleStringCharacter - 2 ms
    parses SingleStringCharacter - 0 ms
    parses CharacterClassMatcher - 1 ms
    parses ClassCharacterRange - 1 ms
    parses ClassCharacter - 1 ms
    parses LineContinuation - 0 ms
    parses EscapeSequence - 1 ms
    parses CharacterEscapeSequence - 0 ms
    parses SingleEscapeCharacter - 1 ms
    parses NonEscapeCharacter - 0 ms
    parses HexEscapeSequence - 1 ms
    parses UnicodeEscapeSequence - 0 ms
    parses AnyMatcher - 0 ms
    parses CodeBlock - 0 ms
    parses Code - 1 ms
    parses __ - 1 ms
    parses _ - 2 ms
    parses EOS - 1 ms
    parses EOF - 0 ms

Finished in 0.517 seconds
172 tests, 477 assertions, 0 failures, 0 skipped


Running language-independent tests against PHP
SUCCESS: 608 / 608 assertions were successful
node tests/javascript/runCommonTests.js
Running language-independent tests against JavaScript
SUCCESS: 608 / 608 assertions were successful

$ package-lock-lint package-lock.json
Checking package-lock.json

$ git add .

$ git commit -F /tmp/tmp53rm2hqp
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

composer dependencies

Dependencies
Development dependencies

npm dependencies

Development dependencies

Logs

Source code is licensed under the AGPL.