Lazy services (backed by proxy classes) can't be `backend_overridable` because the proxy service isn't tagged

Created on 15 July 2024, about 2 months ago

Problem/Motivation

If you want to override a service that advertises itself as backend_overridable, but that service happens to be lazy (with lazy: true in its definition, with a proxy class generated) you can't override it, because ProxyServicesPass discards the service's tags. BackendCompilerPass therefore doesn't find it.

This would have worked when backend overrides were first introduced, however #2454287: Make a couple of services lazy β†’ made this service lazy.

Steps to reproduce

Override a lazy, backend-overridable service as I am doing over in πŸ› Race conditions with lock/cache using non-database storage - add a non-transactional database connection Needs work . It doesn't work.

Proposed resolution

Retain the original tags in the replaced definition. Ideally, we'd stop doing all this proxy class nonsense as part of πŸ“Œ DX: Creating lazy services is too difficult/obscure/bespoke/brittle Active .

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated 31 minutes ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bradjones1 Digital Nomad Life

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024