Community
Participate
Working Groups
Build ID: I20070625-1500 Steps To Reproduce: 1. Create a C++ Hello World project. 2. Add a builder: /bin/sh.exe -c "touch C:/hello.txt". 3. Build configurations->Build->All - The additional builder did not run. Optional steps: 4. Clean, then Project Build. - The additional build did run. 5. Clean, then switch to another configuration, Build project. - The additional build did run. 6. Clean, then Build configurations->Build->All - The additional builder did not run. More information: I looked at the following bugs but they seem a little different or marked as fixed. https://bugs.eclipse.org/bugs/show_bug.cgi?id=194003 https://bugs.eclipse.org/bugs/show_bug.cgi?id=193808 https://bugs.eclipse.org/bugs/show_bug.cgi?id=194026
I'll see.
Mark, I cannot reproduce your problem neither with the latest HEAD CDT code nor with cdt4_0 branch. Do you really use summer's CDT 4.0 release ? Is it possible for you to try CDT 4.0.3 ? Another question, to avoid my misunderstanding. How do you reproduce the problem, exactly ? My actions are: 1. Create C++ Hello World project with Cygwin TC 2. Open its properties 3. C/C++ Build -> Builder Settings tab 4. Uncheck "use default build command" checkbox 5. Set build command text to: sh -c "touch C:/hello.txt" 6. Switch Configuration from Debug to Release 7. Repeat steps 4, 5 for Release configuration 8. Press OK. 9. Context menu -> Build configurations -> Build -> All. Do you perform the same actions ? Result in my case: [first screen] **** Clean-only build of configuration Debug for project touch **** sh -c touch C:/hello.txt clean **** Build of configuration Debug for project touch **** sh -c touch C:/hello.txt all [second screen] **** Clean-only build of configuration Release for project touch **** sh -c touch C:/hello.txt clean **** Build of configuration Release for project touch **** sh -c touch C:/hello.txt all
Hi Oleg, Thanks for looking at this issue. I'm not sure we did the same thing. Here are the differences: 1) Additional builder I added is a new external program. It's meant to run before the CDT Builder. 1.1) Right-click on HelloWorldC++ProjectCygwinGCCToolchain project->Properties->Builders 1.2) Click New->Program. Location: C:\cygwin\bin\sh.exe Working Directory: {workspace_loc:/HelloWorldC++ProjectCygwinGCCToolchain} Arguments: -c "touch C:/hello.txt" 2) I did not uncheck the "use default build command". This is only for what make is used in the CDT builder right? I don't think it matters in this case. I've attached a screen shot to try to make it clear. Additional info: I tried looking at the CDT_4_0 code. My guess is that it is in ManagedBuildManager.java line 4625. However, I can't seem to build CDT at the moment to test it out. --Snip-- private static void buildConfigurations(final IProject project, IConfiguration[] configs, IBuilder builder, final IProgressMonitor monitor) throws CoreException{ // final IProject project = configs[0].getOwner().getProject(); final boolean runAllBuidlers = false; // MARK: Maybe This should be true? ... --Snip-- I hope this helps. Thanks! Regards, Mark
Created attachment 92972 [details] Additional Builders. Screenshot about additional builders mentioned in this bug.
Created attachment 92973 [details] First proposed patch. Patch to run other builders when doing Build Configurations->Build->All.
Hi Oleg, I managed to get my CDT running off CVS (cdt_4_0 branch) now. By the way, to get the Builders preference page, I enabled the org.eclipse.ui.externaltools. I submitted a patch for a partial solution. This will run the other builders. However, this will only run it once. I believe we should run the builders once for each configuration. Just like they would if you built each configuration one by one. Perhaps you can help in changing the code? Thanks! Regards, Mark
Hi Mark. Your patch is applied. Really, the affected code was inherited from old one in cdt.make, and now nobody (AFAIK) know the reason why additional builders were disabled here. Anyway, your change made "Build All" feature consistent with usual build workflow. Thanks !
Hi Oleg, I am running CDT 5.0 downloaded from the wiki page today (May 29th) and I have verified that my builder, which runs after CDT builders, is in fact called, but I wish to know which configurations were built (my builder uses this information). This information is already available on builder invocation on the "map" variable, but this is passed only to the CDT builder org.eclipse.cdt.managedbuilder.core.genmakebuilder. Is there a problem on passing on this argument as well on other builder invocations? Is there some other way I can retrieve this information? I'm guessing the answers would be "no" and "no" :) Is it in time to include this on CDT 5.0? Otherwise I will have to keep working around this situation (I'm using IResourceChangeListener on my workaround, not very pleasant :) ). Thanks in advance, Julia
This bug isnt actually resolved, at last in 5.0.0.200806171202.. I having problems with external builders - they simply don't work..
Actually it seems to start working, when my external builder became the only active builder for project, otherwise it is ignored..