Author Topic: batchbuild issues with backticked commands  (Read 28157 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: batchbuilds broken since rev 3103
« Reply #30 on: October 18, 2006, 11:12:17 pm »
Finally! The solution. Good work, tiwag - I guess we can go to bed then, right?! ;-)
2.) the CB environmentvariables plugin doesn't work in batchbuild mode or isn't initialized at the time,
     when the compiler starts resolving backticked commands
I guess this is on my desk, then... will look into it... but not today.
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 tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: batchbuilds broken since rev 3103
« Reply #31 on: October 18, 2006, 11:14:37 pm »
Finally! The solution. Good work, tiwag - I guess we can go to bed then, right?! ;-)

you can go to bed, i go for a couple of beers now  :P

seriously
thank you too !

best regards, tiwag

takeshimiya

  • Guest
Re: batchbuilds broken since rev 3103
« Reply #32 on: October 18, 2006, 11:18:09 pm »
Ok, so we've found pretty different issues, listing:

1) wx-config --prefix= hangs even in command-line when the exe was built with MSVC2005 Express only.
2) Code::Blocks parses backticks outputs. Thus self-referencing backticks causes an infinite loop. Is this good behaviour or not?
3) The Environment Variables should be part of the SDK, if not, we have inter-plugin dependences and the side effect that you get different things between batch builds and normal builds.
4) Question: for those who know, errors should be better printed in stdout or stderr? My idea is that a C::B regex can parse them.
5) DDE bug attacking again Windows cannot find 'file.cbp'....
6) The default.conf is getting unreliable lately, but this is for another post.

I have "fixed" 1), and can workaround 2) simply don't printing self-referencing backticks, however, is that good behaviour?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: batchbuilds broken since rev 3103
« Reply #33 on: October 18, 2006, 11:24:00 pm »
3) The Environment Variables should be part of the SDK, if not, we have inter-plugin dependences and the side effect that you get different things between batch builds and normal builds.
I wouldn't say this. It can (and should) be a plugin (otherwise you could argue that e.g. the compiler plugin should be in the sdk, too - right?). The only issue here is that obviously the OnAttach() method seems not to be called on a batch-build process for an obscure reason... will investigate in this...
With regards, Morten.

Edit: What takeshi might fail to se: Once the envvar plugin got initialised correctly you'll get all envvars through macromanager anymway. Thus they are abailable for e.g. scripting and stuff... (Or maybe I don't understand why he states this...?!)
« Last Edit: October 18, 2006, 11:33:19 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 tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: batchbuilds broken since rev 3103
« Reply #34 on: October 18, 2006, 11:30:33 pm »
some comments

1) wx-config --prefix= hangs even in command-line when the exe was built with MSVC2005 Express only.
didn't try but i don't believe this
edit: i've build my wx-config using gcc  :P  :shock:


2) Code::Blocks parses backticks outputs. Thus self-referencing backticks causes an infinite loop. Is this good behaviour or not?
it is good behavior

think of nested calls of some backticked commands

`aaa` ->  `bbb`  -> "something useful"


3) The Environment Variables should be part of the SDK, if not, we have inter-plugin dependences and the side effect that you get different things between batch builds and normal builds.
i'm shure, Morten will find a reliable solution for this ...

4) Question: for those who know, errors should be better printed in stdout or stderr? My idea is that a C::B regex can parse them.

PLEASE don't print novels as error messages

just send  ( "ERROR: %d : %s\n", errornumber , errordescription )

send your novels to stderr, if you can't resist ;-)


5) DDE bug attacking again Windows cannot find 'file.cbp'....
delete all dde related registry keys from CodeBlocks registered file extensions ( ".cbp" and so on )


6) The default.conf is getting unreliable lately, but this is for another post.
true, i had a lot of issues too

brds, tiwag
« Last Edit: October 18, 2006, 11:41:28 pm by tiwag »

takeshimiya

  • Guest
Re: batchbuilds broken since rev 3103
« Reply #35 on: October 18, 2006, 11:35:12 pm »
3) The Environment Variables should be part of the SDK, if not, we have inter-plugin dependences and the side effect that you get different things between batch builds and normal builds.
I wouldn't say this. It can (and should) be a plugin (otherwise you could argue that e.g. the compiler plugin should be in the sdk, too - right?).
Yes, both ways are arguable, but because you could say "have cbEditor as plugin", or for example you can "set the Network proxy" in Environment, but you can't "set environment variables"?
Either way, it's fine as long while it can be accessed from Squirrel.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: batchbuilds broken since rev 3103
« Reply #36 on: October 18, 2006, 11:35:54 pm »
6) The default.conf is getting unreliable lately, but this is for another post.
true, i had a lot of issues too
I think this has already been resolved by Thomas meanwhile. IMHO the reason were the TinyXml changes related to <, > and consorts. But this works now properly... (I hadn't have any issues since then).
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: batchbuilds broken since rev 3103
« Reply #37 on: October 18, 2006, 11:37:37 pm »
Either way, it's fine as long while it can be accessed from Squirrel.
So hopefully you've seen that I have edited the post you are refering to meanwhile (sorry if our posts crossed). So this should be fine then?!
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

takeshimiya

  • Guest
Re: batchbuilds broken since rev 3103
« Reply #38 on: October 18, 2006, 11:45:00 pm »
1) wx-config --prefix= hangs even in command-line when the exe was built with MSVC2005 Express only.
didn't try but i don't believe this
Then try it first :wink:
You may have to do a
Quote
set WXCFG=
and
Quote
set WXWIN=
to reproduce it.

2) Code::Blocks parses backticks outputs. Thus self-referencing backticks causes an infinite loop. Is this good behaviour or not?
it is good behavior

think of nested calls of some backticked commands

`aaa` ->  `bbb`  -> "something useful"
OK, re-asking the question and having in mind that back-ticks in Windows are supposed to do exactly the same thing as in Linux.
So the question becomes: what does bash with self-referencing back-ticks? We need to have the same behavior.


4) Question: for those who know, errors should be better printed in stdout or stderr? My idea is that a C::B regex can parse them.

PLEASE don't print novels as error messages

just send  ( "ERROR: %d : %s\n", errornumber , errordescription )
In short, sending long messages to stderr and one-liners to stdout is what you suggest and what gcc does, for instance?

« Last Edit: October 18, 2006, 11:52:09 pm by Takeshi Miya »

takeshimiya

  • Guest
Re: batchbuilds broken since rev 3103
« Reply #39 on: October 18, 2006, 11:48:38 pm »
I think this has already been resolved by Thomas meanwhile. IMHO the reason were the TinyXml changes related to <, > and consorts. But this works now properly... (I hadn't have any issues since then).
With regards, Morten.
Yes, but I'm talking about lot of different issues with it not related to that, which deserves a thread on it's own.

So hopefully you've seen that I have edited the post you are refering to meanwhile (sorry if our posts crossed). So this should be fine then?!
If one can Add new variables, Change variable values, Delete variables, Toggle variables and Set now variables from Squirrel, it's perfectly fine.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: batchbuild issues with backticked commands
« Reply #40 on: October 19, 2006, 12:22:01 am »
In short, sending long messages to stderr and one-liners to stdout is what you suggest and what gcc does, for instance?

yes

maybe just "wx-config ERROR: 01 : error description ..." to stdout, this will then be seen in the buildlog,
the long text to stderr

you can test, what wx-config does on linux ?

brgds, tiwag
« Last Edit: October 19, 2006, 12:25:44 am by tiwag »

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: batchbuild issues with backticked commands
« Reply #41 on: October 19, 2006, 12:29:02 am »
thread title changed, batchbuild isn't broken  :)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: batchbuild issues with backticked commands
« Reply #42 on: October 19, 2006, 10:28:46 am »
Regarding the envvars plugin, rev.3109 contains the fix.
As part of an optimization implemented some time ago, only the compiler plugin was allowed to load in batch-build mode. Rev.3109 adds control over this by adding a checklist of plugins to load in batch build options (Settings->Compiler&debugger->Batch builds). This is the master list for batch-build mode, i.e. for a plugin to be loaded in this mode it must be checked in that list and enabled in the plugin management dialog.
Defaults to only loading the compiler plugin.

As you can understand, it is no longer necessary to even create a separate profile/personality for batch builds, since usually you create a different profile only to disable most of the plugins ;).

I haven't tested this so if you can test it you 'd be doing me a favour :).
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: batchbuild issues with backticked commands
« Reply #43 on: October 19, 2006, 02:54:03 pm »
I haven't tested this so if you can test it you 'd be doing me a favour :).
it's working fine, thanks !

As you can understand, it is no longer necessary to even create a separate profile/personality for batch builds, since usually you create a different profile only to disable most of the plugins ;)
in general you are right, but it's not entirely true,
my differences (beside the plugins) betweeen development and batch-build profiles are additionally

                        devel               batchbuild
compiler logging        full                short   
dual monitor setup      main screen         secondary screen


brgds, tiwag

takeshimiya

  • Guest
Re: batchbuild issues with backticked commands
« Reply #44 on: October 19, 2006, 10:47:13 pm »
maybe just "wx-config ERROR: 01 : error description ..." to stdout, this will then be seen in the buildlog,
the long text to stderr

Fixed all in Rev.21 :)
* Removed all back-ticks characters from explanatory messages to prevent self-referencing back-ticks.
* Now explanatory messages are printed to stderr and one-line message errors are printed to stdout
   with the format "wx-config Error: description".