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

Error when running Ninja file #565

Closed
ndmitchell opened this issue Feb 14, 2018 · 1 comment
Closed

Error when running Ninja file #565

ndmitchell opened this issue Feb 14, 2018 · 1 comment
Labels

Comments

@ndmitchell
Copy link
Owner

ndmitchell commented Feb 14, 2018

Given:

ninja_required_version = 1.5
build test : phony a b
rule CUSTOM_COMMAND
   command = $COMMAND
build a b : CUSTOM_COMMAND
  COMMAND = cd

It fails with:

# cd (for a b)
shake: Error when running Shake build system:
* b
Prelude.!!: index too large

Reported by Lukas Mosimann at https://groups.google.com/d/msg/shake-build-system/435NOk6hZzc/P3LcADLnBQAJ

@ndmitchell
Copy link
Owner Author

The problem is that Ninja rules don't have to create their contents - so even though build a b says it creates a and b, it actually doesn't. Shake on the other hand demands that files are created. There is a flag for Shake to have Ninja compatible behaviour, but I had messed it up in relation to multi-file rules. Now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant