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

Properly track implicit dependance on __type__ in function calls #5715

Merged
merged 2 commits into from Jun 28, 2023

Conversation

msullivan
Copy link
Member

When passing objects to functions, there is an implicit dependence on
the __type__ field (which may be used for function overloading).
This dependence isn't tracked, so in inheritance cases a computed
that depends on it may be processed before __type__ is inherited.

Fix this by making sure to get __type__ through proper channels.

Fixes #5661.

In addition to actually fixing it, I added a hack that will make
__type__ always be processed first, to work around not easily being
able to repair the expr refs in existing databases. We can drop the hack
on our dev branch immediately, though.
(I tested this flow manually.)

When passing objects to functions, there is an implicit dependence on
the `__type__` field (which may be used for function overloading).
This dependence isn't tracked, so in inheritance cases a computed
that depends on it may be processed before `__type__` is inherited.

Fix this by making sure to get `__type__` through proper channels.

Fixes #5661.

In addition to actually fixing it, I added a hack that will make
`__type__` always be processed first, to work around not easily being
able to repair the expr refs in existing databases. We can drop the hack
on our dev branch immediately, though.
(I tested this flow manually.)
@msullivan msullivan merged commit 3f55d6f into master Jun 28, 2023
21 checks passed
@msullivan msullivan deleted the source-ordering branch June 28, 2023 23:43
msullivan added a commit that referenced this pull request Jun 29, 2023
Remove a hack from #5715 that made the fix work on databases
created prior to the fix.
msullivan added a commit that referenced this pull request Jul 6, 2023
…5715)

When passing objects to functions, there is an implicit dependence on
the `__type__` field (which may be used for function overloading).
This dependence isn't tracked, so in inheritance cases a computed
that depends on it may be processed before `__type__` is inherited.

Fix this by making sure to get `__type__` through proper channels.

Fixes #5661.

In addition to actually fixing it, I added a hack that will make
`__type__` always be processed first, to work around not easily being
able to repair the expr refs in existing databases. We can drop the hack
on our dev branch immediately, though.
(I tested this flow manually.)
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

Successfully merging this pull request may close these issues.

ISE: Self reference in computed using __source__
2 participants