Questions tagged [shake-build-system]

Shake is a Haskell library for writing build systems - designed as a replacement for make.

Shake is a Haskell library for writing build systems - designed as a replacement for make. Website at https://shakebuild.com/.

127 questions
1
vote
1 answer

In shake-build, how to run a command with a pipe in it?

I can't seem to get the following to work in shake: cmd_ (AddEnv "PGPASSWORD" "REDACTED") "bzcat /tmp/db.sql.bz2 | psql -U pguser -h localhost dbname"
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
1
vote
1 answer

How to build a versioned (or checksummed) file using shake-build?

My Elm build commands produce a versioned/checksummed JS file, which looks like main.[checksum].js. How do I handle this with shake (specifically, I can't figure out how to write the wantdeclaration for this, as the filename would change every…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
1
vote
1 answer

Correct way to implement "yarn install" in shake-build?

My question might be a duplicate of Shake depending on on node_modules directory I'm new to shake-build and got stumped with the very first thing that I wanted to do. Basically, I want to run yarn install whenever the yarn.lock OR package.json file…
Saurabh Nanda
  • 6,373
  • 5
  • 31
  • 60
1
vote
1 answer

Where should Shake Share's .shake.cache directory be stored?

We're planning to start using Shake's share functionality more heavily, and one question that has come up is where to store the "share" cache. Should it be (ignored by VCS) in the code repository so that it gets regularly cleaned, or is the…
mavnn
  • 9,101
  • 4
  • 34
  • 52
1
vote
1 answer

If you have created limited resources in Shake, can you tell which resource the current rule is using?

We're hoping to use Shake to run many old Ruby tests in parallel. Many of these tests assume that they have sole control of the test database, so we have been creating multiple instances of the test database and running a test process against each…
mavnn
  • 9,101
  • 4
  • 34
  • 52
1
vote
1 answer

How can I write "unit" tests for Shake rules or actions?

I am writing specialised rules and oracles for Shake and I would like to write tests for those functions. How can I do that in Shake? I did not find any simple to use actionToIO function that could do the job. For example, I would like to test the…
insitu
  • 4,488
  • 3
  • 25
  • 42
1
vote
1 answer

actionFinally not running cmd invoked inside handler

I have the following code fragment: withContainer :: String -> (String -> Action a) -> Action a cid <= cmd "docker" [ "run" , "--rm", "-d", my_image ] ... actionFinally (action containerName) $ do cmd_ "docker" [ "rm", "-f", filter (/=…
insitu
  • 4,488
  • 3
  • 25
  • 42
1
vote
1 answer

Shake: automatically deleting file after failed command

Using Shake, to create an mp3 (this is just a learning example), I use lame, and then id3v2 to tag it. If the lame succeeds, but the id3v2 fails, then I'm left with the mp3 file in place; but of course it is "wrong". I was looking for an option to…
user3416536
  • 1,429
  • 9
  • 20
1
vote
1 answer

In Shake, does the definition order of Rules matter?

If I have a general build rule for *.o object files but a more specific build rule for a foo.o object file, does the definition order matter?
Dale Wijnand
  • 6,054
  • 5
  • 28
  • 55
1
vote
1 answer

Can shake generate dependency graph in graphviz format?

Using --profile makes shake generate a report.html file from which one can run queries and generate a dependency graph of build rules. Would it be possible to get that graph in graphviz format instead of needing a browser to display it?
insitu
  • 4,488
  • 3
  • 25
  • 42
1
vote
1 answer

shake build without producing a file for every input file

Building .html files from .md files for a web site, I have some .md files which should not produce an output .html (e.g. because not ready for publication). What is the best way to achieve this with shake? I have a want for html files and a rule…
user855443
  • 2,596
  • 3
  • 25
  • 37
1
vote
2 answers

filepatterns to exclude a match

Shake uses various forms of matching, filepath against pattern. Is there one which can be used to exclude a pattern? Example: I have three directories a, b, c (somewhere in directory x) and each needs html files. There is a rule (dir <>…
user855443
  • 2,596
  • 3
  • 25
  • 37
1
vote
1 answer

Is there a way to run shake assuming some rule is up-to-date?

We would like to run a Shake build while assuming some target is built, e.g. something like ./Build.hs --dont-rebuild my-target Reading the docs it seems there should be a way to do that but I can't find it.
insitu
  • 4,488
  • 3
  • 25
  • 42
1
vote
1 answer

Generating a visual dependency graph with shake

I'd like to see a dependency graph of GHC's modules. Can I use GHC's Shake-based build system, Hadrian, to generate one?
sjakobi
  • 3,546
  • 1
  • 25
  • 43
1
vote
2 answers

Shake: How to set an environment variable upon invocation?

In a Makefile, one can refer to arguments set at the command line at the time one invokes make. For instance, the recipe in a rule might include the command python/subsample.py $(subsample_size), which one invokes at the command line by typing…
1 2 3
8 9