-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle][ContainerLint] Keep "removing" compiler passes #34502
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
Conversation
For the record, this logic was borrowed from
Because the container used by the command is dumped by |
Thank you @fancyweb. |
…passes (fancyweb) This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle][ContainerLint] Keep "removing" compiler passes | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #34498 | License | MIT | Doc PR | - Removing "removing" compiler passes when debug is off (why only in this case btw?) means that the container is never cleaned (the important thing being the "remove unused definitions" pass), leaving it in a "dirty" state. What is the point of testing a container that is different than the one that will be used anyway? 🤔 Making this truely work btw means that 100% of Symfony's declared services must end up valid whether they are used or not and in all combinations possible. I guess that should be the goal but from what I could test in the last hour, that will be a lot of work. However, there are definitely some fixes to do in our services declarations that we can detect thanks to this "bug". Commits ------- 59d6771 [FrameworkBundle][ContainerLint] Keep removing compiler passes
… the lint container command and its associated pass (fancyweb) This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #34858 | License | MIT | Doc PR | - We remove the "removing" passes again and to avoid what #34502 fixed, we skip validating the "live" container removed ids in the pass (the "live" container is supposed to have the same definitions than the "debug container" one). Logically, an errored service cannot pass the "live" container compilation without being removed. Consequently, it also skips the errored services that ended up being removed in the "live" container. Commits ------- a0f581b [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass
… the lint container command and its associated pass (fancyweb) This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | symfony/symfony#34858 | License | MIT | Doc PR | - We remove the "removing" passes again and to avoid what symfony/symfony#34502 fixed, we skip validating the "live" container removed ids in the pass (the "live" container is supposed to have the same definitions than the "debug container" one). Logically, an errored service cannot pass the "live" container compilation without being removed. Consequently, it also skips the errored services that ended up being removed in the "live" container. Commits ------- a0f581ba9d [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass
… the lint container command and its associated pass (fancyweb) This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | symfony/symfony#34858 | License | MIT | Doc PR | - We remove the "removing" passes again and to avoid what symfony/symfony#34502 fixed, we skip validating the "live" container removed ids in the pass (the "live" container is supposed to have the same definitions than the "debug container" one). Logically, an errored service cannot pass the "live" container compilation without being removed. Consequently, it also skips the errored services that ended up being removed in the "live" container. Commits ------- a0f581ba9d [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass
Removing "removing" compiler passes when debug is off (why only in this case btw?) means that the container is never cleaned (the important thing being the "remove unused definitions" pass), leaving it in a "dirty" state. What is the point of testing a container that is different than the one that will be used anyway? 🤔
Making this truely work btw means that 100% of Symfony's declared services must end up valid whether they are used or not and in all combinations possible. I guess that should be the goal but from what I could test in the last hour, that will be a lot of work. However, there are definitely some fixes to do in our services declarations that we can detect thanks to this "bug".