Open
Conversation
ab329f3 to
482bd28
Compare
0e90097 to
47d25bd
Compare
…ojects Drop Pack from _StrideProjectReferenceGraphicsApiDependent's MSBuild dispatch. Pack re-entry was a source of 'same project built twice with different globals' under parallel MSBuild; the normal ProjectReference walk handles Build, and Pack runs separately on consuming projects. With Pack gone, the explicit Targets attribute is redundant (Build is the default). Set StrideSkipAutoPack=true on test projects — they don't produce their own .nupkg. Add StrideSkipAutoPack to GlobalPropertiesToRemove on the Stride.Core.Assets.CompilerApp ProjectReference so the property stays local: CompilerApp still needs its own .nupkg in bin\packages\ for the test's AssetCompiler run.
Non-API-dependent middle projects (e.g. Stride.Engine, built with default API) re-export the wrong-variant ssdeps through the reference graph; under parallel MSBuild the direct API-dependent reference races with the transitive one on the same output filename.
47d25bd to
26b8af0
Compare
Collapses the MSBuild project-instance cache key so parallel consumers share one build of non-API-dependent projects (Stride.Core, Stride.Core.CompilerServices, etc.). Without this, each consumer with a different Platform/TFM/GraphicsApi/TestRID passes distinct globals, MSBuild creates distinct build contexts, and they race on the referenced project's single obj/ output — the canonical 'file locked by VBCSCompiler' error. Runs before _GetProjectReferenceTargetFrameworkProperties (not just PrepareProjectReferences) because the TFM-query MSBuild dispatch happens first — the GlobalPropertiesToRemove metadata has to be in place by then, otherwise StrideGraphicsApi leaks through and a second cache entry is created.
0259b20 to
5103019
Compare
…nGroup The previous approach added GlobalPropertiesToRemove in _StrideProjectReferenceGraphicsApiDependent (target time). That target runs before PrepareProjectReferences, but _GetProjectReferenceTargetFrameworkProperties runs earlier still — so the metadata wasn't in place for the TFM-query dispatch, and StrideGraphicsApi leaked through, creating duplicate cache entries for Stride.Core. Moving the strip to PrepareProjectReferences only caught the Build dispatch (not the TFM query). Moving it earlier (before _GetProjectReferenceTargetFrameworkProperties) broke SetTargetFramework population — the target's Include pattern rebuilt items with an incomplete SetTargetFramework, sending 'net10.0-windows' to net10.0-only projects. ItemDefinitionGroup applies at evaluation time, so both dispatches honour it. API-dependent references still get StrideGraphicsApi via SetTargetFramework (set at target time and applied as Properties by the dispatcher), which wins over the Remove.
Parallel MSBuild was racing on obj/ outputs because Stride.Games (and other API-dep projects) ended up with two cache entries per TF: one from the slnf's direct Build (AdditionalProperties included StrideGraphicsApi) and one from transitive dispatches (where the singular never made it through). Two cache entries → two real compiles → same obj path → race. In single-API builds the singular StrideGraphicsApi is redundant information — the plural already pins the API. Strip it at ProjectReference evaluation time via ItemDefinitionGroup, and drop it from the inner-build AdditionalProperties too. Both paths now converge on one cache key per (project, TF); the inner reads the singular locally from StrideGraphicsApis when it needs it. Multi-API mode (StrideGraphicsApiDependentBuildAll=true) keeps the singular as a cache-key differentiator, with the strip disabled and the SetTargetFramework augmentation preserved for transitive dispatches. The target uses Update (not Remove+Include) so existing metadata — SetTargetFramework from _GetProjectReferenceTargetFrameworkProperties, GlobalPropertiesToRemove from the ItemDefinitionGroup — survives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Details
WIP (not marked as draft to test CI)
Related Issue
Types of changes
Checklist