-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#270 Removing a provider breaks Acorn until removing the packages cache #295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! 🙏
I haven't tested this, but I noticed an issue with your approach. Let me know if you want me to jump in and help get this over the finish line or if you prefer to tackle it.
Yeah that would be great! You jump in and get it over the finish line. 😀 I just wanted to get the ball rolling with what I found. |
@QWp6t Sry ping 😂 |
@QWp6t Sry ping again |
This PR doesn't work for me 👀 Steps tested on a regular Bedrock install:
|
🧑💻 Do not throw an exception for missing providers while in console
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
fixes #270
tested on radicle
needs more testing in other contexts
did some digging and laravels default method is not invoking a new Process of the command via cli. Its removing the cache files in the same instance.
https://github.com/laravel/framework/blob/e217dca49e20cd2840970f8d307c8392012bc5be/src/Illuminate/Foundation/ComposerScripts.php#L48-L69
While acorn is initiating new Process of wp acorn cli command. It fails returning exit code 1. Since the Provider may have been removed when executing.
acorn/src/Roots/Acorn/ComposerScripts.php
Line 21 in b020038
acorn/src/Roots/Acorn/Console/Console.php
Lines 9 to 17 in b020038
acorn/src/Roots/Acorn/Console/Console.php
Lines 99 to 110 in b020038
Possible solution.
Reuse laravels method and make sure
getCachedConfigPath() resolves to
{projectpath}/storage/framework/cache/config.php
getCachedServicesPath() resolves to
{projectpath}/storage/framework/cache/services.php
getCachedPackagesPath() resolves to
{projectPath}/storage/framework/cache/packages.php
instead of
{projectpath}/bootstrap/cache/config.php
{projectpath}/bootstrap/cache/services.php
{projectPath}/bootstrap/cache/packages.php