- Issue created by @nicxvan
- πΊπΈUnited States xjm
Defaulting to -1 is probably bad for CI, but an option would be nice.
- Merge request !12351Pass in memory limit -1 if --memory-unlimited is set β (Closed) created by nicxvan
- πΊπΈUnited States xjm
Retitling to make it clear we are not, in fact, trying to take down GitLab.
- πΊπΈUnited States smustgrave
Seems like a good improvement for developers.
- π¬π§United Kingdom alexpott πͺπΊπ
I think we should remove the output as it is not telling you much and I'm not sure that it is helpful.
- π¬π§United Kingdom alexpott πͺπΊπ
If this helps a committer commit then +1 - I think the maintenance burden is light and if PHPStan stops supporting the option it'll tell us with an easy error to fix. Also happy to merge https://github.com/alexpott/d8githooks/pull/34/commits/6c03a0ceae34850a9... once this lands.
- πΊπΈUnited States nicxvan
Do you mean the print statements?
I had thought it would be helpful to clarify that memory limit is set since i assume most core committers use your precommit hooks and might not see the issue.
I'm happy to remove it too, just clarifying.
- π¬π§United Kingdom alexpott πͺπΊπ
Yep the print statements - I'm not sure they add anything.
- πΊπΈUnited States xjm
Thanks @alexpott! (@alexpott is the subsystem maintainer for this code.)
- π¬π§United Kingdom alexpott πͺπΊπ
looks good to me... will merge once this rtbc.
- πΊπΈUnited States xjm
I had thought it would be helpful to clarify that memory limit is set since i assume most core committers use your precommit hooks and might not see the issue.
We are a small group and whoever commits the followup to the git hooks will probably just tell the team. :)
I'll try to manually test this together with the PR later.
- πΊπΈUnited States smustgrave
Feedback from @alexpott appears to be addressed.
- πΊπΈUnited States xjm
Sorry, it was NR for manual testing with the upstream PR. I should have been explicit. I can do this, but am also fine for someone else to if they beat me to it.
- πΊπΈUnited States xjm
Tested manually.
Without fix
- Locally setting
memory_limit = 256M
- Reverting π PHPStan baseline is out of sync Active .
- Applying patch from that issue.
- Attempt to commit it (including running pre-commit checks).
Result:
Running PHPStan on *all* files. PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 181264717 bytes) in phar:///Users/xjm/git/maintainer/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/ResultCache/ResultCacheManager.php on line 172 Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 181264717 bytes) in phar:///Users/xjm/git/maintainer/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/ResultCache/ResultCacheManager.php on line 172 PHPStan process crashed because it reached configured PHP memory limit: 256M Increase your memory limit in php.ini or run PHPStan with --memory-limit CLI option. PHPStan: failed
With fix
- Locally setting
memory_limit = 256M
- Reverting π PHPStan baseline is out of sync Active .
- Committing the MR from this issue.
- Fetching the latest changes in the d8githooks
- Manually patching
precommit
in the d8githooks with the flag from that MR and committing the result. - Recommitting the patch from the baseline update (with precommit checks).
Result: Baseline update committed with full PHPStan scan.
Now it is RTBC. :)
- Locally setting
- π¬π§United Kingdom alexpott πͺπΊπ
Committed and pushed 2ffd3412fe7 to 11.x and 4842c65b535 to 11.2.x and ca127551d4f to 10.6.x and 642eb99e04e to 10.5.x. Thanks!
Backported to 10.5.x as this is non-runtime code and it does not hurt to have everything in sync.
-
alexpott β
committed 642eb99e on 10.5.x
Issue #3529507 by nicxvan, xjm, alexpott: Allow setting memory limit to...
-
alexpott β
committed 642eb99e on 10.5.x
-
alexpott β
committed ca127551 on 10.6.x
Issue #3529507 by nicxvan, xjm, alexpott: Allow setting memory limit to...
-
alexpott β
committed ca127551 on 10.6.x
-
alexpott β
committed 4842c65b on 11.2.x
Issue #3529507 by nicxvan, xjm, alexpott: Allow setting memory limit to...
-
alexpott β
committed 4842c65b on 11.2.x
-
alexpott β
committed 2ffd3412 on 11.x
Issue #3529507 by nicxvan, xjm, alexpott: Allow setting memory limit to...
-
alexpott β
committed 2ffd3412 on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.