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.

New `Target()` and `RunTargets()` API

See original GitHub issue
using static Bullseye.Targets;
...
Target("default", () => System.Console.WriteLine("Hello, world!"));
RunTargets(args);

With Add() and Run() deprecated.

Feedback from @blairconrad and @thomaslevesque was that Add() and Run() are too general in their bare forms when using static. An alternative is AddTargets() and RunTargets(), although that is a little verbose when you consider Targets.AddTarget(), Targets.RunTargets(). Ideally it would be great to have an API which looks great in both scenarios although I’m not sure that’s possible.

This would include a deprecation of the previous methods, and their removal in 2.0.

Final decision was Target() and RunTargets().

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
adamralphcommented, Jun 29, 2018

I prefer to have one way of doing things where possible, but yes, it’s an option.

0reactions
adamralphcommented, Jul 6, 2018

Thanks @blairconrad. I’ll give that some thought too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run Targets: Run and Debug your App in the Desired ...
To create a new target, select Run/Debug Configurations on the main toolbar and then click Edit Configurations. In the left-hand list, choose ...
Read more >
Rules and the Target API - Pants build system
How to use the Target API in rules. ... .get() . When the. Field is not registered, this will call the ... FieldSet...
Read more >
Running Targets
When using Cake .NET Tool you can use the RunTarget method to run a target. The RunTarget method should be placed at the...
Read more >
The {targets} R package user manual - 6 Targets
A target runs some R code and saves the returned R object to storage, ... Avoid modifying the global environment with calls to...
Read more >
Creating Simple Tasks in .NET with Bullseye
NET package for describing and running targets and their dependencies. ... Define your target(s) using the Target() methods and then specify ...
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