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

ServiceList Does Not Preserve Keys #21

Open
XedinUnknown opened this issue Oct 31, 2023 · 1 comment
Open

ServiceList Does Not Preserve Keys #21

XedinUnknown opened this issue Oct 31, 2023 · 1 comment

Comments

@XedinUnknown
Copy link
Member

The ServiceList class is very useful for combining several services into a list. One of its useful abilities is to map them to keys that have meaning, rather than just the numeric index in the service definition list.

Unfortunatley, the mapping doesn't seem to work: it uses the olde resolveDeps(), despite useing the ResolveKeysCapableTrait.

Moreover, ResolveKeysCapableTrait#resolveKeys(), which should presulably be used to preserve the keys, uses resolveDeps() directly, without changing anything. And that, as we know, does not preserve keys.

Suggested Solution

It seems that the ResolveKeysCapableTrait was added in order to distinguish between key-knowing and key-agnostic resolution. Probably, just forgot to change ResolveKeysCapableTrait::resolveDeps() to use the key rather than [] (push).

@mecha
Copy link
Member

mecha commented Nov 7, 2023

I don't think we forgot to update resolveDeps(). Rather, I think we forgot to update ServiceList.

See here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants