Closed MarkKharitonov closed 2 years ago
Unfortunately I have no time to investigate this as this is very deep and I'm not well positioned to have a repro, etc. I don't know more about this area than you do. Just setting the expectations here.
All the viewer does is report the timestamps on ProjectStartedEventArgs and ProjectFinishedEventArgs. Those come from MSBuild. I don't know anything about .metaproj and how those are reported.
Got it. Thank you.
One thing I forgot to mention is that you probably have .metaproj files because your .sln specifies dependencies between projects. My recommendation is to remove that from the .sln and switch to ProjectReferences to indicate dependencies, wherever possible. Dependencies in .csproj are an obsolete feature that can cause a lot of trouble.
@MarkKharitonov ^^
@KirillOsenkov - the reason for these dependencies is that these projects contain both C# and Typescript code. The two kinds of code have completely independent build logic and dependencies. For example, project A may depend on project B from the Typescript perspective, but not from the C# perspective.
We are capturing it with the solution level dependency, because we do not want to actually couple the two projects. You have reminded me that I wanted to separate the two different kinds of code from each other, i.e. create dedicated Typescript only projects which could depend on each other. I guess this is a good opportunity to do it.
Would you happen to have any advice for me as to what kind of project to use for the Typescript? Using the csproj extension does not seem right and I definitely would not want to use the C# build targets...
I have no idea honestly but I can ask around.
I've asked around on Twitter: https://twitter.com/KirillOsenkov/status/1463976676182802437
They say .esproj is the current recommendation: https://devblogs.microsoft.com/visualstudio/the-new-javascript-typescript-experience-in-vs-2022-preview-3/
But also there's a prototype JavaScript.Sdk: https://www.nuget.org/packages/Microsoft.VisualStudio.JavaScript.SDK
Much appreciated. Thank you very much.
I have a build that was run with maxCpuCount = 4. Here is the command line as reported in the binary log:
The binlog's reporting of .csproj.metaproj:
According to this snapshot:
How is this possible at all with the concurrency level of 4? Many of the entries took over 2 minutes to run.
From the hierarchy point of view, many of them are children of the same top level node:![image](https://user-images.githubusercontent.com/489792/143293052-ade6f0fc-eb8c-4e21-81a0-3b050d3222d8.png)
The time of the first child:![image](https://user-images.githubusercontent.com/489792/143293359-09f3cfef-7760-41ef-ae67-a9b96afdc24a.png)
And the last one falling within the same second:![image](https://user-images.githubusercontent.com/489792/143293581-7eca482c-e120-4697-9851-41bdc25780d9.png)
There are certainly more than 4 children that were started, according to the log at more or less the same time.
One logical explanation could be something like this:
But then we should see a hierarchical relationship between these nodes, yet they are reported flat.
What am I missing?