Author Topic: </envars> being added to project file  (Read 10739 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
</envars> being added to project file
« on: August 13, 2007, 03:10:06 pm »
today I noticed still a bunch of them get added, when I edit my project.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: </envars> being added to project file
« Reply #1 on: August 13, 2007, 03:57:09 pm »
I faced similar problem. Later I recompiled EnvVars and it became fine.  :)
Be a part of the solution, not a part of the problem.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: </envars> being added to project file
« Reply #2 on: August 13, 2007, 04:27:21 pm »
hmm, will kick out its objects and do the same ;-)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: </envars> being added to project file
« Reply #3 on: August 13, 2007, 05:39:17 pm »
Hmm.... is EnvVars writing raw strings to the project file?

It seems weird that it would add a closing tag without opening tag, TinyXML won't do that (at least not unless something is seriously amiss).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: </envars> being added to project file
« Reply #4 on: August 13, 2007, 05:47:58 pm »
 :? :?  <envvars /> is what it should be, silly me.

So in the end you get something like this in the <Extensions> section :

   <envvars />
   <envvars />
   <envvars />
   <envvars />

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: </envars> being added to project file
« Reply #5 on: August 13, 2007, 06:01:55 pm »
This has already been reported in another topic. I asked to give me steps to reproduce as this never happened to me. I got no answer so far. How to achive this?
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: </envars> being added to project file
« Reply #6 on: August 13, 2007, 06:12:50 pm »
I doubt it's my fault, here is the code responsible for saving:
Code
    TiXmlElement* node = elem->FirstChildElement("envvars");
    if (!node)
      node = elem->InsertEndChild(TiXmlElement("envvars"))->ToElement();
    node->Clear();
    if (!m_ProjectSets[project].IsEmpty())
      node->SetAttribute("set", cbU2C(m_ProjectSets[project]));
Notice that it is checked whether the node exists. But please prove mw wrong...?! :?: :?: :?:
Might this be possibly related to the changes Yiannis did in 4332?
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: </envars> being added to project file
« Reply #7 on: August 13, 2007, 06:24:08 pm »
what I did : just adjust some setting of the project. Will try to find a test case for reproduction.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: </envars> being added to project file
« Reply #8 on: August 13, 2007, 06:50:11 pm »
just reproduced it, this is what I did :

(tested on linux) :

0) in CB create new console project, build it and close cb
 ==>

Quote
      <Extensions>
         <envvars />
         <code_completion />
         <debugger />
      </Extensions>

1) open CB, and open the project (I did that by drag and drop from konqueror to CB [no idea if this is a required action for reproduction])

2) Project properties : build targets : I changed for the Debug target the Platforms (unticked : windows)

3) File menu : save project, close cb
==>
Quote
      <Extensions>
         <envvars />
         <code_completion />
         <debugger />
         <envvars />
      </Extensions>

4) do the same thing : Project properties etc, an tick Windows back on, then file menu save project, close cb

==>

Quote
      <Extensions>
         <envvars />
         <code_completion />
         <debugger />
         <envvars />
         <envvars />
      </Extensions>

EDIT : rev 4370
« Last Edit: August 13, 2007, 06:52:05 pm by killerbot »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: </envars> being added to project file
« Reply #9 on: August 14, 2007, 07:29:40 am »
Thanks Lieven!

just reproduced it, this is what I did :
[...]
EDIT : rev 4370

Did that under Windows and it worked like a charm - no duplicate nodes. Could you try under Windows, too please?!
Unfortunetely my Linux environment is broken (asks me to provide wx26 libs after I have removed them and updated to wx28). So I cannot test it currently under Linux until I have re-installed Ubuntu.

But I would really wonder why the hell this should be platform dependend...?!?!?! And in addition: CC uses quite the very same code - so why doesn't this happen for CC, too?!

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: </envars> being added to project file
« Reply #10 on: August 14, 2007, 04:35:23 pm »
in windows it is ok, seems to be linux specific then

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: </envars> being added to project file
« Reply #11 on: August 14, 2007, 04:42:57 pm »
in windows it is ok, seems to be linux specific then
Dammed. I was hoping that I wouldn't have to re-install the VM. I'll ask in another topic for help - I believe it's a simple configuration error... hopefully.
Edit: Done. See http://forums.codeblocks.org/index.php/topic,6679.msg51408.html#msg51408 please.
« Last Edit: August 14, 2007, 05:07:34 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: </envars> being added to project file
« Reply #12 on: August 14, 2007, 04:57:49 pm »
But I would really wonder why the hell this should be platform dependend...?!?!?! And in addition: CC uses quite the very same code - so why doesn't this happen for CC, too?!.

I hate when this kind of mysterious things occur. Resolving them is sometimes a headache. :(