-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Dev/erarndt/project root element #12318
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1819,7 +1819,7 @@ internal void VerifyThrowInvalidOperationNotImported(ProjectRootElement otherXml | |
/// Internal project evaluation implementation. | ||
/// </summary> | ||
[DebuggerDisplay("#GlobalProperties={_data.GlobalPropertiesDictionary.Count} #Properties={_data.Properties.Count} #ItemTypes={_data.ItemTypes.Count} #ItemDefinitions={_data.ItemDefinitions.Count} #Items={_data.Items.Count} #Targets={_data.Targets.Count}")] | ||
private class ProjectImpl : ProjectLink, IProjectLinkInternal | ||
internal class ProjectImpl : ProjectLink, IProjectLinkInternal | ||
Erarndt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
/// <summary> | ||
/// Backing data; stored in a nested class so it can be passed to the Evaluator to fill | ||
|
@@ -2065,7 +2065,7 @@ public override bool IsDirty | |
{ | ||
if (Xml.Count > 0) // don't log empty projects, evaluation is not interesting | ||
{ | ||
Trace.WriteLine(String.Format(CultureInfo.InvariantCulture, "MSBUILD: Is dirty because {0} [{1}] [PC Hash {2}]", Xml.LastDirtyReason, FullPath, ProjectCollection.GetHashCode())); | ||
Trace.WriteLine(String.Format(CultureInfo.InvariantCulture, "MSBUILD: Is dirty because of version mismatch [{0}] [PC Hash {1}]", FullPath, ProjectCollection.GetHashCode())); | ||
} | ||
} | ||
|
||
|
@@ -2088,12 +2088,7 @@ public override bool IsDirty | |
{ | ||
if (s_debugEvaluation) | ||
{ | ||
string reason = import.ImportedProject.LastDirtyReason; | ||
|
||
if (reason != null) | ||
{ | ||
Trace.WriteLine(String.Format(CultureInfo.InvariantCulture, "MSBUILD: Is dirty because {0} [{1} - {2}] [PC Hash {3}]", reason, FullPath, import.ImportedProject.FullPath == FullPath ? String.Empty : import.ImportedProject.FullPath, ProjectCollection.GetHashCode())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello, according to my search in code, there are several possible dirty reasons.
Or maybe (to be on a safer side) since there is a limited pool of the reasons, we could shift to an enum to keep the information while getting rid of the string. |
||
} | ||
Trace.WriteLine(String.Format(CultureInfo.InvariantCulture, "MSBUILD: Is dirty because version numbers are mismatched [{0} - {1}] [PC Hash {2}]", FullPath, import.ImportedProject.FullPath == FullPath ? String.Empty : import.ImportedProject.FullPath, ProjectCollection.GetHashCode())); | ||
} | ||
|
||
return true; | ||
|
@@ -2263,7 +2258,7 @@ public override IList<ResolvedImport> Imports | |
|
||
foreach (ResolvedImport import in _data.ImportClosure) | ||
{ | ||
if (import.ImportingElement != null && !import.ImportedProject.IsEphemeral) // Exclude outer project itself and SDK-resolver synthesized imports | ||
if (import.ImportingElement != null && import.ImportedProject is not EphemeralProjectRootElement) // Exclude outer project itself and SDK-resolver synthesized imports | ||
{ | ||
imports.Add(import); | ||
} | ||
|
@@ -2286,7 +2281,7 @@ public override IList<ResolvedImport> ImportsIncludingDuplicates | |
|
||
foreach (var import in _data.ImportClosureWithDuplicates) | ||
{ | ||
if (import.ImportingElement != null && !import.ImportedProject.IsEphemeral) // Exclude outer project itself and SDK-resolver synthesized imports | ||
if (import.ImportingElement != null && import.ImportedProject is not EphemeralProjectRootElement) // Exclude outer project itself and SDK-resolver synthesized imports | ||
{ | ||
imports.Add(import); | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.