Code Monkey home page Code Monkey logo

ake's Introduction

ake Tests on source

ake is a make-a-like implemented in Raku. It was inspired by rake.

Installation

Ake is easily installable with zef:

zef install ake

If you are using rakubrew in shim mode you will need to run rakubrew rehash to make the ake executable available.

Current status

Ake is fully-functional but may lack some advanced features. Feature requests and PRs are welcome!

Example

Create a file named Akefile with these contents:

task 'buy-food', {
    say 'Bought a salad.'
}

task 'shower', {
    say 'Showered.'
}

task 'morning' => <shower buy-food>;

task 'dinner' => <buy-food>, {
    say 'Yummy!'
}

Then you will be able to run ake from the same directory (e.g. ake morning).

License

Ake is available under Artistic License 2.0.

ake's People

Contributors

alexdaniel avatar coke avatar jj avatar lizmat avatar patrickbkr avatar perlpilot avatar tbrowder avatar zoffixznet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ake's Issues

Using run in (non-)sink context

Let's say we have these tasks:

task run, {
    run false; # FAIL!!!
}

task finish => run, {
    say finish
}

Try sake finish.
Some would argue that using run without checking the result is wrong. However, a typical makefile can have a lot of calls to other commands, and writing a check for each of them is probably an overkill given that failed procs will blow up in sink context anyway. But there is one issue which is demonstrated above. The last statement will be returned from the block, so it fails silently. It can be easily fixed by writing something like:

task run, {
    run false; # FAIL!!!
    True # ← make sure we are not sinking our proc
}

But I think that Sake can do something to prevent this trap.

Dependency tree visualization with graphviz

Would be great to have something like sake --dot which will dump a dot file that can be used by graphviz. It should include information on what can be parallelized and what cannot.

`ake` not found

After installing using zef, and apparently installing correctly two scripts, ake seems not to be found in the PATH, while sake is.

Test framework for half-resolved issues

There are several open tickets with testneeded label and it would be nice to close them with tests. In whateverable I mainly do system testing, so every test is a command that is sent to the bot on an actual IRC server. While some would consider this approach improper (at least when used alone without unit tests), I feel more comfortable knowing that the functionality is tested thoroughly in an exhaustive manner. This helped me reveal memory issues, left file handles, segfaults and other issues in rakudo from whateverable test suite. Maybe something like that should be implemented for sake also (i.e. a testing framework that runs actual Sakefiles, looks at results and cleans up).

Call zef as a library

I'm not so sure this is possible right now, but it would be great if we could call it directly from the program without the need to get out to the shell and invoke it.

Pass the current task into the block

Otherwise there's no easy way to get the required information sometimes, as far as I can see. Block params are not used anyway, and passing it like this will make it available in $_.

I needed it when I wanted to use a junction as a task name (e.g. task ‘test’ | ‘t’, { … }), but still be able to see which one was used exactly. Sure, I can dive into @*ARGS but that's less than awesome.

From the top of my head:

     method execute { 
         return unless self.cond.();
         for self.deps -> $d { execute($d); }
-        self.body.(); 
+        self.body.(self); 
     }

+    method Str() {
+        $.name
+    }

Parallel execution

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.

“Sake” is overused, come up with something else

See these:

It doesn't really matter who was first, just let them have it. We can come up with a better name.

For inspiration:

I think it's time to up our game and call it 6ake.

There's also this idea:

<MasterDuke> you could rename ours to psake, with a silent 'p'

Thoughts?

sake help

Would it be nice to have 'sake help' to show the tasks in the order they were defined, along with any POD help assigned to the task?

Can't install Sake ( git clone from GH version )

Hi! I can't install Sake:

[root@cde86d46de7a p6-sake]# zef install . --force-install
===> Testing: sake
Warning: re-executing task “fred” per your request
===> Testing [OK] for sake
===> Installing: sake
===> Install [FAIL] for sake: ===SORRY!===
Could not find Sake::Task at line 1 in:
/opt/rakudo-pkg/share/perl6/site
/opt/rakudo-pkg/share/perl6/vendor
/opt/rakudo-pkg/share/perl6
CompUnit::Repository::AbsolutePath<63251904>
CompUnit::Repository::NQP<41782416>
CompUnit::Repository::Perl5<41782456>

===SORRY!===
Could not find Sake::Task at line 1 in:
/opt/rakudo-pkg/share/perl6/site
/opt/rakudo-pkg/share/perl6/vendor
/opt/rakudo-pkg/share/perl6
CompUnit::Repository::AbsolutePath<63251904>
CompUnit::Repository::NQP<41782416>
CompUnit::Repository::Perl5<41782456>

Blin breakage after rename (?)

STEP 13: RUN git clone https://github.com/perl6/Blin.git && cd Blin && zef install --verbose --deps-only .
Cloning into 'Blin'...
remote: Enumerating objects: 154, done.
remote: Counting objects: 100% (154/154), done.
remote: Compressing objects: 100% (82/82), done.
remote: Total 265 (delta 67), reused 115 (delta 41), pack-reused 111
Receiving objects: 100% (265/265), 108.27 KiB | 680.00 KiB/s, done.
Resolving deltas: 100% (115/115), done.
===> Searching for missing dependencies: File::Directory::Tree, File::Temp, JSON::Fast, Whateverable
===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updating p6c mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated p6c mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Found dependencies: Whateverable:ver<1.0.9>, File::Directory::Tree:auth<labster> [via Zef::Repository::Ecosystems<p6c>]
===> Found dependencies: JSON::Fast:ver<0.10>, File::Temp:ver<0.0.8> [via Zef::Repository::Ecosystems<cpan>]
===> Searching for missing dependencies: App::GPTrixie, Config::INI, Cro, Cro::HTTP::Client, Digest, Digest::HMAC, Digest::SHA256::Native, HTTP::Server::Async, HTTP::UserAgent, IO::Socket::SSL, IRC::Client, IRC::TextColor, Number::Denominate, Pastebin::Gist, SVG::Plot, ake, Stats, Terminal::ANSIColor, Text::Diff::Sift4
===> Found dependencies: Cro::HTTP:ver<0.8.3>, Cro::Core:ver<0.8.3>, Digest::SHA256::Native:ver<0.03> [via Zef::Repository::Ecosystems<cpan>]
===> Found dependencies: IRC::Client:ver<3.007011>, Number::Denominate:ver<2.002001>, Pastebin::Gist:ver<1.004002>, Text::Diff::Sift4:ver<1.4.1>, HTTP::UserAgent:ver<1.1.49>:auth<github:sergot>, Digest::HMAC:ver<1.0.0>:auth<github:retupmoca>, App::GPTrixie:ver<0.29>, Terminal::ANSIColor:ver<0.5>, Digest:ver<0.3.4>:auth<Lucien Grondin>, IRC::TextColor:ver<0.3.0>:auth<github:samcv>, HTTP::Server::Async:ver<0.1.9>:auth<github:tony-o>, Stats:ver<0.0.6>:auth<github:MattOates>, ake:ver<0.0.3>:auth<Jonathan Scott Duff <[email protected]>>, IO::Socket::SSL:ver<0.0.1>:auth<github:sergot>, SVG::Plot, Config::INI [via Zef::Repository::Ecosystems<p6c>]
===> Searching for missing dependencies: IO::Socket::Async::SSL, Test::When, Test::Notice, Lingua::Conjunction, WWW, HTTP::Status, DateTime::Parse, Encode, MIME::Base64, URI, IO::Capture::Simple, Test::Util::ServerPort, XML, OO::Monitors, IO::Path::ChildSecure, Base64, HTTP::HPACK, Cro::TLS, Crypt::Random, JSON::JWT, Log::Timeline, LibraryMake, HTTP::Roles, OpenSSL, SVG
===> Found dependencies: WWW:ver<1.005004>:auth<github:perl6-community-modules>, IO::Path::ChildSecure:ver<1.001011>, Test::When:ver<1.001008>, Test::Notice:ver<1.001003>, Lingua::Conjunction:ver<1.001001>, MIME::Base64:ver<1.2.1>:auth<github:retupmoca>, LibraryMake:ver<1.0.0>:auth<github:retupmoca>, JSON::JWT:ver<1.0>:auth<github:retupmoca>, HTTP::HPACK:ver<0.9.2>, DateTime::Parse:ver<0.9.1>, Crypt::Random:ver<0.4.1>:auth<github:skinkade>, XML:ver<0.3.0>:auth<Timothy Totten>, URI:ver<0.3.0>, HTTP::Roles:ver<0.2.0>:auth<github:tony-o>, OpenSSL:ver<0.1.23>:auth<github:sergot>, Encode:ver<0.0.3>:auth<github:sergot>, Base64:ver<0.0.2>:auth<github:ugexe>, HTTP::Status:ver<0.0.1>, IO::Capture::Simple:ver<v.0.0.1>, SVG [via Zef::Repository::Ecosystems<p6c>]
===> Found dependencies: Test::Util::ServerPort:ver<0.0.2>:auth<github:jonathanstowe>:api<1.0>, OO::Monitors:ver<1.1.1>, Cro::TLS:ver<0.8.3>, IO::Socket::Async::SSL:ver<0.7.5>, Log::Timeline:ver<0.3>
[via Zef::Repository::Ecosystems<cpan>]
===> Searching for missing dependencies: Test::META, Shell::Command, if, XML::Writer
===> Found dependencies: if:ver<0.1.1>:auth<github:FROGGS>, Shell::Command, XML::Writer [via Zef::Repository::Ecosystems<p6c>]
===> Found dependencies: Test::META:ver<0.0.16>:auth<github:jonathanstowe>:api<1.0> [via Zef::Repository::Ecosystems<cpan>]
===> Searching for missing dependencies: META6, License::SPDX, File::Which, File::Find
===> Found dependencies: License::SPDX:ver<3.9.0>:auth<github:jonathanstowe>:api<1.0>, META6:ver<0.0.23>:auth<github:jonathanstowe>:api<1.0> [via Zef::Repository::Ecosystems<cpan>]
===> Found dependencies: File::Which:ver<1.0.1>, File::Find:ver<0.1> [via Zef::Repository::Ecosystems<p6c>]
===> Searching for missing dependencies: JSON::Class:ver<0.0.14+>, JSON::Class:ver<0.0.5+>
===> Found dependencies: JSON::Class:ver<0.0.14>:auth<github:jonathanstowe>:api<1.0> [via Zef::Repository::Ecosystems<cpan>]
===> Searching for missing dependencies: JSON::Marshal:ver<0.0.18+>, JSON::Unmarshal:ver<0.08+>
===> Found dependencies: JSON::Marshal:ver<0.0.18>:auth<github:jonathanstowe>:api<1.0> [via Zef::Repository::Ecosystems<cpan>]
===> Found dependencies: JSON::Unmarshal:ver<0.08> [via Zef::Repository::Ecosystems<p6c>]
===> Searching for missing dependencies: JSON::Name
===> Found dependencies: JSON::Name:ver<0.0.4>:auth<github:jonathanstowe>:api<1.0> [via Zef::Repository::Ecosystems<cpan>]
===> Fetching [OK]: File::Temp:ver<0.0.8> to /root/.zef/tmp/1592142347.18.3348.3523544732084/File-Temp-0.0.8.tar.gz
===> Fetching [OK]: JSON::Fast:ver<0.10> to /root/.zef/tmp/1592142347.18.5159.293804783024/JSON-Fast-0.10.tar.gz
===> Fetching [OK]: File::Directory::Tree:auth<labster> to /root/.zef/tmp/1592142347.18.8091.931606431527/p6-file-directory-tree.git
===> Fetching [OK]: IRC::Client:ver<3.007011> to /root/.zef/tmp/1592142347.18.2271.4224417178852/perl6-IRC-Client.git
===> Fetching [OK]: Whateverable:ver<1.0.9> to /root/.zef/tmp/1592142347.18.2279.2832409143125/whateverable.git
===> Fetching [OK]: Pastebin::Gist:ver<1.004002> to /root/.zef/tmp/1592142349.18.2036.4953168479417/perl6-Pastebin-Gist.git
===> Fetching [OK]: Text::Diff::Sift4:ver<1.4.1> to /root/.zef/tmp/1592142349.18.3343.7023033219525/text-diff-sift4.git
===> Fetching [OK]: Digest::HMAC:ver<1.0.0>:auth<github:retupmoca> to /root/.zef/tmp/1592142349.18.2441.0403306701533/P6-Digest-HMAC.git
===> Fetching [OK]: Number::Denominate:ver<2.002001> to /root/.zef/tmp/1592142349.18.7284.239478744151/perl6-Number-Denominate.git
===> Fetching [OK]: Cro::HTTP:ver<0.8.3> to /root/.zef/tmp/1592142350.18.9646.599414469993/cro-http-0.8.3.tar.gz
===> Fetching [OK]: HTTP::UserAgent:ver<1.1.49>:auth<github:sergot> to /root/.zef/tmp/1592142349.18.3918.7486991728747/http-useragent.git
===> Fetching [OK]: Cro::Core:ver<0.8.3> to /root/.zef/tmp/1592142350.18.2522.2082239047627/cro-core-0.8.3.tar.gz
===> Fetching [OK]: App::GPTrixie:ver<0.29> to /root/.zef/tmp/1592142350.18.2271.953696613047/gptrixie.git
===> Fetching [OK]: Terminal::ANSIColor:ver<0.5> to /root/.zef/tmp/1592142351.18.8501.570836335006/Terminal-ANSIColor.git
===> Fetching [OK]: Digest:ver<0.3.4>:auth<Lucien Grondin> to /root/.zef/tmp/1592142351.18.9664.250292817433/libdigest-perl6.git
===> Fetching [OK]: Digest::SHA256::Native:ver<0.03> to /root/.zef/tmp/1592142352.18.5005.843682953464/Digest-SHA256-Native-0.03.tar.gz
Username for 'https://github.com': ===> Fetching [OK]: Stats:ver<0.0.6>:auth<github:MattOates> to /root/.zef/tmp/1592142352.18.7580.642483663665/Stats.git
===> Fetching [OK]: HTTP::Server::Async:ver<0.1.9>:auth<github:tony-o> to /root/.zef/tmp/1592142352.18.7206.513162957446/perl6-http-server-async.git
===> Fetching [OK]: IRC::TextColor:ver<0.3.0>:auth<github:samcv> to /root/.zef/tmp/1592142352.18.3503.8435975646166/IRC-TextColor.git
===> Fetching [OK]: Test::Util::ServerPort:ver<0.0.2>:auth<github:jonathanstowe>:api<1.0> to /root/.zef/tmp/1592142355.18.29.182089555259694/Test-Util-ServerPort-0.0.2.tar.gz
===> Fetching [OK]: IO::Socket::SSL:ver<0.0.1>:auth<github:sergot> to /root/.zef/tmp/1592142355.18.3934.771753566396/io-socket-ssl.git
==> Fetching [OK]: Config::INI to /root/.zef/tmp/1592142355.18.6901.6662260417725/perl6-Config-INI.git
===> Fetching [OK]: SVG::Plot to /root/.zef/tmp/1592142355.18.1075.3393474272066/svg-plot.git
===> Fetching [FAIL]: ake:ver<0.0.3>:auth<Jonathan Scott Duff <[email protected]>> from git://github.com/Raku/raku-ake.git
Aborting due to fetch failure: ake:ver<0.0.3>:auth<Jonathan Scott Duff <[email protected]>> (use --force-fetch to override)
Error: error building at STEP "RUN git clone https://github.com/perl6/Blin.git && cd Blin && zef install --verbose --deps-only .": error while running runtime: exit status 1

Suspicious points are: Username for 'https://github.com': <- wait, what?

I saw it previously for another module, reported at tony-o/db-xoos-mysql#1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.