Bug 576908 - Building specific configuration from CLI (headless) does not recognize <config_name> dynamic variable
Summary: Building specific configuration from CLI (headless) does not recognize <confi...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.6   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-27 02:47 EDT by Komediruzec Dalziher CLA
Modified: 2021-11-10 12:50 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Komediruzec Dalziher CLA 2021-10-27 02:47:23 EDT
Hi,

<config_name> variable represents the active build configuration and can be used like:

<config_name:<project_name>> inside a custom builder. This all works well until we run the CLI (i.e. headless build) to build the specific configuration. In that case, the variable <config_name> seems to have the default value of the first configuration, even if the configuration selected for the build is a different one. 

This makes it impossible to have a consistent build in UI and CLI.

I have tried supplying the environment variable with the -E switch in eclipsec.exe CLI but it fails to recognize it.

Is there a way to have the variable coming from CLI as well as set in UI so that the builds are consistent across certain build configurations?

Eclipse used is S32 Design Studio from NXP. Eclipse CDT GCC Cross Compiler and others are 9.2.0.201612061315.
Comment 1 Komediruzec Dalziher CLA 2021-10-27 02:49:20 EDT
I have been inspecting this and similar bugs: https://bugs.eclipse.org/bugs/show_bug.cgi?id=208484#c20

But it seems that the variable which was moved from UI to eclipse core does not contain the one named <config_name> (dynamic one) apart from <ConfigName> which should be UI one?
Comment 2 Sarika Sinha CLA 2021-10-27 10:38:23 EDT
(In reply to Komediruzec Dalziher from comment #1)
> I have been inspecting this and similar bugs:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=208484#c20
> 
> But it seems that the variable which was moved from UI to eclipse core does
> not contain the one named <config_name> (dynamic one) apart from
> <ConfigName> which should be UI one?

Can you specify exactly what moved from UI core which you think has created this problem?
You can also ty to provide a fix if you understand the problem.
Comment 3 Komediruzec Dalziher CLA 2021-10-27 16:41:52 EDT
(In reply to Sarika Sinha from comment #2)
> (In reply to Komediruzec Dalziher from comment #1)
> > I have been inspecting this and similar bugs:
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=208484#c20
> > 
> > But it seems that the variable which was moved from UI to eclipse core does
> > not contain the one named <config_name> (dynamic one) apart from
> > <ConfigName> which should be UI one?
> 
> Can you specify exactly what moved from UI core which you think has created
> this problem?
> You can also ty to provide a fix if you understand the problem.

Hi,

I don't have much understanding of internal eclipse behaviors and code, but the referenced topic/comment says:

"
Moved the following variables to debug.core:
> 
>   container_loc
>   container_name
>   container_path
>   project_loc
>   project_name
>   project_path
>   resource_loc
>   resource_name
>   resource_path
"

In this list of variables that were moved to debug.core, there is no variable <config_name>.

AS for the issue, I think it might be a simple bug that does not recognize the active configuration variable (or is still bound to UI rather than moved to debug.core) or it defaults to the first configuration rather than selected, in any case, if you can point me to the related and relevant code and some guidelines (links) how to get to know the code, inspect if there is a bug and possibly fix it myself, I would be glad to do it.
Comment 4 Sarika Sinha CLA 2021-11-02 06:12:36 EDT
(In reply to Komediruzec Dalziher from comment #3)
> (In reply to Sarika Sinha from comment #2)
> > (In reply to Komediruzec Dalziher from comment #1)
> > > I have been inspecting this and similar bugs:
> > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=208484#c20
> > > 
> > > But it seems that the variable which was moved from UI to eclipse core does
> > > not contain the one named <config_name> (dynamic one) apart from
> > > <ConfigName> which should be UI one?
> > 
> > Can you specify exactly what moved from UI core which you think has created
> > this problem?
> > You can also ty to provide a fix if you understand the problem.
> 
> Hi,
> 
> I don't have much understanding of internal eclipse behaviors and code, but
> the referenced topic/comment says:
> 
> "
> Moved the following variables to debug.core:
> > 
> >   container_loc
> >   container_name
> >   container_path
> >   project_loc
> >   project_name
> >   project_path
> >   resource_loc
> >   resource_name
> >   resource_path
> "
> 
> In this list of variables that were moved to debug.core, there is no
> variable <config_name>.
> 
> AS for the issue, I think it might be a simple bug that does not recognize
> the active configuration variable (or is still bound to UI rather than moved
> to debug.core) or it defaults to the first configuration rather than
> selected, in any case, if you can point me to the related and relevant code
> and some guidelines (links) how to get to know the code, inspect if there is
> a bug and possibly fix it myself, I would be glad to do it.

I checked the commit details and the history but I could not find any reference to "config_name" in the debug.ui before these changes.
Did it work for you before?
Comment 5 Komediruzec Dalziher CLA 2021-11-10 11:09:44 EST
(In reply to Sarika Sinha from comment #4)
> (In reply to Komediruzec Dalziher from comment #3)
> > (In reply to Sarika Sinha from comment #2)
> > > (In reply to Komediruzec Dalziher from comment #1)
> > > > I have been inspecting this and similar bugs:
> > > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=208484#c20
> > > > 
> > > > But it seems that the variable which was moved from UI to eclipse core does
> > > > not contain the one named <config_name> (dynamic one) apart from
> > > > <ConfigName> which should be UI one?
> > > 
> > > Can you specify exactly what moved from UI core which you think has created
> > > this problem?
> > > You can also ty to provide a fix if you understand the problem.
> > 
> > Hi,
> > 
> > I don't have much understanding of internal eclipse behaviors and code, but
> > the referenced topic/comment says:
> > 
> > "
> > Moved the following variables to debug.core:
> > > 
> > >   container_loc
> > >   container_name
> > >   container_path
> > >   project_loc
> > >   project_name
> > >   project_path
> > >   resource_loc
> > >   resource_name
> > >   resource_path
> > "
> > 
> > In this list of variables that were moved to debug.core, there is no
> > variable <config_name>.
> > 
> > AS for the issue, I think it might be a simple bug that does not recognize
> > the active configuration variable (or is still bound to UI rather than moved
> > to debug.core) or it defaults to the first configuration rather than
> > selected, in any case, if you can point me to the related and relevant code
> > and some guidelines (links) how to get to know the code, inspect if there is
> > a bug and possibly fix it myself, I would be glad to do it.
> 
> I checked the commit details and the history but I could not find any
> reference to "config_name" in the debug.ui before these changes.
> Did it work for you before?

Sorry for long delay,

Nope, I found out about it recently, while using a custom builder, the variable resolves to default/first configuration rather than one that is being built from CLI.


Maybe the config_name variable has never been UI core one (probably not), are you looking at the code for S32 DS 2017.R1 version of the Eclipse or something else?
Comment 6 Sarika Sinha CLA 2021-11-10 12:50:17 EST
I am looking at 2008 -09 code, and I don't see any change after that in this area.