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.

Simplified task graph configuration

See original GitHub issue

Simplified task graph configuration.

Graph("Clean")
   .Then("Build")
   .Then("Run-Unit-Tests", If(() => runTests))
   .Then("Copy-Files")
   .Then("Zip-Files", If(c => c.HasArgument("zipFiles")))
   .Then("Create-NuGet-Package")
   .Then("Publish-NuGet-Package", If(publish))
   .Then("All")

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:3
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
patriksvenssoncommented, Aug 25, 2014

I’m not sure if I understand what you mean 😕 Normally when you declare dependencies you write:

Task("Clean")
   .Does(() =>
{
});

Task("UpdateAssemblyInfo")
   .WithCriteria(() => !isLocalBuild)
   .IsDependentOn("Clean")
   .Does(() =>
{
});

Task("Build")
   .IsDependentOn("A")
   .Does(() =>
{
});

What I’m proposing is another way of declaring the dependency graph:

Task("Clean")
   .Does(() =>
{
});

Task("UpdateAssemblyInfo")
   .Does(() =>
{
});

Task("Build")
   .Does(() =>
{
});

// Declare dependencies.

Graph("Clean")
   .Then("Build");
   .Then("OtherTask1");
   .Then("OtherTask2");

if(!isLocalBuild)
{
   Graph("Clean")
      .Then("UpdateAssemblyInfo");
}

With a model like this, you could theoretically tell Cake to run tasks is parallel:

Graph("Clean")
   .Then("Build");
   .ThenInParallel("OtherTask1", "OtherTask2");

This is just an example. I find the Graph method name a little confusing.

This would (like I’ve said many times before) need some more thought 😄

0reactions
patriksvenssoncommented, Jun 25, 2017

@rbutcher We will not change this behavior.

First it would be a massive breaking change and second is that FAKE is actually the tool that does this differently. The “normal” way that people coming from a Make, Rake or MSBuild background would expect is to define targets and their dependencies, not the explicit execution order.

I opened this issue to provide an alternative to the default way of building the dependency graph, for simple scenarios.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configurable and Parallel Task Graph in iMSTK
Task graphs allow users to create computational blocks as nodes and to specify edges that determine the order of execution. Expressing ...
Read more >
3: A simplified scheduling problem: (a) example task graph ...
3: A simplified scheduling problem: (a) example task graph of a concurrent application showing the tasks, task execution times and dependencies; (b) example ......
Read more >
The task graph: data, dependencies, synchronization
A task graph is composed of nodes and edges, it has a start-to-finish direction, and no self-loops: it is a directed acyclic graph...
Read more >
sbt Reference Manual — Task graph
The task graph lets the build user wire the tasks together in different ways, while sbt and plugins can provide various features such...
Read more >
TileDB Cloud: Task Graphs
Task graphs are a key feature of TileDB Cloud, providing a serverless ... You can create graphs mixing different resource configurations, ...
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