Skip to content

Fix cross-file navigation features when #line is used #12963

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

Merged
merged 20 commits into from
Jul 13, 2022
Merged

Conversation

dsyme
Copy link
Contributor

@dsyme dsyme commented Apr 8, 2022

This fixes

This is about how VS and FCS behave when #line is used.

This PR makes sure no line directives are applied for the incremental build, for the VS IDE, which now passes the hidden flag --ignorelinedirectives, similar to other hidden flags we pass such as --vserrors. The same technique as #6004 is used - that is, the IDE directs the background build not to take line directives into account.

Note some clients of FCS (e.g. Fable) definitely do want to take #line into account (because they are implementing a compiler).

Desired specification

In general, the VS IDE should ignore #line. The current status for F# before this PR is

  • GOOD: colorization works
  • GOOD: brace matching works
  • GOOD: diagnostics-from-build are reported and take #line into account
  • GOOD: diagnostics-from-intellisense are reported and do not take #line into account
  • GOOD: #nowarn works in generated source
  • GOOD: autocomplete works at all in generated source
  • GOOD: tooltips work in generated source
  • GOOD: goto-definition works in generated source
  • FIXED BY THIS PR: diagnostics when using --ignorelinedirectives
  • FIXED BY THIS PR: goto-definition doesn't work across files
  • FIXED BY THIS PR: find-all-references doesn't work at all
  • FIXED BY THIS PR: bug #nowarn in the editor does not ignore warning if --warnaserrors flag is set, but compiler does #9796

@dsyme dsyme changed the title [WIP] Ignore #line in the IDE for most purposes [WIP] Fix cross-file navigation features when #line is used Apr 8, 2022
@dsyme dsyme changed the base branch from main to ld April 8, 2022 07:42
@KevinRansom KevinRansom reopened this Apr 11, 2022
@KevinRansom
Copy link
Contributor

oh it's not against main. :-)

@dsyme dsyme changed the base branch from ld to main July 11, 2022 21:41
@dsyme dsyme changed the title [WIP] Fix cross-file navigation features when #line is used Fix cross-file navigation features when #line is used Jul 12, 2022
@dsyme
Copy link
Contributor Author

dsyme commented Jul 12, 2022

This is now ready

@KevinRansom KevinRansom merged commit 2b36ae0 into dotnet:main Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants