Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 291446

Summary: Provide hook for extra actions after fetching code from repo and before compiling it (e.g. code generation, parser generators, etc.)
Product: z_Archived Reporter: Jacek Pospychala <jacek.pospychala>
Component: Dash AthenaAssignee: Nick Boldt <nboldt>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nboldt, spektom
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 291447    
Attachments:
Description Flags
patch
none
refactor existing code for calling into buildExtra.xml; implement multiple PDE targets (prefetch, postfetch, etc.) none

Description Jacek Pospychala CLA 2009-10-06 04:02:55 EDT
As discussed at dash-dev, Athena could invoke custom Ant target for such actions as code generation or compiler generation. They need to take place before compiling code and usually after some metadata (e.g. code templates) has been downloaded from code repository.

Traditionally in PDE Build we used customTarget.xml postFetch or preGenerate.
Alternatively project's customBuildCallbacks.xml file could have been used for that purpose.
Comment 1 Jacek Pospychala CLA 2009-10-06 04:09:22 EDT
Created attachment 148858 [details]
patch

Patch that adds extra target postFetch to buildExtra.xml

I'm not entirely happy with it, because it obviously calls for analogue targets for preGenerate, postGenerate, etc. etc.
Maybe another, more generic, solution can be hammered here.
Or maybe Athena  should keep the number of custom targets to minimum to avoid confusion, e.g. between postFetch and preGenerate
Comment 2 Nick Boldt CLA 2009-10-06 11:59:08 EDT
I could iterate thru a list of targets using <for> and check the buildExtra.xml for each one... how many of these steps are actually needed?
Comment 3 Michael Spector CLA 2009-10-06 13:09:28 EDT
(In reply to comment #2)
> I could iterate thru a list of targets using <for> and check the buildExtra.xml
> for each one... how many of these steps are actually needed?

Right now we need only one step - generating parser source code before compiling.
Comment 4 Nick Boldt CLA 2009-10-06 15:36:19 EDT
Created attachment 148931 [details]
refactor existing code for calling into buildExtra.xml; implement multiple PDE targets (prefetch, postfetch, etc.)
Comment 5 Nick Boldt CLA 2009-10-06 18:01:29 EDT
Patch was incomplete, but I've fixed it and rolled it out onto build.eclipse.org. Tested w/ several builds - all are still green (or back to green) after my change (and fix).

As to the PDT 2.2 build, which inspired this request, here's the console log:

https://build.eclipse.org/hudson/job/cbi-pdt-2.2-helios/4/console

There are 3E, 15F out of 1600 tests run.

https://build.eclipse.org/hudson/job/cbi-pdt-2.2-helios/ws/build/N200910061734/testresults/html/org.eclipse.php.core.tests_linux.gtk.html

Not bad!

Jacek, Michael: Can we close this bug? (and perhaps open a new one to resolve the failed/erroneous tests?)
Comment 6 Michael Spector CLA 2009-10-07 01:36:32 EDT
(In reply to comment #5) 
> Jacek, Michael: Can we close this bug? (and perhaps open a new one to resolve
> the failed/erroneous tests?)

These tests fail for some other reason, so this bug can be closed.
Comment 7 Nick Boldt CLA 2009-10-07 15:55:40 EDT
Closed.