question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add description for each target

See original GitHub issue

Use case(s)

Ability to describe each target when specifying --list-targets.

Description

When listing the targets, it would be useful to see a short description that describes what each target does. This would allow a user to get a better understanding without needing to look through the source of each target. The target names should hopefully give some indication, and a description would be able to add further detail.

For example, in one current project, listing the targets with .\build.bat --list-targets writes

agent-zip
build
clean
default
diff
netcore-sln
pack
publish
release-notes
restore
version

With descriptions, this list would be more useful to a user

agent-zip:		builds a zip file of all assemblies needed to instrument with `DOTNET_STARTUP_HOOKS`
build:			builds all projects
clean:			cleans all projects
default:		runs the build target
diff:			performs a diff on each assembly to understand what has changed
netcore-sln:		creates a solution file containing only .NET Core projects
pack:			creates nuget packages for all publishable projects
publish:		publishes all publishable projects
release-notes:		generates github release notes based on issue and PR labels
restore:		restores all nuget package dependencies
version:		configures the version to run with.

Alternatives

Descriptions and further details could be provided through a chosen command line integration e.g. System.CommandLine, and additional details provided through this, for example, defining sub commands. There might be some difficulty in this approach however in terms of the applicability of arguments in certain contexts - As an example, if a sub command diff is configured with System.CommandLine and the command build.bat diff --list-dependencies is run, System.CommandLine expects --list-dependencies to be a valid argument in the context of the sub command.

Possible implementation(s)

  • Target has a string Description {get;} property, which can be set with the ctor
  • Methods for being able to specify the properties of a target such as Targets.Target(...) and overloads, accept an additional parameter for the description.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
russcamcommented, Jan 20, 2021

@adamralph thanks for the shoutout! ❤️ I’ll give it a try now

1reaction
russcamcommented, Jan 7, 2021

Thanks for adding in #556, @adamralph 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

put-targets — AWS CLI 1.29.30 Command Reference
Description ¶ Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule. Targets...
Read more >
Prometheus - add target specific label in static_configs
Here is my solution: use job_name as the group label; add more target option to separate instance and add labels. For you the...
Read more >
Configuring Targets
From the Targets dropdown in the sidebar, select "Add Targets". For each target you wish to add: Provide the address of the asset...
Read more >
Targets and BUILD files
Each target type has different fields, or individual metadata values. Run pants help $target to see which fields a particular target type has,...
Read more >
Targets and Extension-Points
A target is a container of tasks and datatypes that cooperate to reach a desired state during the build process. Targets can depend...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found