p:log checks for a writable path too early? #234

Closed
ndw opened this Issue Dec 30, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@ndw
Owner

ndw commented Dec 30, 2015

Strasser writes on xproc-dev:

Using p:log for debugging my pipelines I remarked that the existence
of path is checked before everything else which disallow to create
subdirectory before the step that is logged is executed.
The attached example in Calabash 1.1.4 show in the first run:
Failed to create log: file: XXXXXX
Is this the correct behaviour?

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="1.0"
    xmlns:cx="http://xmlcalabash.com/ns/extensions"
    xmlns:pxf="http://exproc.org/proposed/steps/file"
    name="pipeline">
    <p:output port="result" primary="true"/>
    <p:input port="source" primary="true">
        <p:inline>
            <root>
                A
            </root>
        </p:inline>
    </p:input>
    <p:import href="http://xmlcalabash.com/extension/steps/library-1.0.xpl"/>

    <pxf:mkdir href="subdir" name='createdir'/>

    <p:identity cx:depends-on='createdir'>
        <p:input port="source">
            <p:pipe step="pipeline" port="source" />
        </p:input>
        <p:log port="result" href="subdir/file" />
    </p:identity>

</p:declare-step>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment