Skip to content

Conversation

@RikkiGibson
Copy link
Member

Related to #81252

  • This includes the essential fix: require the file to contain #! or #: to be considered a file-based program.
  • Also includes a fix which ensures files in the canonical misc project can migrate to file-based program when directives are added.

Separately am working on the #! analyzer described in #81252. Getting the diagnostic to appear in the editor for that has been harder than anticipated so extracting this bit out.

@RikkiGibson RikkiGibson requested a review from a team as a code owner November 17, 2025 23:36
var isLoadedAsFileBasedProgram = document.FilePath is { } filePath && await IsProjectLoadedAsync(filePath, cancellationToken);

// If this document has a file-based program syntactic marker, but we aren't loading it in a file-based programs project,
// we need the caller to remove and re-add this document, so that it gets put in a file-based programs project instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update this comment to explain how this works (as fddiscussed offline). will tackle improving the clarity of this code in one of the followups I am working on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants