xproc / 3.0-steps

Repository for change requests to the standard step library and for official extension steps
10 stars 7 forks source link

Error code XC0201 used in two different cases: #567

Closed xml-project closed 3 months ago

xml-project commented 3 months ago

Random finding: For p:uncompress we have:

It is a dynamic error (err:XC0201) if the p:uncompress step cannot perform the requested content-type cast.

and for p:run we have:

It is a dynamic error (err:XC0201) if the dynamically executed pipeline implicitly or explicitly declares a primary input port with a different name than implicitly or explicitly specified in the p:run invocation. Input ports of the dynamically executed pipeline that are not declared with p:run-input on the p:run invocation will receive a p:empty connection.

I think these a clearly two different cases and we need to fix this. Proposal: Change error code for p:run to another code.

gimsieke commented 3 months ago

The p:uncompress error isn’t listed in https://github.com/xproc/3.0-specification/wiki/Error-Codes The other p:run codes are in the same low 200s range. Therefore we should maybe change the uncompress error code (and add it to the wiki table and to the errata).

xml-project commented 3 months ago

@gimsieke Right: It was obviously a problem coming in with p:uncompress. I thought it would be less disruptive because the standard step lib with "p:uncompress" is in a community report. Additionally we might break existing pipelines using this step. p:run on the other hand is not in a community report (so users should be aware of their experimental pipelines). Does this make sense?

gimsieke commented 3 months ago

Yes, absolutely. Let’s keep C0201 for uncompress.

xml-project commented 3 months ago

The same problem for XC0202: Used in p:uncompress and p:run with very different descriptions.

gimsieke commented 3 months ago

I could/should have looked at the rendered step spec before trying to register the codes for p:run. Some forensic investigation revealed that C0201 and C0202 in p:uncompress have been introduced (by Erik) a year before I registered them for p:run on the wiki page. Maybe no-one told Erik about the wiki page before November, 2019. His first edit on the wiki page dates back to Nov. 4, 2019, while the additions of C0201 and C0202 date back to September, 2019. On October 16, 2019, he removed C0200 from p:uncompress which would otherwise be a third duplicate. All hail revision control!

ndw commented 3 months ago

Fixed by #568, I believe.