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

Decision on should short alias on template parameter be generated by default #3238

Closed
vlada-shubina opened this issue Jun 3, 2021 · 6 comments
Assignees
Labels
triaged The issue was evaluated by the triage team, placed on correct area, next action defined.
Milestone

Comments

@vlada-shubina
Copy link
Member

Default behavior of current parser is to generate short alias on each template option, unless it is not mentioned in dotnetcli.host.json:

  • for --Nullable it will be -N
  • for --nullable it will be -nu as -n is already taken for --name

Now, if you don't want to have short name for the option, you need to put it dotnetcli.host.json with empty shortName:

    "Nullable": {
        "longName": "nullable",
        "shortName": ""
    }

which is inconvenient, and lot of Microsoft templates have to do it.


Originally posted by @vlada-shubina in #3173 (comment)

@vlada-shubina vlada-shubina added the triaged The issue was evaluated by the triage team, placed on correct area, next action defined. label Jun 3, 2021
@vlada-shubina vlada-shubina added this to the September Sprint milestone Jun 3, 2021
@bekir-ozturk bekir-ozturk modified the milestones: Backlog, October Sprint Sep 6, 2021
@vlada-shubina vlada-shubina added need-pm-discussion Need agreement from PM that the issue aligns to targeted stories for any of the next 2 releases and removed triaged The issue was evaluated by the triage team, placed on correct area, next action defined. labels Nov 3, 2021
@baronfel
Copy link
Member

Follow-up questions for @baronfel:

  • look into the template metadata (external and internal) and get counts of how many are using this syntax to provide lowercase parameter names only
  • how many are using host config files at all?
  • how many are using this rename for other, non-lowercase-only use cases?

In every case, we should try to solve the need expressed in the usage.

@sayedihashimi
Copy link
Member

I have some of this info from the tools that I previously created. From the 2105 templates that I've found in nuget.org, I see that 1525 do NOT have a host file.

We can probably add some code to answer your other questions as well.

Here are the reports that I just generated, there may be some useful info for you. In our Thursday meeting I will go over how to run these tools for @baronfel.

template-reports.zip

@vlada-shubina
Copy link
Member Author

We agreed that in scope of #2191 no change should be for this behavior.

@baronfel
Copy link
Member

This is partially related to #3238 because the casing provided in the host configs can mess with expected results for case (in)sensitive parsing.

@YuliiaKovalova YuliiaKovalova added the triaged The issue was evaluated by the triage team, placed on correct area, next action defined. label Jan 3, 2023
@baronfel
Copy link
Member

baronfel commented Jan 5, 2023

We should not generate shortnames by default, due to the inconsistencies that Vlada has mentioned below. Template authors should have the expectation that the symbols they create are the exact representations the users will see.

@baronfel baronfel removed the need-pm-discussion Need agreement from PM that the issue aligns to targeted stories for any of the next 2 releases label Jan 5, 2023
@YuliiaKovalova YuliiaKovalova closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2023
@YuliiaKovalova
Copy link
Member

We decided not to change this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged The issue was evaluated by the triage team, placed on correct area, next action defined.
Projects
None yet
Development

No branches or pull requests

5 participants