Page 1 of 1

PR compiling on Travis but not on AppVeyor

Posted: Friday 17 January 2020 8:57
by brucemiranda
I use Ubuntu to build and run Domoticz and everything has worked fine. Recently I pushed some code changes, which I have been using within my own installation. However the PR that I pushed seems to be hitting problems with the AppVeyor compiler and build. Some of the errors were easier to fix even though everything was always fine on the Travis CI build. But now I am stuck. I've encountered some, what appears to be, syntax errors. But for the life of me, I have no idea what's wrong or how to fix them. Did I say, things work fine in Linux?

Is anyone able to look at this and tell me how I move forward? I've made changes to the EvohomeRadio.cpp

https://github.com/domoticz/domoticz/pull/3841

The last time this happened, it appeared to need a fix at the AppVeyor side, my code was fine. Is that the same again?

Re: PR compiling on Travis but not on AppVeyor

Posted: Friday 17 January 2020 10:30
by waaren
brucemiranda wrote: Friday 17 January 2020 8:57 https://github.com/domoticz/domoticz/pull/3841
The last time this happened, it appeared to need a fix at the AppVeyor side, my code was fine. Is that the same again?
Did you close the PR intentionally ? Probably @gizmocuz will be able to help. If I remember well he develops on windows.

Re: PR compiling on Travis but not on AppVeyor

Posted: Friday 17 January 2020 11:08
by brucemiranda
I had closed it to work out what I need to do to fix things. But I have reopened it now again. This is quite a strange situation.

Re: PR compiling on Travis but not on AppVeyor

Posted: Friday 17 January 2020 12:43
by gordonb3
Looks like your syntax is interpreted as C++ lambda functions. Effectively this means that your syntax is wrong, even though it appears to be acceptable to the Gnu compiler.

Re: PR compiling on Travis but not on AppVeyor

Posted: Friday 17 January 2020 16:02
by brucemiranda
I just removed a feature to print a Hex as a binary string and everything worked fine. The log message will now print things in decimal itself.

Re: PR compiling on Travis but not on AppVeyor

Posted: Friday 17 January 2020 18:22
by gordonb3
Was actually looking at that piece of code myself as it appeared that the rest of the error reports were sort of bogus with several other (earlier) parts in the code using the exact same syntax. That array definition seems dodgy, to my knowledge you should not reference the indexes while initializing an array on creation. I think it will work if you write it like this:

Code: Select all

	const char *bit_rep[16] = {
    		"0000", "0001", "0010", "0011",
    		"0100", "0101", "0110", "0111",
    		"1000", "1001", "1010", "1011",
    		"1100", "1101", "1110", "1111"
	};

Re: PR compiling on Travis but not on AppVeyor

Posted: Friday 17 January 2020 21:02
by brucemiranda
I just took it out. More problem that it was worth tbh. Now to just get my PR merged in. Some PRs have been piling up for a few weeks now.