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

Force parameters to be specified if another is specified #2173

Closed
Tracked by #5856
vb-software opened this issue Nov 29, 2019 · 6 comments
Closed
Tracked by #5856

Force parameters to be specified if another is specified #2173

vb-software opened this issue Nov 29, 2019 · 6 comments
Labels
triaged The issue was evaluated by the triage team, placed on correct area, next action defined.
Milestone

Comments

@vb-software
Copy link

Documentation doesn't indicate this is already a feature but it would be nice if specifying one parameter forces other parameters to required only if that initial parameter is used.

@donJoseLuis donJoseLuis added need-discussion Requires internal discussion prior to answering in an issue. triaged The issue was evaluated by the triage team, placed on correct area, next action defined. P1 and removed need-discussion Requires internal discussion prior to answering in an issue. labels Mar 20, 2020
@donJoseLuis donJoseLuis added this to Issues in Documentation Mar 24, 2020
@donJoseLuis donJoseLuis changed the title Force 1 or more parameters to be specified if another is specified Document "description" & "examples" for related parameters Mar 24, 2020
@donJoseLuis donJoseLuis removed the P1 label Mar 25, 2020
@vlada-shubina vlada-shubina changed the title Document "description" & "examples" for related parameters Force 1 or more parameters to be specified if another is specified Sep 9, 2020
@vlada-shubina vlada-shubina removed this from High Pri Backlog in Documentation Sep 9, 2020
@vlada-shubina vlada-shubina added Epic Groups multiple user stories. Can be grouped under a theme. need-pm-discussion Need agreement from PM that the issue aligns to targeted stories for any of the next 2 releases and removed size:1.0 triaged The issue was evaluated by the triage team, placed on correct area, next action defined. labels Sep 9, 2020
@vlada-shubina vlada-shubina changed the title Force 1 or more parameters to be specified if another is specified [feature] Force 1 or more parameters to be specified if another is specified Sep 9, 2020
@vlada-shubina vlada-shubina added this to Low Pri Backlog in Template Engine Sep 9, 2020
@vlada-shubina
Copy link
Member

The issue suggests a new feature which doesn't exist yet. Moved to Template Engine backlog.

@donJoseLuis donJoseLuis added the triaged The issue was evaluated by the triage team, placed on correct area, next action defined. label Sep 14, 2020
@donJoseLuis donJoseLuis added Cost:L Work that requires one engineer up to 4 weeks parent:1240298 Priority:3 Work that is nice to have User Story A single user-facing feature. Can be grouped under an epic. and removed Epic Groups multiple user stories. Can be grouped under a theme. labels Dec 19, 2020
@donJoseLuis donJoseLuis changed the title [feature] Force 1 or more parameters to be specified if another is specified As a customer, I want to force parameters to be specified if another is specified, to enrich my template authoring experience Dec 19, 2020
@vlada-shubina vlada-shubina removed the triaged The issue was evaluated by the triage team, placed on correct area, next action defined. label Apr 13, 2021
@KathleenDollard
Copy link

The simplest way to do this would be to require a change to System.CommandLine, since it will be our parser and it does not support this. That would allow the parser to do the validation. We could probably also do it in a post-validation step, but lets see whether we have other post validation needs after we move to the new parser.

I do not want to do this unless we find a way to express this clearly in help. Having this dependency without being able to communicate it does not seem helpful. OTOH, this problem is real.

Let's leave this on the backlog and review after we have the new parser in place.

@KathleenDollard KathleenDollard removed the need-pm-discussion Need agreement from PM that the issue aligns to targeted stories for any of the next 2 releases label Apr 13, 2021
@KathleenDollard
Copy link

If this affects your templates, let us know. I have the ASP.NET Auth templates in mind on this, but if there are other scenarios, please add them.

@vlada-shubina vlada-shubina added the triaged The issue was evaluated by the triage team, placed on correct area, next action defined. label May 17, 2021
@vlada-shubina vlada-shubina added this to the Backlog milestone May 17, 2021
@vlada-shubina
Copy link
Member

vlada-shubina commented Dec 3, 2021

Related use case is: #4102 - disable parameter B when parameter A is not specified.

@sayedihashimi
Copy link
Member

If we do this work we should coordinate to ensure that we can properly support this in VS.

@donJoseLuis donJoseLuis removed User Story A single user-facing feature. Can be grouped under an epic. Cost:L Work that requires one engineer up to 4 weeks Priority:3 Work that is nice to have parent:1240298 labels Jan 5, 2023
@donJoseLuis donJoseLuis changed the title As a customer, I want to force parameters to be specified if another is specified, to enrich my template authoring experience Force parameters to be specified if another is specified Jan 5, 2023
@vlada-shubina
Copy link
Member

This is now possible via https://github.com/dotnet/templating/wiki/Conditions#conditional-parameters feature, closing as done.

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
No open projects
Template Engine
  
Low Pri Backlog
Development

No branches or pull requests

5 participants