Skip to content
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

[FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes #21381

Merged
merged 1 commit into from Jan 24, 2017

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Jan 23, 2017

Q A
Branch? 3.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #21339
License MIT
Doc PR -

This PR basically reverts #20601 and wires "annotations.cached_reader" later, so that any compiler passes needing "annotation_reader" at compile time don't get any cache - anyway, it's useless at compile time.

@fabpot
Copy link
Member

fabpot commented Jan 23, 2017

Is it possible to some tests? Because I fear we can get regressions on this one.

@nicolas-grekas
Copy link
Member Author

Test added. Without the patch, the test suite fails with many Constructing service "cache.annotations" from a parent definition is not supported at build time.

@fabpot
Copy link
Member

fabpot commented Jan 24, 2017

Thank you @nicolas-grekas.

@fabpot fabpot merged commit e59f0e0 into symfony:3.2 Jan 24, 2017
fabpot added a commit that referenced this pull request Jan 24, 2017
…fore removing passes (nicolas-grekas)

This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21339
| License       | MIT
| Doc PR        | -

This PR basically reverts #20601 and wires "annotations.cached_reader" later, so that any compiler passes needing "annotation_reader" at compile time don't get any cache - anyway, it's useless at compile time.

Commits
-------

e59f0e0 [FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes
@nicolas-grekas nicolas-grekas deleted the no-annot branch January 24, 2017 16:33
@stof
Copy link
Member

stof commented Jan 24, 2017

this is wrong, as it changes the object graph after optimizations, which may change the allowed inlining.

Instead it should stay a pass registered before optimizations, but with a very low priority

@stof
Copy link
Member

stof commented Jan 24, 2017

in practice, adding more compiler passes after optimization should be quite rare, as changes done in them may break previous optimizations

@nicolas-grekas
Copy link
Member Author

Not sure to get what you mean. To me, the graph is computed in removing passes, by AnalyzeServiceReferencesPass, so this won't be an issue.
But if you spotted a broken case, could you please tell me how to reproduce/test it?

@fabpot fabpot mentioned this pull request Feb 6, 2017
fabpot added a commit that referenced this pull request Feb 12, 2017
… bootstrap (nicolas-grekas)

This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21549
| License       | MIT
| Doc PR        | -

Related to #21381 which disabled any cache at bootstrap.
Instead, this wires ArrayCache during bootstrapping, then swaps the cache provider for the real one.

Commits
-------

f90f53e [FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap
fabpot added a commit that referenced this pull request Jun 8, 2018
…ss (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] remove dead code in CachePoolClearerPass

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This code had been removed in #21381, I don't know why it's still there but this is dead code, as the `cache.annotations` service inherits a logger from the parent `cache.system` service.

Commits
-------

974991f [FrameworkBundle] remove dead code in CachePoolClearerPass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants