Allow manually specifying both deps and outputs for a command
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
Some things are just too hard to automatically handle. For these cases, allow
specifying deps and outputs manually for running a command. This could happen,
for example, via keyword arguments to the run command.
This could be implemented with a separate Runner, but I am unsure how to use
multiple runners in the same Builder.
This should be an enhancement.
Original issue reported on code.google.com by nuutti.k...@gmail.com
on 6 Jul 2013 at 6:09
Google Code Exporter commented
You can always do it manually.. you have all of python.
Original comment by pjimen...@gmail.com
on 9 Jul 2013 at 9:48
- Added labels: ****
- Removed labels: ****
Google Code Exporter commented
I think you'd do this by subclassing Runner and overriding the __call__ method
to return the deps and output "manually". Then you'd use multiple Builder
instances with the various runners you need.
Original comment by benh...@gmail.com
on 9 Jul 2013 at 10:06
- Added labels: ****
- Removed labels: ****
Google Code Exporter commented
If I use multiple Builder instances, will I still get correct ".deps" file
handling? I peeked at the source code and the writing of ".deps" happens via
atexit handler - if there are multiple Builders, doesn't this mean that the
last one to exit will overwrite earlier deps?
Concretely, I would hope for one of:
run('command', deps=['a.txt', 'b.txt'], outputs=['c.txt'])
run_manual('command', deps=['a.txt', 'b.txt'], outputs=['c.txt'])
run('command', deps=['a.txt', 'b.txt'], outputs=['c.txt'], runner=my_custom_runner)
run_runner(my_custom_runner, 'command', deps=['a.txt', 'b.txt'], outputs=['c.txt'])
Or something similar.
Original comment by nuutti.k...@gmail.com
on 9 Jul 2013 at 12:05
- Added labels: ****
- Removed labels: ****
Google Code Exporter commented
I do this myself, and there's a simple solution in the attached patch that
works for my purposes.
run('command', deps=['a.txt', 'b.txt'], outputs=['c.txt'])
Mind you, I don't use parallel building and by the looks of it that's a
different code path in which these manual settings won't be used.
Original comment by daniel.l...@gmail.com
on 24 Jul 2013 at 2:17
- Added labels: ****
- Removed labels: ****
Attachments: