stable

Clone or download

Read-only

request #17901: Allow Psalm to use its cache

Psalm has a cache to save some time on repeated analysis. This is especially interesting in development situations where you want to get a fresh report after a few changes (e.g. during a refactoring). However due to the uncommon architecture of Tuleap in comparison of "classic" PHP applications Psalm invalidates the cache each run so we never get the chance to benefit from it. Psalm does that whenever the lockfile has changed or is not present [0] [1] to avoid weird issues after an upgrade (or an upgrade of one of its dependencies like nikic/php-parser). In the case of Tuleap the lockfile is never found because it is not located at a standard path [2]. To solve that and benefit from the cache the lockfile of the Tuleap core is symlinked to the root of the repository. Successive executions of Psalm should now benefit from the cache, for example: First run $> make psalm FILES=plugins/oauth2_server/include/ Checks took 27.70 seconds and used 1,077.478MB of memory Second run $> make psalm FILES=plugins/oauth2_server/include/ Checks took 6.80 seconds and used 1,078.469MB of memory [0] https://github.com/vimeo/psalm/blob/4.0.1/src/Psalm/Internal/Provider/ProjectCacheProvider.php#L71 [1] https://github.com/vimeo/psalm/blob/4.0.1/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php#L318 [2] https://github.com/vimeo/psalm/blob/4.0.1/src/Psalm/Internal/Composer.php#L35 Change-Id: I4759f8cc8f8d7231a6c1ea6b41dab8d5ac04d61f

Modified Files

Name
A composer.lock +1 −0 Go to diff View file
M tools/rpm/tuleap.rhel6.spec +1 −0 Go to diff View file
M tools/rpm/tuleap.rhel7.spec +1 −0 Go to diff View file