feat(compilation): force asset compilation on flush instead of deletion#3582
feat(compilation): force asset compilation on flush instead of deletion#3582
Conversation
|
Technically, isn't the only problem with locale being unavailable from non-web processes? if so I think we should only commit that rather than everything else and add a comment mentionning why. |
|
It is, but I think changing this would make the class do what it's expected to do compared to what it does now. |
|
That's just a naming problem though. The class is used a lot throughout the code-base for many post-operations (ext enable, disable, settings save, cache clearing ...etc) in addition to the fact that certain extensions call this as well (package manager). There was probably a good reason behind why it flushes assets to delay recompilation to a later time/process. imo, the main problem here is that the console needs assets to be compiled but doesn't trigger compilation itself. Then the safer solution is to adapt the console to trigger asset compilation. |
|
The fear to change something that works that it might break something unforeseen. I think it's broken as is and I think we need to modify this logic to do asset compilation as soon as possible. Or we need to move compilation away from the http stack to the application bootstrapping or we need to make compilation smarter about it's contextual use (compile languages when it's needed versus compile js/css only for web). |
|
Created an issue for it (#3680), I still believe we should fix the specific issue at hand rather than make radical changes to the behavior. We can revisit refactoring the behavior itself when we have a clear plan of why and how. But the bug IMO should be tackled with minimal & changes consistent with the current codebase. |
|
I accept your wisdom in this @SychO9. |
Changes proposed in this pull request:
Instead of deleting compiler generated assets we will now rebuild them on cache clear.
The reason we're doing this is this scenario mainly:
Reviewers should focus on:
Necessity
Confirmed
composer test).Required changes: