Ticket #60 (assigned enhancement)

Opened 1 year ago

Last modified 1 month ago

Phing Doesn't Fail When PhpDoc Task Fails

Reported by: ashnazg@php.net Assigned to: hans (accepted)
Priority: minor Milestone: 3.0
Component: phing-tasks-ext Version: 2.2.0
Keywords: Cc:

Description

Phing does not fail when a Phpdoc child task itself fails, and I can't tell from the manual that there is any way to tell Phing to fail when the PhpDoc task fails.

I've tested this several ways:

  • put bad values in phpdoc's args, to force an "ERROR" message from phpdoc itself;
  • kill the php process while phpdoc was running;
  • phpdoc threw an malloc() failure due to low memory;

In all cases, Phing just keeps going like the phpdoc task finished successfully. I even put two phpdoc tasks in the same phing target, thinking perhaps the target would fail after the first phpdoc task failed, but no, it went right on to the second phpdoc task.

Shouldn't it be reporting a build failure when the phpdoc task failed, or is this an enhancement that needs to be added to Phing? Or, worse, is Phing already supposed to fail but Phpdoc is returning a success exit code even when it itself fails?

Attachments

Change History

01/25/07 19:42:29 changed by mrook

The Phing task *should* fail (throw a BuildExcepion) when phpdoc returns a non-zero exit code.

Additionally, any lines containing "ERROR" should be posted to the Phing error log (but do not necessarily trigger a BuildException).

01/25/07 21:44:54 changed by ashnazg@php.net

Given that one of the last files written by a successful PhpDoc run is the "errors.html" file, I'm working around this issue like this:

<phpdoc destdir="docs" sourcepath="." output="HTML:Smarty:HandS" /> <available file="docs/errors.html" property="doc_completed" value="true" /> <fail unless="devdoc_completed" message="It APPEARS that the Doc generation failed." />

02/05/07 18:15:33 changed by hans

  • owner set to hans.
  • status changed from new to assigned.
  • version changed from 2.2.0RC3 to 2.2.0.
  • milestone set to 2.2.1.

07/05/07 17:38:55 changed by anonymous

08/02/07 01:38:57 changed by hans

  • component set to cruisecontrol-builder-plugin.
  • milestone changed from 2.2.1 to 2.3.0.

08/28/07 00:54:31 changed by hans

  • milestone changed from 2.3.0 to 3.0.

I'm actually going to move this ahead in the hopes that newer versions of phpdoc will provide more potential for interop. Currently we are calling the phpdoc API directly and it is a completely atrocious API. One can only hope that they rectify this in future versions.

08/28/07 00:55:06 changed by hans

  • component changed from cruisecontrol-builder-plugin to phing-tasks-ext.

08/28/07 01:33:06 changed by ashnazg@php.net

Thanks for the update.

I actually came onboard as one of the PhpDocumentor maintainers this year, and I'm hoping to keep Phing's needs in mind as I refactor things towards an improved v2.0. I have this bookmarked (http://phing.tigris.org/servlets/ReadMsg?listName=dev&msgNo=441) to use as some level of guidance in my planning.

So, any specific things that phing would like to see can be directed to me. I can open any needed request items at pear.php.net to record them if no one at phing has a PEAR account. I'm looking forward to making these two products work together well in the PHP Continuous Integration realm.


Add/Change #60 (Phing Doesn't Fail When PhpDoc Task Fails)