Issue 45 in fabricate: Allow manually specifying both deps and outputs for a command

23 views
Skip to first unread message

fabr...@googlecode.com

unread,
Jul 6, 2013, 2:09:15 AM7/6/13
to fabrica...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 45 by nuutti.k...@gmail.com: Allow manually specifying both deps
and outputs for a command
http://code.google.com/p/fabricate/issues/detail?id=45

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.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

fabr...@googlecode.com

unread,
Jul 9, 2013, 5:48:23 AM7/9/13
to fabrica...@googlegroups.com

Comment #1 on issue 45 by pjimen...@gmail.com: Allow manually specifying
both deps and outputs for a command
http://code.google.com/p/fabricate/issues/detail?id=45

You can always do it manually.. you have all of python.

fabr...@googlecode.com

unread,
Jul 9, 2013, 6:06:49 AM7/9/13
to fabrica...@googlegroups.com

Comment #2 on issue 45 by benh...@gmail.com: Allow manually specifying both
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.

fabr...@googlecode.com

unread,
Jul 9, 2013, 8:05:34 AM7/9/13
to fabrica...@googlegroups.com

Comment #3 on issue 45 by nuutti.k...@gmail.com: Allow manually specifying
both deps and outputs for a command
http://code.google.com/p/fabricate/issues/detail?id=45

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.

fabr...@googlecode.com

unread,
Jul 24, 2013, 10:17:16 AM7/24/13
to fabrica...@googlegroups.com

Comment #4 on issue 45 by daniel.l...@googlemail.com: Allow manually
specifying both deps and outputs for a command
http://code.google.com/p/fabricate/issues/detail?id=45

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.

Attachments:
manual_deps.patch 1.5 KB
Reply all
Reply to author
Forward
0 new messages