Skip to content

VirtualProjectBuilder surface cleanup#53088

Closed
tmat wants to merge 1 commit intodotnet:release/10.0.3xxfrom
tmat:ProjectBuilder
Closed

VirtualProjectBuilder surface cleanup#53088
tmat wants to merge 1 commit intodotnet:release/10.0.3xxfrom
tmat:ProjectBuilder

Conversation

@tmat
Copy link
Member

@tmat tmat commented Feb 19, 2026

No description provided.

}

public void CreateProjectInstance(
public ProjectInstance CreateProjectInstance(ProjectCollection projectCollection, ErrorReporter errorReporter)
Copy link
Member Author

Choose a reason for hiding this comment

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

Will be used by watch in future

Copy link
Member

Choose a reason for hiding this comment

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

Then ErrorReporter will also need to be public. And some ErrorReporters factory methods as well, presumably. Can we perhaps just make this public when dotnet-watch needs it and we know exactly what is needed?

Copy link
Member Author

@tmat tmat Feb 20, 2026

Choose a reason for hiding this comment

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

I already tried that locally. We just need the ErrorReporter type.

return GetTempSubpath(directoryName);
}

public static string GetVirtualProjectPath(string entryPointFilePath)
Copy link
Member Author

Choose a reason for hiding this comment

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

Will be used by watch in future.

Copy link
Member

Choose a reason for hiding this comment

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

The project returned by CreateProjectInstance has FullPath set to this value, wouldn't that be enough for dotnet-watch?

Copy link
Member Author

Choose a reason for hiding this comment

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

We need the path before creating the project.

return GetTempSubpath(directoryName);
}

public static string GetVirtualProjectPath(string entryPointFilePath)
Copy link
Member

Choose a reason for hiding this comment

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

The project returned by CreateProjectInstance has FullPath set to this value, wouldn't that be enough for dotnet-watch?

SourceFile sourceFile,
SyntaxTriviaList triviaList,
ErrorReporter reportError,
ErrorReporter errorReporter,
Copy link
Member

Choose a reason for hiding this comment

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

We should probably decide on naming and consolidate it everywhere. I think I've been renaming some parameters in the other direction (to reportError) as part of #52347.

Copy link
Member Author

Choose a reason for hiding this comment

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

I renamed to avoid collision between helpers Context.ReportError and ErrorReporter ReportError field.

@tmat tmat closed this Mar 6, 2026
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