-
Notifications
You must be signed in to change notification settings - Fork 831
Don't show completions on nested module identifier #13089
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
Conversation
|
Code looks ok but the new test is still failing |
|
I know and I have described why that is. Any clue on how to go about what I'm asking for? |
|
Would it be necessary to add For the sole reason that this nested module would appear in the syntax tree namespace N
module Nested |
|
Bump? |
|
/azp run |
|
/run fantomas |
|
Ran fantomas: https://github.com/dotnet/fsharp/actions/runs/3361542341 |
|
@kerams if you want I might help with that later this week. |
|
Well, first I want to know whether we're OK with extending the syntax tree just for this use case. If that isn't the case, the PR can be closed. Otherwise I only need a tip on the preferred approach with regards to modelling the error case. |
|
Well from what I understand @dsyme is fine with that and nobody is against in general :) |
|
I've added recovery for incomplete nested modules. Before: After: @auduchinok, @nojaf , before I add tests and extend this to signature files, can you please check if the changes look sound to you? |
|
Ugh, it doesn't work with ML compatibility mode #indent "off"
module M
let SimpleSample() = 1Is there a way to simulate a pattern guard in yacc? | opt_attributes opt_access moduleIntro // when not mlSupportOr maybe it's time this long-deprecated syntax was finally removed in .NET 8 SDK? :) |
I think this looks fine, though I'm less familiar with recovery. I'll let @auduchinok take this one. |
If all is working by itself with |
|
The Moon and the stars have aligned, ready for review. |
|
As you changed the |
|
Thanks @kerams 🙏 |
auduchinok
left a comment
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.
@kerams I wonder if changes to LexFilter are still needed after you've changed recovery to use the builtin logic?
tests/service/data/SyntaxTree/NestedModule/IncompleteNestedModuleShouldBePresent.fs
Show resolved
Hide resolved
|
(updating to get the "short ranges" string representation in) |
|
@kerams this is ready to merge, right? |
|
Yup. |
psfinaki
left a comment
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.
Cool, thanks a lot!



A simple fix.This test is failing because without the equals sign
Nestdoes not appear in the syntax tree at all. What exactly would it take to make this happen? I'm assuming something in the parser. Unfortunately, I am not yet familiar with that part of the compiler.