-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow multiline task definitions (or document how to use them, if they are already allowed) #147
Comments
Multi-line task definitions are allowed. However, at the start of each new line, you need to re-specify :: or < or
The following should work: task RunInference :: base=@ main_class=@ kb_file=@ sem_params=@ kb=@ iters=@ |
Thanks, that did indeed work. Is there a place where this is or should be On Mon, Feb 4, 2013 at 11:02 AM, Lane Schwartz [email protected]:
|
Yes, this should be documented, but I don't know where. I haven't done much |
Either put this in https://github.com/jhclark/ducttape/blob/master/tutorial/01-11-shorthand-variables.tape or make a new file for it in that directory. *.tape in the tutorial directory automatically gets compiled into https://github.com/jhclark/ducttape/blob/master/tutorial/TUTORIAL.md (and a LaTeX file) by https://github.com/jhclark/ducttape/blob/master/build-support/doc.sh All of those files are also tested for non-zero exit codes by https://github.com/jhclark/ducttape/blob/master/build-support/test-regression.sh. So that the tutorial is guaranteed to compile. |
For terminal editing, keeping lines to a maximum of 80 characters can be very important. If there are a lot of parameters that a particular task needs to use, it is easy to exceed the 80 character line limit, making terminal editing a pain. It would be nice if ducttape allowed multiline task definitions. An example follows.
Task definition:
task RunInference :: base=@ main_class=@ kb_file=@ sem_params=@ kb=@ iters=@
mem=@ num_docs=@ output_dir=@ num_threads=@ {
Gives this error:
ERROR: Missing opening { brace for task block.
/home/mg1/clone/OntologyLearner/entity_linking_ducttape/entity_linking.tape:6
mem=@ num_docs=@ output_dir=@ num_threads=@ {
Second try, trying to escape the newline with a backslash:
ERROR: Illegal character at start of parameter variable name
/home/mg1/clone/OntologyLearner/entity_linking_ducttape/entity_linking.tape:5
task RunInference :: base=@ main_class=@ kb_file=@ sem_params=@ kb=@ iters=@ \
The text was updated successfully, but these errors were encountered: