-
Notifications
You must be signed in to change notification settings - Fork 214
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
Fix for GET with projections #819
Conversation
You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/819/ |
I think this fix is headed in the right direction because it does fix the issue I reported in #812 (at least for the "Language Authoring" spec, but after testing it a with the Azure.Core versioning PR (https://github.com/Azure/cadl-azure/pull/1754), I see the following error while running the
It seems like we might need to investigate the source of this error before we can merge this PR. The weird thing is that I can't really even tell by looking at the Form Recognizer spec what might be triggering this. We're in luck, though: this test is failing with the same error so we might be able to clamp down using that test and figure out why the error occurs. |
I missed this while I was away and am hitting something related now. It seems suspect that getEffectiveModelType is finding unprojected types for a projected type. It appears that we are not fixing up parent .model and .sourceProperty when projecting. However, so far when I do that more things break :( |
#1069 tracks this now |
Tentative fix #812, as I ran out of time to fix it properly. The root cause of this issue seems to be that
getEffectiveType
doesn't respect projections. The fix I think we should do is to update gET to consult the program's current projection and map the type there. I think @nguerrera should comment on a proper fix, so this is a minimally invasive and somewhat garbage-y wrapper around gET that projects any return value.