Skip to content

Don't generate a Version Details Props header for repos with only SkipProperty dependencies#5209

Merged
dkurepa merged 2 commits intodotnet:mainfrom
dkurepa:dkurepa/DontHaveEmptyHeadersInVDP
Aug 27, 2025
Merged

Don't generate a Version Details Props header for repos with only SkipProperty dependencies#5209
dkurepa merged 2 commits intodotnet:mainfrom
dkurepa:dkurepa/DontHaveEmptyHeadersInVDP

Conversation

@dkurepa
Copy link
Copy Markdown
Member

@dkurepa dkurepa commented Aug 27, 2025

#5150
Also removes <?xml version="1.0" encoding="utf-8"?> from VersionDetails.props, because it was not needed, since it's an msbuild file

Copilot AI review requested due to automatic review settings August 27, 2025 11:48
@dkurepa dkurepa changed the title Don't generate a Version Details Props header for repos with only skipped dependencies Don't generate a Version Details Props header for repos with only SkipProperty dependencies Aug 27, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the Version Details Props file generation by skipping XML declaration generation for repositories that only contain dependencies with the SkipProperty flag set to true. The main change prevents unnecessary file headers from being generated when all dependencies in a repository are configured to skip property generation.

  • Adds logic to skip repositories where all dependencies have SkipProperty = true
  • Removes XML declaration (<?xml version="1.0" encoding="utf-8"?>) from Version Details Props generation
  • Updates test expectations to reflect the removal of XML declarations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Microsoft.DotNet.Darc/DarcLib/Helpers/DependencyFileManager.cs Removes XML declaration generation and adds logic to skip repos with only skipped dependencies
test/Microsoft.DotNet.DarcLib.Tests/Helpers/DependencyFileManagerTests.cs Updates test constants and expectations to remove XML declarations from expected output

premun
premun previously approved these changes Aug 27, 2025
…r.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dkurepa dkurepa requested a review from premun August 27, 2025 12:20
@dkurepa dkurepa enabled auto-merge (squash) August 27, 2025 13:07
@dkurepa dkurepa merged commit cdd9e79 into dotnet:main Aug 27, 2025
9 checks passed
dkurepa added a commit that referenced this pull request Oct 8, 2025
…ty attribute changes (#5346)

- [x] Review PR #5067 and #5209 changes to understand what was
implemented
- [x] Add section on Version.Details.props file
- [x] Document the SkipProperty attribute in Version.Details.xml
- [x] Document header generation behavior for repos with only
SkipProperty dependencies
- [x] Add examples showing proper configuration
- [x] Update index and references throughout the document
- [x] Build and test to ensure no syntax errors in documentation
- [x] Address review feedback: Remove "When to use SkipProperty" section
- [x] Address review feedback: Simplify migration steps

<!-- START COPILOT CODING AGENT SUFFIX -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Update Darc.md documentation for Version.Details.props
and SkipProperty attribute changes</issue_title>
> <issue_description>Update the Darc.md documentation to reflect changes
implemented in the following PRs:
> - #5067
> - #5209
> 
> Key points to address:
> 
> 1. **Version.Details.props File**
>    - Describe the addition of the new `Version.Details.props` file.
>    - Document that if `Version.Details.props` exists, it will be used.
>    - Explain when and how this file is generated or consumed.
> 
> 2. **SkipProperty Attribute in Version.Details.xml**
> - Introduce and document the `SkipProperty` attribute that can be
added in `Version.Details.xml`.
>    - Describe its purpose and how it affects dependency management.
> 
> 3. **Other Relevant Changes**
> - Summarize any additional relevant changes from the referenced PRs,
such as header generation behavior for repos with only `SkipProperty`
dependencies.
> 
> Ensure examples and configuration/process details are clear for users
maintaining or integrating with Darc-managed
repositories.</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>
Fixes #5345

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dkurepa <91743470+dkurepa@users.noreply.github.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants