-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add Solution.WithProjectInfo API #74289
Conversation
315f416
to
a79cff4
Compare
b052d1f
to
da393a3
Compare
@dotnet/roslyn-ide @ToddGrun @CyrusNajmabadi @jasonmalinowski ptal |
src/Workspaces/Core/Portable/Workspace/Solution/DocumentState.cs
Outdated
Show resolved
Hide resolved
...paces/Core/Portable/Workspace/Solution/SolutionCompilationState.TranslationAction_Actions.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Remote/ServiceHub/Host/RemoteWorkspace.SolutionCreator.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Remote/ServiceHub/Host/RemoteWorkspace.SolutionCreator.cs
Show resolved
Hide resolved
src/Workspaces/Remote/ServiceHub/Host/RemoteWorkspace.SolutionCreator.cs
Show resolved
Hide resolved
src/Workspaces/Remote/ServiceHub/Host/RemoteWorkspace.SolutionCreator.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/AdditionalDocumentState.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/DocumentState.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/DocumentState.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.cs
Show resolved
Hide resolved
overall this change seems ok. i def have some questions, and some small suggestions. I'm not a fan of seeing null becoming first class in these codepaths :) but i can be convinced it's ok if we talk about it. |
high level preference, if we can disallow null (or moving from non-null to null), that would be my STRONG preference. |
The issue is that our APIs are inconsistent. We allow nulls in some public APIs such as |
My feeling is that this should be like 'language' (which cannot be changed). If you hve a language with options, then you have options, and they should not be null. If you have a language without options, then you don't have options, and it should only be null. The change between (especially non-null to null) feels broken and confusing to me. |
{ | ||
if (options == CompilationOptions) | ||
{ | ||
return this; | ||
} | ||
|
||
if (options == null) | ||
{ | ||
throw new NotSupportedException(WorkspacesResources.Removing_compilation_options_is_not_supported); |
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.
tnx.
Returns a new
Solution
snapshot with the target project updated to values specified inProjectInfo
.Makes it possible for
dotnet-watch
to incrementally updateSolution
based on information loaded from MSBuild.