Bug 403769 - Only the default environment profle is being used
Summary: Only the default environment profle is being used
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Profiles (show other bugs)
Version: 5.2.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-30 16:12 UTC by Miguel Tadeu
Modified: 2023-01-05 13:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.11.230400
Sentry Crash Report:


Attachments
Minimal CMake example (108 bytes, text/plain)
2021-02-23 07:48 UTC, Wouter Haffmans
Details

Note You need to log in before you can comment on or make changes to this bug.
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