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

Dispatch issue during migration from object to resource dispatchers. #200

Open
amcgregor opened this issue Dec 22, 2022 · 1 comment
Open

Comments

@amcgregor
Copy link
Member

In a very non-obvious chain of misfortune, attempting to adapt some WebCore 1 endpoints to WebCore 2 semantics resulted in very strange issues. Specifically, attempting to navigate below a collection, to a resource, resulted in the collection itself loading rather than the resource.

Root cause: __call__ (object dispatch replacement for WebCore 1's __default__) was left behind and was eagerly used (is_endpoint=True) when the correct method should have been get. There may be a boundary issue where object dispatch is making an authoritative claim about the suitability of the handler, despite needing dispatch transition.

An MCVE has been produced; __call__ will be called with the remaining path elements in preference to __getitem__ and resource dispatch.

@amcgregor
Copy link
Member Author

amcgregor commented Dec 22, 2022

Required corrections across two packages:

The second was difficult to initially see as this code path is only used when .replace()ing tuple elements. The MCVE operates correctly using checkouts of these commits.

Visual Proof

Screenshot 2022-12-22 at 14 35 40

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

No branches or pull requests

1 participant