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

Document reserved aliases #5269

Merged
merged 3 commits into from
Nov 1, 2022
Merged

Conversation

GangWang01
Copy link
Member

@GangWang01 GangWang01 commented Sep 16, 2022

Problem

#5198

Solution

Add doc for reserved aliases since .NET 7.0, as well as reference for dotnetcli.host.json.
Add unit tests dotnet/sdk#28748

Checks:

  • Added unit tests
  • Added #nullable enable to all the modified files ?

@vlada-shubina
Copy link
Member

Looks good. Let's improve this article to explain dotnetcli host file format in first place. Please let me know if you'd like to do it or I can do it.

Example of it can be found here: https://github.com/dotnet/sdk/blob/main/template_feed/Microsoft.DotNet.Common.ProjectTemplates.7.0/content/ClassLibrary-CSharp/.template.config/dotnetcli.host.json

It allows the following:

  • symbolsInfo: objects should match the name of parameter symbol in template.json
    • override short and long alias for parameter symbol. In case "shortName": "" it means that short alias should not be used.
    • hide parameters in CLI (isHidden property)
  • usageExamples - currently not used - Utilize 'usageExamples' from dotnetcli.host.json #3262

Also it would be good to have unit/integration tests on it. Help tests test it in away though. We do have some unit tests here: https://github.com/dotnet/sdk/blob/main/src/Tests/Microsoft.TemplateEngine.Cli.UnitTests/HostDataLoaderTests.cs

@GangWang01
Copy link
Member Author

GangWang01 commented Sep 22, 2022

I'd like to dive into host file and improve this article as well as tests.

@JanKrivanek
Copy link
Member

Very nice and valuable overview! Looking forward the addition of host files parameters altering functionality

@GangWang01 GangWang01 marked this pull request as ready for review October 25, 2022 05:49
@GangWang01 GangWang01 requested review from a team and baronfel as code owners October 25, 2022 05:49
Copy link
Member

@vlada-shubina vlada-shubina left a comment

Choose a reason for hiding this comment

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

Generally looks good, suggesting some changes below.

docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
Copy link
Member

@vlada-shubina vlada-shubina left a comment

Choose a reason for hiding this comment

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

Added couple of suggestions.

docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
docs/Reserved-Aliases.md Outdated Show resolved Hide resolved
Copy link
Member

@vlada-shubina vlada-shubina left a comment

Choose a reason for hiding this comment

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

Thanks

@vlada-shubina vlada-shubina merged commit bc06d39 into dotnet:main Nov 1, 2022
@GangWang01 GangWang01 deleted the reserved-aliases branch November 2, 2022 06:44
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.

--package template parameter has changed to --param:package in .NET 5
3 participants