Skip to content
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

Require package readmes for shipping packages #105019

Merged
merged 7 commits into from
Jul 18, 2024

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Jul 17, 2024

Contributes to #99358

  1. Commit: Require package readmes for shipping packages
    Add a target that validates that a package readme
    exists for a shipping package.
    Set EnableDefaultPackageReadmeFile=false in projects
    that don't yet have a package readme.
  2. Commit: Delete empty package readme files that were accidentally committed

I will send out a mail to the runtimerepo DL after this change is merged to explain that package readmes are now required and
to create energy on adding the remaining 30 package READMEs, ideally ready for .NET 9.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

@ViktorHofer ViktorHofer force-pushed the EnablePackageReadmesByDefault branch from ef020a5 to 13e037a Compare July 17, 2024 10:49
Add a target that validates that a package readme
exists for a shipping package.

Set EnableDefaultPackageReadmeFile=false in projects
that don't yet have a package readme.
@ViktorHofer ViktorHofer force-pushed the EnablePackageReadmesByDefault branch from 13e037a to c42345d Compare July 17, 2024 11:22
@am11
Copy link
Member

am11 commented Jul 17, 2024

I noticed that the packs subset also reports some missing readmes:

2024-07-15T09:43:53.9976756Z   The package Microsoft.NETCore.App.Ref.9.0.0-dev is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.
2024-07-15T09:43:53.9976756Z   The package Microsoft.NETCore.App.Ref.9.0.0-dev is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.
2024-07-15T09:44:32.1884036Z   The package Microsoft.NETCore.App.Crossgen2.freebsd-x64.9.0.0-dev is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.
2024-07-15T09:44:55.9404147Z   The package Microsoft.NETCore.App.Runtime.freebsd-x64.9.0.0-dev is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.
2024-07-15T09:45:17.6289662Z   The package Microsoft.NET.HostModel.9.0.0-dev is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.

@ViktorHofer
Copy link
Member Author

@am11 I changed a property so that this validation is only enabled for src/libraries packages (for now).

@am11
Copy link
Member

am11 commented Jul 17, 2024

Sounds good. I think the validation is probably hitting false-positive, because those are internal packages and nuget.org shows this line:

<RuntimePackageDisclaimer>Internal implementation package not meant for direct consumption. Please do not reference directly.</RuntimePackageDisclaimer>
e.g. https://www.nuget.org/packages/Microsoft.NETCore.App.Crossgen2.linux-x64. In these cases, we probably don't need a physical readme file.

@ViktorHofer
Copy link
Member Author

ViktorHofer commented Jul 17, 2024

Sounds good. I think the validation is probably hitting false-positive, because those are internal packages and nuget.org shows this line:

Yes, we can revisit this when we want to expand the validation to other packages produced in runtime, outside of src/libraries.

@ViktorHofer
Copy link
Member Author

@dotnet/runtime-infrastructure, @ericstj would you mind reviewing?

Copy link
Member

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

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

Looks good. I have questions.

eng/packaging.targets Outdated Show resolved Hide resolved
eng/packaging.targets Show resolved Hide resolved
eng/packaging.targets Outdated Show resolved Hide resolved
eng/packaging.targets Show resolved Hide resolved
eng/packaging.targets Show resolved Hide resolved
src/libraries/Directory.Build.targets Show resolved Hide resolved
ViktorHofer and others added 2 commits July 17, 2024 22:37
Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
Copy link
Member

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

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

LGTM. Consider my comment suggestions optional. Feel free to wait for a review from Eric too.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants