News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

batchbuild issues with backticked commands

Started by tiwag, October 18, 2006, 07:27:12 PM

Previous topic - Next topic

MortenMacFly

Finally! The solution. Good work, tiwag - I guess we can go to bed then, right?! ;-)
Quote from: tiwag on October 18, 2006, 11:00:39 PM
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

tiwag

Quote from: MortenMacFly on October 18, 2006, 11:12:17 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

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?

MortenMacFly

#33
Quote from: Takeshi Miya on October 18, 2006, 11:18:09 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...?!)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

tiwag

#34
some comments

Quote from: Takeshi Miya on October 18, 2006, 11:18:09 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
edit: i've build my wx-config using gcc  :P  :shock:


Quote from: Takeshi Miya on October 18, 2006, 11:18:09 PM
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"


Quote from: Takeshi Miya on October 18, 2006, 11:18:09 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'm shure, Morten will find a reliable solution for this ...

Quote from: Takeshi Miya on October 18, 2006, 11:18:09 PM
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 ;-)


Quote from: Takeshi Miya on October 18, 2006, 11:18:09 PM
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 )


Quote from: Takeshi Miya on October 18, 2006, 11:18:09 PM
6) The default.conf is getting unreliable lately, but this is for another post.
true, i had a lot of issues too

brds, tiwag

takeshimiya

Quote from: MortenMacFly on October 18, 2006, 11:24:00 PM
Quote from: Takeshi Miya on October 18, 2006, 11:18:09 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.

MortenMacFly

Quote from: tiwag on October 18, 2006, 11:30:33 PM
Quote from: Takeshi Miya on October 18, 2006, 11:18:09 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

MortenMacFly

Quote from: Takeshi Miya on October 18, 2006, 11:35:12 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

takeshimiya

#38
Quote from: tiwag on October 18, 2006, 11:30:33 PM
Quote from: Takeshi Miya on October 18, 2006, 11:18:09 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
Quoteset WXCFG=
and
Quoteset WXWIN=
to reproduce it.

Quote from: tiwag on October 18, 2006, 11:30:33 PM
Quote from: Takeshi Miya on October 18, 2006, 11:18:09 PM
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.


Quote from: Takeshi Miya on October 18, 2006, 11:18:09 PM
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.

Quote from: tiwag on October 18, 2006, 11:30:33 PM
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?


takeshimiya

Quote from: MortenMacFly on October 18, 2006, 11:35:54 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.

Quote from: MortenMacFly on October 18, 2006, 11:37:37 PM
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.

tiwag

#40
Quote from: Takeshi Miya on October 18, 2006, 11:45:00 PM
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

tiwag

thread title changed, batchbuild isn't broken  :)

mandrav

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...

tiwag

Quote from: mandrav on October 19, 2006, 10:28:46 AM
I haven't tested this so if you can test it you 'd be doing me a favour :).
it's working fine, thanks !

Quote from: mandrav on October 19, 2006, 10:28:46 AM
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

Quote from: tiwag on October 19, 2006, 12:22:01 AM
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".