Bug 403769

Summary: Only the default environment profle is being used
Product: [Applications] kdevelop Reporter: Miguel Tadeu <mtadeunet>
Component: ProfilesAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: wouter
Priority: NOR    
Version First Reported In: 5.2.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.11.230400
Sentry Crash Report:
Attachments: Minimal CMake example

Description Miguel Tadeu 2019-01-30 16:12:48 UTC
SUMMARY
I have several environment profiles, but only the default seems to be taken into account. If I create a new env. profile and set it i.e. for ninja build, it's not used and kdevelop still uses the default one.


STEPS TO REPRODUCE
1. Create a new env profile with some vars
2. Change it for the build system or running the application
3.

OBSERVED RESULT
The new environment is not used, so kdevelop is still using the default


EXPECTED RESULT
Expected that kdevelop was using the env profile I set

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.12.7
KDE Frameworks Version: 5.47.0
Qt Version: 5.9.5

ADDITIONAL INFORMATION
Comment 1 Wouter Haffmans 2021-02-23 07:48:38 UTC
Created attachment 136075 [details]
Minimal CMake example

This bug is still present in KDevelop 5.6.2.

I've attached a minimalist CMakeLists.txt file that shows the behavior. Building the project (the buildenv target) simply prints the environment variables. The output allows you to easily observe that the selected environment profile is not used.

This bug only applies when using Ninja to run the build. Using Make it works as expected.
Comment 2 Bug Janitor Service 2023-01-04 14:36:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/423
Comment 3 Christoph Roick 2023-01-05 13:22:40 UTC
Git commit 6795582dce86d3766e596e240bfe2e5ada52d6c0 by Christoph Roick.
Committed on 05/01/2023 at 13:21.
Pushed by croick into branch 'master'.

Apply Ninja environment settings

The Ninja configuration page offers to select a build environment.
This setting is now applied when creating a corresponding NinjaJob.
FIXED-IN: 5.11.230400

M  +2    -0    plugins/ninjabuilder/ninjabuilder.cpp

https://invent.kde.org/kdevelop/kdevelop/commit/6795582dce86d3766e596e240bfe2e5ada52d6c0