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

Parallel execution #9

Open
AlexDaniel opened this issue Jul 30, 2017 · 3 comments
Open

Parallel execution #9

AlexDaniel opened this issue Jul 30, 2017 · 3 comments

Comments

@AlexDaniel
Copy link
Member

For example, rake supports parallel execution of tasks. I can't see why sake written in Perl 6 wouldn't, given how easy it is to parallelize stuff in Perl 6.

@AlexDaniel AlexDaniel self-assigned this Jun 24, 2018
@wbiker
Copy link

wbiker commented Jul 10, 2018

Basically, a good idea. However, I use sake and parallelize stuff already in the tasks. And I use task dependencies which are expected to run one after another.

@AlexDaniel
Copy link
Member Author

@wbiker yeah, I think what I have in mind is compatible with that. I'm actually working on a slight rewrite right now but I keep getting sidetracked… Anyway, in what I have, you can return a Promise from a task (so a start block is fine), and sake will move on doing other tasks that don't depend on it. I think that will do what you want.

@wbiker
Copy link

wbiker commented Jul 10, 2018

I see. That would be cool!

AlexDaniel added a commit that referenced this issue Oct 6, 2018
Affected tickets:
* Resolves #7: current task is now passed into the block (for both
  normal and IO tasks), with tests.
* Resolves #12: using `run` in sink context now explodes properly
  (tested for both normal and IO tasks).
* Resolves #13: no more shell injection through filenames, tested with
  extra tests for filenames starting with `--`.
* Resolves #16: there are now helper functions to test sakefiles
  without the need to `.execute` tasks from within the test file.  It
  works by creating a temp directory with a given Sakefile and running
  `sake` as external command (stdout, stderr, exit code and signals
  are checked).
* Resolves #18: you can now pass an IO object instead of a Str and it
  will automatically dispatch to the right sub.
* There is some groundwork for #17, and maybe it already works. I
  can't tell if it does because there are no tests for it yet.
* Also some minimal groundwork for #9 (parallel execution).
* Additionally, issue #14 should be more approachable now (because
  deps are now resolved).
* Issue #15 (‘default’ task) was reworked a bit (with no notable
  functional changes).

This commit splits Sake.pm6 into separate files for convenience. The
hierarchy is perhaps not entirely right, but now it is much easier to
refactor it further with all the tests.

Because almost all lines were touched, this commit introduces some
major code style changes (to my personal preference, e.g. unicode
quotes). I'm not insisting on that style, so if anybody cares enough
it should be possible to submit a PR with unicode stuff autoreplaced.

I wish this commit was split into multiple digestable commits, but it
was a single refactoring effort that I ended up shelving for a few
months anyway, so I'm happy that it goes in at all.
@AlexDaniel AlexDaniel removed their assignment Oct 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants