Skip to content

Conversation

@auduchinok
Copy link
Member

@auduchinok auduchinok commented Mar 22, 2022

Fixes completion for Field field at the caret position:

type Record =
    { Field: int }

{ Fie{caret} }

Prior to this change, another name environment for the anon module is reported after it's been checked, and this environment overwrites an environment that should've been used inside the module. Reporting such an environment is needed for analysis of subsequent module declarations in the outer scope but breaks editor features inside top-level modules when reported for its own range.

@auduchinok auduchinok force-pushed the completion-env-anonModule branch from 063a57f to eaf6006 Compare March 22, 2022 13:16
@auduchinok
Copy link
Member Author

OK, the failing test shows an actual regression related to recursive modules. I'm looking into it.

@auduchinok auduchinok changed the title CheckDeclarations: don't add environment for checked top-level module CheckDeclarations: don't report environment for checked top-level module Mar 23, 2022
@auduchinok auduchinok closed this Mar 23, 2022
@auduchinok auduchinok reopened this Mar 23, 2022
@auduchinok auduchinok closed this Mar 23, 2022
@auduchinok auduchinok reopened this Mar 23, 2022
@auduchinok
Copy link
Member Author

Hm, for some reason CI doesn't restart on PR reopening...

@vzarytovskii
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@auduchinok auduchinok closed this Mar 23, 2022
@auduchinok auduchinok reopened this Mar 23, 2022
@auduchinok
Copy link
Member Author

@DedSec256 @vzarytovskii Do you have any idea why xml doc tests could fail in this PR?

@vzarytovskii
Copy link
Member

vzarytovskii commented Mar 24, 2022

Huh, that's some weird failures. It does not ring a bell to me, I will try to figure it out tomorrow morning.

Edit: it also seems to be failing for the same reason in #12872

@vzarytovskii vzarytovskii self-assigned this Mar 24, 2022
@DedSec256 DedSec256 mentioned this pull request Mar 24, 2022
@auduchinok auduchinok force-pushed the completion-env-anonModule branch from ff3ec14 to bd9f700 Compare March 25, 2022 11:15
@auduchinok
Copy link
Member Author

It's ready.

@vzarytovskii vzarytovskii merged commit ea3dfb9 into dotnet:main Mar 25, 2022
@DedSec256 DedSec256 deleted the completion-env-anonModule branch March 25, 2022 15:32
charlesroddie pushed a commit to charlesroddie/fsharp that referenced this pull request May 2, 2023
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.

2 participants