-
Notifications
You must be signed in to change notification settings - Fork 117
Description
Problem
Single-component solutions are facing a transitive dependency issue on UWP heads. It can be fixed by making the transitive dependency an explicit dependency, but not all transitive dependencies are problematic. This ticket serves to investigate why this is happening, and what we can do about it.
Findings
Behaviors.Uwp.csproj project requires an explicit reference to the Animations project to build successfully, even though Animations is a transitive dependency. This behavior is not observed in the SettingsControls.Uwp.csproj project.
- Dependency Chains:
- Behaviors:
Uwp->Behaviors->Animations->Extensions. Had to manually add a direct reference fromUwptoAnimations(but notExtensionsfor some reason) to fix the build issue. - SettingsControls:
Uwp->SettingsControl->Triggers->Helpers->Extensions. No issue building.
- Behaviors:
-
Task Analysis:
- Comprehensive comparison of all tasks in both binlogs was performed.
- The sequence of task execution was analyzed for both projects.
- Minor discrepancies such as the presence of the
Touchtask (related to file timestamp updates) inSettingsControls.Uwp.csprojand not inBehaviors.Uwp.csprojwere noted, but aren't relevant to the issue.
-
MSBuild Task Parameters:
- Parameters for
MSBuildtasks were extracted and compared between the two components. - No significant discrepancies were found in the parameters.
- Parameters for
-
Hypotheses and Proposed Experiments:
- Depth of Dependency Chain: The additional intermediate project layer (
Helpers) in theSettingsControlschain might influence transitive dependency resolution. - Multiple transitive references: The
Behaviorssource project has two dependencies that should be available transiently to the Uwp head, while theSettingsControlssource project only has one. It's possible that the reference fromBehaviors.UwptoAnimationswas needed but the reference toExtensionswasn't because it can only resolve one transient reference. - Explicit vs. Transitive References: Making all dependencies explicit in the Behaviors component resolves the issue. As one possible workaround, we could build a way to detect and add these to the UWP head automatically. Not recommended.
- Depth of Dependency Chain: The additional intermediate project layer (
Recommendations
We'll need to finish investigation to find out why the transitive dependencies are working fine in SettingsControls but not Behaviors. If we adjust the Behaviors project reference structure to match certain characteristics of the SettingsControls project graph, it may yield the information needed to file a proper bug report and create a workaround.
### Possible next steps:
- [ ] Introduce an intermediate project layer in the Behaviors component, similar to the `Helpers` layer in SettingsControls, and test the build. See what new information it yields.
- [ ] Introduce a second transient reference to `SettingsControls` to test if having multiple transitive references at the same level is the issue.
- [ ] Test with a minimal UWP project with similar nested dependencies to reproduce the issue outside of the current context.
- [ ] If all else fails, we'll build a way to autodetect transitive project references and add them to the head automatically.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
