Bug 350675 - Invoking debug or execute doesn't rebuild changed files (set in dependencies)
Summary: Invoking debug or execute doesn't rebuild changed files (set in dependencies)
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: run support (show other bugs)
Version: 5.2.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-27 18:01 UTC by Piotr Mierzwinski
Modified: 2022-12-31 05:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Launch Configuration for qtcmd2 (90.74 KB, image/png)
2015-07-27 18:03 UTC, Piotr Mierzwinski
Details
Terminal output of KDevelop for this bug (63.02 KB, text/plain)
2015-07-27 18:05 UTC, Piotr Mierzwinski
Details
CMakeLists.txt from main directory (2.12 KB, text/plain)
2016-09-07 19:56 UTC, Piotr Mierzwinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2015-07-27 18:01:50 UTC
I would like to move from KDevelop 4.7.1 on KDevelop 5 (4.90.90) but it's not so easy. In version 4.7.1 I have configured dependencies containing from couple of subdirectories from inside of my project. The subdirectories are added in "Launch Configurations - > Dependencies" section in newly generated configuration (screen attached). Now when I invoke Shift+F9 shortcut (Execute Launch) KDevelop window disappear, but in processes (result of ps command) application is still visible.
Tested on: git://git.qtcmd.org/qtcmd2.git

Reproducible: Always

Steps to Reproduce:
1. Remove current project configuration by delete subdirecotry ".kdev4"
2. Run KDevelop5 with above mentioned project
3. Press OK in window where is proposed configuration
4. Open some cpp files (for example: src/filelistview.cpp and src/vfs/subsystemmanager.cpp)
5. Add dependencies by option "Run -> Configure Launches"
   In window "Launch Configuration" I select "qtcmd2" from  "qtcmd2" and in section "Dependencies" (here is selected "build") I add subdirectories "libs" and "plugins". After that I move qtcmd2 (entry generated by KDevelop) on bottom. In any doubt please look at the screen (attached). I press: Apply and OK.
6. Invoke Shift+F9

Now KDevelop window disappears.

Actual Results:  
After Shift+F9 is invoking KDevelop window disappears.
Clicking Icon "Execute current launch" (from tool bar) shows only error in build view about cmake (details in attached text file).

Expected Results:  
KDevelop should start build (begining from setting subdirectories in Dependencies section) like it happens in KDevelop 4.7.1 (here all work fine).

KFrameworks from git repository, branch: master cloned at 18-07-2015.
KDevplatform from git repository, branch:master cloned at 25-07-2015.

Additionally I've attached output from terminal and mentioned screen shot.

I'm running KDevelop in KDE4 session using following (sourced) environment:
# export some vars we need
export KF5=~/kf5/usr
export XDG_DATA_DIRS=$KF5/share:$XDG_DATA_DIRS:/usr/share
export XDG_CONFIG_DIRS=$KF5/etc/xdg:$XDG_CONFIG_DIRS:/etc/xdg
export PATH=$KF5/bin:$PATH
export QT_PLUGIN_PATH=$KF5/lib/plugins:$KF5/lib64/plugins:$KF5/lib/x86_64-linux-gnu/plugins:$QT_PLUGIN_PATH
export QML2_IMPORT_PATH=$KF5/lib/qml:$KF5/lib64/qml:$KF5/lib/x86_64-linux-gnu/qml
export QML_IMPORT_PATH=$QML2_IMPORT_PATH
export KDE_SESSION_VERSION=5
export KDE_FULL_SESSION=true
export CMAKE_PREFIX_PATH=$KF5:$CMAKE_PREFIX_PATH
export KDE_SESSION_UID=1000
export XDG_CURRENT_DESKTOP=KDE
export LD_LIBRARY_PATH=$KF5/lib/:$LD_LIBRARY_PATH
export DISPLAY=":0"
# nicer debug messages
c=`echo -e "\033"`
export QT_MESSAGE_PATTERN="%{appname}(%{pid})/(%{category}) $c[31m%{if-debug}$c[34m%{endif}%{function}$c[0m: %{message}"
unset c

eval `dbus-launch`

---
and run KDevelop by:
source /home/piotr/kf5/env_app.sh && /home/piotr/kf5/usr/bin/kdevelop
--
$ cmake --version
cmake version 3.0.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
Comment 1 Piotr Mierzwinski 2015-07-27 18:03:14 UTC
Created attachment 93766 [details]
Launch Configuration for qtcmd2
Comment 2 Piotr Mierzwinski 2015-07-27 18:05:06 UTC
Created attachment 93767 [details]
Terminal output of KDevelop for this bug
Comment 3 Piotr Mierzwinski 2015-08-01 23:34:21 UTC
Update for KDevelop cloned at July 31-st.
In this version KDevelop window doesn't disappear. All seems OK, but building is not calling for changed files.
I mean changed files (in main directory and directory added in dependencies) are not taking into consideration when I call run or when I start debug of project. They didn't rebuild!. In Dependencies ("Launch Configurations") is set "Build".
Comment 4 Aleix Pol 2016-09-06 21:16:11 UTC
Hi,
I have been trying to reproduce the issue but I didn't manage.
Can you confirm that building works on your project? Something seems off: Right-click on one of the items that you like to build and press Build.

Thanks!
Comment 5 Piotr Mierzwinski 2016-09-07 19:55:41 UTC
The issue still persist in current version of KDevelop (app.built at 2016/09/05, from branch 5.0).

In this moment my "Launch Configuration" is default (no dependencies skipping main binary/executable file suggested by KDevelop). In my structure of directories, invoking of F8 (with selected top directory) made building files in whole project. I mean all files including subdirectories. Proper rules are defined in CMakeLists.txt, so I think this is currect result. Unfortunately when I invoke "Run -> Execute Launch" or "Run -> Debug Launch" only changed files which are located in main directory are built. Others (in subdirectories) don't. So after change some file in subdirectory I need to remember to invoke build (F8) and then "Execute Launch". OK. Maybe this is because I don't have defined any dependencies for subdirectories.
So I added this: "qtcmd2/plugins/preview/textviewer". I modified file inside this directory, saved. And invoked "Run -> Execute Launch" (with selected top directory). Unfortunately I got error in Build view. Sorry, I don't remember what. OK. So I run build and when finished again I invoked "Run -> Execute Launch". After this, KDevelop crashed and didn't want to run again :(.
I reported this bug as Bug 368420.

Below please find directories structure of my project (located here: git://git.qtcmd.org/qtcmd2.git).

qtcmd2
qtcmd2/templates
qtcmd2/libs
qtcmd2/libs/xdgmime
qtcmd2/libs/widgets
qtcmd2/libs/utils
qtcmd2/plugins
qtcmd2/plugins/preview
qtcmd2/plugins/preview/archiveviewer
qtcmd2/plugins/preview/videoviewer
qtcmd2/plugins/preview/audioviewer
qtcmd2/plugins/preview/textviewer
qtcmd2/plugins/preview/imageviewer
qtcmd2/plugins/vfs
qtcmd2/plugins/vfs/rarsubsystem
qtcmd2/plugins/vfs/zipsubsystem
qtcmd2/plugins/vfs/localsubsystem
qtcmd2/plugins/vfs/ftpsubsystem
qtcmd2/plugins/vfs/tarsubsystem
qtcmd2/src
qtcmd2/src/ui
qtcmd2/src/preview
qtcmd2/src/vfs

Below rules from CMakeLists.txt:
add_subdirectory(libs/widgets)
add_subdirectory(libs/utils)
add_subdirectory(libs/xdgmime)
add_subdirectory(src)
add_subdirectory(plugins/vfs/localsubsystem)
add_subdirectory(plugins/vfs/rarsubsystem)
add_subdirectory(plugins/vfs/tarsubsystem)
add_subdirectory(plugins/vfs/zipsubsystem)
add_subdirectory(plugins/vfs/ftpsubsystem)
add_subdirectory(plugins/preview/textviewer)
add_subdirectory(plugins/preview/imageviewer)
add_subdirectory(plugins/preview/videoviewer)
add_subdirectory(plugins/preview/audioviewer)
add_subdirectory(plugins/preview/archiveviewer)

In any case I attach my main CMakeLists.txt.
Comment 6 Piotr Mierzwinski 2016-09-07 19:56:38 UTC
Created attachment 100977 [details]
CMakeLists.txt from main directory
Comment 7 Piotr Mierzwinski 2016-09-07 20:04:09 UTC
Below please find "error" what I can see after  "Run -> Execute Launch" (with adding one dependency)
/run/media/piotra/FreeAgent/piotr/Projekty/Qt/qtcmd_work/qtcmd_git/qtcmd2/build> make -j8
*** Killed process ***
Comment 8 Piotr Mierzwinski 2016-09-07 20:08:51 UTC
I realized that the reason of "KDevelop crashed and didn't want to run again" was working kdevelop process in background. When I finish it I was able to report bug by Konqi. After that I was able to run KDevelop again.
Comment 9 Piotr Mierzwinski 2018-09-26 21:30:27 UTC
Change status due to providing several info.
Comment 10 Piotr Mierzwinski 2018-09-26 21:38:25 UTC
In last version of my project I dropped configuration described above (settings dependencies in Project configuration). I use default, so what KDevelop sets after importing project. Only one issue is that all plugins and libraries are not built (if happen any change inside) by invoking F9/Shift+F9 (run). To have up-do-date binaries I need to invoke build (F8) and after F9/Shift+F9.
Comment 11 Justin Zobel 2022-12-01 04:34:37 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 12 Bug Janitor Service 2022-12-16 05:13:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Bug Janitor Service 2022-12-31 05:23:26 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!