Updated: Comment #N

Problem/Motivation

We have various compiler passes that build lists based on service tags, or add services to an add() call on another service, or do stuff like that. Cool.

We have a compiler pass that lets modules alter the services that are registered, including removing them. Cool.

The alter pass happens after most of the lists are built. Not cool. That means the lists are potentially wrong, and all kinds of fatal errors happen on missing service IDs and stuff.

Proposed resolution

Make the alter pass the first one to fire. That way, the list-building passes are all operating on a fully-prepared container. Easy peasy.

The attached patch just changes the compiler order, and adds a doc note to say that it has to come first.

Remaining tasks

Commit this?

User interface changes

None.

API changes

None.

CommentFileSizeAuthor
alter-providers-early.patch1.47 KBCrell

Comments

Crell’s picture

Title: ModifyProviderInterface needs to be the first compiler pass » ServiceModifierInterface needs to be the first compiler pass

Fix title, duh.

katbailey’s picture

Status: Needs review » Reviewed & tested by the community

No brainer.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.