-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 Go to Definition to a source-generated file #48348
Fix Go to Definition to a source-generated file #48348
Conversation
dotnet#47047 changed the logic for the file name and path we generate, but we were no longer ensuring the temporary directory existed prior to trying to create the file within it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be some code somewhere that checks if the new option is turned on, and navigates to the real files that the compiler created?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, I did test this, but it went through a bunch of iterations so I guess it got broken after the fact? Anyway, good catch and thanks for the fix.
@davidwengier: @chsienki and I discussed this a bit and we decided to keep this as is for now. There's a few challenges:
So we decided that the IDE does magic and only does magic, and the compiler only does regular outputted files and we don't get in the way. I imagine that we might do some heuristics down the road where we try to use the prior generated results in the IDE to speed things up, but we'd still use our file identity to avoid the other issues above. |
@chsienki: if I recall, I think there was some code review feedback you might have tried addressing which tried simplifying the path generation logic because we were otherwise generating a path and then splitting it a part again. I'm thinking this broke then. |
#47047 changed the logic for the file name and path we generate, but we were no longer ensuring the temporary directory existed prior to trying to create the file within it.