Skip to content

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

Merged
KevinRansom merged 20 commits into
dotnet:mainfrom
dsyme:ld2
Jul 13, 2022
Merged

Fix cross-file navigation features when #line is used#12963
KevinRansom merged 20 commits into
dotnet:mainfrom
dsyme:ld2

Conversation

@dsyme

@dsymedsyme commented Apr 8, 2022

Copy link
Copy Markdown
Contributor

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

@dsymedsyme changed the title [WIP] Ignore #line in the IDE for most purposes[WIP] Fix cross-file navigation features when #line is usedApr 8, 2022
@dsyme
dsyme changed the base branch from main to ldApril 8, 2022 07:42
@KevinRansom

Copy link
Copy Markdown
Contributor

oh it's not against main. :-)

@dsyme
dsyme changed the base branch from ld to mainJuly 11, 2022 21:41
@dsymedsyme changed the title [WIP] Fix cross-file navigation features when #line is usedFix cross-file navigation features when #line is usedJul 12, 2022
@dsyme

Copy link
Copy Markdown
ContributorAuthor

This is now ready

@KevinRansom
KevinRansom merged commit 2b36ae0 into dotnet:mainJul 13, 2022
Sign up for freeto 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

@dsyme@KevinRansom@vzarytovskii