Bug 372552 - More than one target in Build Sequence doesn't build anything
Summary: More than one target in Build Sequence doesn't build anything
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (show other bugs)
Version: 5.0.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 384169 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-16 20:28 UTC by Jakub Schmidtke
Modified: 2018-11-16 10:24 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Schmidtke 2016-11-16 20:28:02 UTC
Build sequence seems to be broken.

When I add a single target (TargetA) to it and press F8, it builds that target.
When I add another one (TargetB) and press F8, all I get in the message window is:

project/path/build> make -j4 TargetB
** Killed process **

And it doesn't even try to build TargetA before.
As soon as I remove either target from the list (doesn't matter which one),
it starts to build the remaining target again.
Comment 1 Kevin Funk 2016-11-16 21:59:10 UTC
Can reproduce. For me that only happens when using two non-top-level build targets though. Investigating.
Comment 2 Kevin Funk 2016-11-17 00:29:13 UTC
Okay, I was wrong, this was never really supported. This is the logic for killing previous make jobs (which has been in KDevelop for several years already):

```
KJob* MakeBuilder::runMake( KDevelop::ProjectBaseItem* item, MakeJob::CommandType c,
                            const QStringList& overrideTargets,
                            const MakeVariables& variables )
{
    ///Running the same builder twice may result in serious problems,
    ///so kill jobs already running on the same project
    foreach (MakeJob* makeJob, m_activeMakeJobs.data())
    {
        if(item && makeJob->item() && makeJob->item()->project() == item->project() && makeJob->commandType() == c) {
            qCDebug(MAKEBUILDER) << "killing running make job, due to new started build on same project:" << makeJob;
            makeJob->kill(KJob::EmitResult);
        }
    }
    ...
```

We need to overthink that in order to support your use-case. I'm surprised noone  else stepped over it yet, though...
Comment 3 Kevin Funk 2016-11-17 00:29:35 UTC
Removing 'regression' keyword.
Comment 4 Jakub Schmidtke 2016-11-18 01:27:43 UTC
But I'm pretty sure it worked fine in kdevelop 4.7.3 and below...
Each target would get built, in order, until something failed or all were finished.

As a side question, 'F4' key used to jump to the next search result, build problem, etc. Now it only works when I do a global search (Ctrl-Alt-F).
When I run a build and something fails, F4 doesn't do anything.
Is it expected, am I doing something wrong, or is it a bug
(and I should open a separate one)?
Comment 5 Kevin Funk 2017-08-30 10:49:18 UTC
*** Bug 384169 has been marked as a duplicate of this bug. ***
Comment 6 Gerhard 2017-08-30 11:56:43 UTC
I can confirm, this definitely worked in kdevelop4.
Isn't that the purpose of this feature, if you have a big project and only work on well-defined parts of it, you would put the subfolders in question into the build set and thus compile and link only what you need.
Calling the root level makefile would take much too long, if the project is big.
Comment 7 Jakub Schmidtke 2017-12-06 17:32:23 UTC
It still doesn't work in 5.2.1 version.

And yes, I have no idea why there even IS a "build sequence" list,
if it doesn't support building multiple things...
Comment 8 Matt Whitlock 2018-05-26 18:42:52 UTC
(In reply to Jakub Schmidtke from comment #7)
> And yes, I have no idea why there even IS a "build sequence" list,
> if it doesn't support building multiple things...

It does support building multiple *projects*. It just doesn't support building multiple *targets* within one project.
Comment 9 Jakub Schmidtke 2018-05-26 22:37:35 UTC
(In reply to Matt Whitlock from comment #8)
> It does support building multiple *projects*. It just doesn't support
> building multiple *targets* within one project.

Quite possible, I never use it in that fashion.
And still, building multiple *targets* within one project worked just fine in kdevelop4.
Comment 10 Gerhard 2018-11-16 10:24:00 UTC
I just tested kdevelop 5.3.0, hoping that it would finally be possible to build multiple targets/subfolders within one project, but it still doesn't work in the fashion it worked in kdevelop4.
It seems to me that disabling multiple targets was a deliberate "improvement" in kdevelop5, but reading the comments in this bug report there are quite some users who would be glad to see it working in the old way, too. Would it be possible to re-enable the feature, make it work for multiple targets and projects?
Since I always work on one big project, the build set feature is, I'm sorry to say it, really useless for me like it is.