Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-04 Thread Thiago Macieira
On sexta-feira, 4 de março de 2016 10:03:22 PST Blasche Alexander wrote:
> >Because you also need to reject some older Clang versions. Did you add the
> >check for them too?
> 
> clang 3.4 is rejected by requires(c++11) already.

It shouldn't be. Clang 3.4 is C++11-feature-complete.

I was thinking of Clang 3.1 or thereabouts and it shouldn't be rejected 
either. Think of XCode 5.0 that some people might be still using.

> Effort and speed. The compile test should not delay the 5.6.0 release and
> such a test would take much more time. After all we would have to go
> through the entire code base and identify all C++11 features we are using.
> That's bound to have the same gaps too. 

I already gave you a list. It might not be complete, but I think it is.

More importantly, if you had used the list, it would catch issues that aren't 
being caught right now with the incomplete version-based check.

> I want to emphasize qtserialbus is not the first module to do such a
> compiler based rejection pattern. For 5.6.0 this is good enough.

It shouldn't be. We've never had that. Adding that thing to an LTS release 
before we know how things work...

> Nevertheless I filed https://bugreports.qt.io/browse/QTBUG-51655 and we
> might have a better solution for 5.6.1.

Thanks.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-04 Thread Blasche Alexander
>Because you also need to reject some older Clang versions. Did you add the
>check for them too?

clang 3.4 is rejected by requires(c++11) already.

>Please think of Clang on Linux and FreeBSD, plus the older XCode that we still
>support on OS X. This is LTS and the last version before we require C++11, so
>expect people will try to build it with older versions.

>Why do we insist on testing for something that proxies the real need? We need
>X and we know that Y provides X, so we test for Y. Why can't we just test for
>X?

Effort and speed. The compile test should not delay the 5.6.0 release and such 
a test would take much more time. After all we would have to go through the 
entire code base and identify all C++11 features we are using. That's bound to 
have the same gaps too. 

I want to emphasize qtserialbus is not the first module to do such a compiler 
based rejection pattern. For 5.6.0 this is good enough.

Nevertheless I filed https://bugreports.qt.io/browse/QTBUG-51655 and we might 
have a better solution for 5.6.1.

--
Alex
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-03 Thread Konstantin Tokarev


03.03.2016, 20:15, "Welbourne Edward" :
>>  Why do we insist on testing for something that proxies the real need?
>>  We need X and we know that Y provides X, so we test for Y. Why can't
>>  we just test for X?
>
> Indeed. It reminds me of the web-sites that used to test with a few
> browsers and refuse access to anything but the known-good versions of
> those browsers - even if the untested browser works just fine. It
> pointlessly limits use and pressures folk into using one of the few
> things you've taken the trouble to test with; this marginalises new
> entrants in the market by punishing their customers for daring to try
> something new.
>
> Likewise for compilers: you want a particular feature, so test for that.
> Don't oblige your users to chose from among the few compilers you can
> spare the time to test, version-by-version. Better yet, when the
> compiler supplier introduces a regression that breaks support for some
> feature, the test automatically detects the problem in a version you
> never had a chance to check because it's been released since you
> released your code.

With web sites you can change User-Agent string to see them; likewise, with 
compilers you can comment out checks and see if it works for you. It is just 
unsupported, in both cases.

-- 
Regards,
Konstantin
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-03 Thread Blasche Alexander


--
Alex


> On quinta-feira, 3 de março de 2016 08:12:25 PST Thiago Macieira wrote:
> > Please add a test for each of the specific C++11 features, not for the
> > compiler  version. My email with the build errors lists them all, in
> > addition to NSDMI.
> 
> To be clear: one config.test that happens to test each of the specific C++11
> features used.

Anything below gcc 4.7 is excluded now. I see little point in making such 
fine-grained test. IMO the result is not worth the effort. The module declares 
it requires C++11 and new modules do not necessarily have to comply with Qt 
base line requirements. That's why I see little point in making it anything 
worse than C++11 compliant. This is a conscious decision that accepts the 
exclusion of certain targets for the module. qtwebengine does the same thing 
already. 

> Note that this may still disable the module in even in Qt 5.7, since things
> like delegating constructors are not yet permitted. I'd like the module to
> remove the tests and comply with Qt coding requirements before it leaves "tech
> preview" state.

It is going to be TP in 5.6 and 5.7. There is simply not enough time between 
the two releases to evaluate the TP proposal.
5.8 will easily full the requirements.

--
Alex

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-03 Thread Thiago Macieira
On quinta-feira, 3 de março de 2016 08:12:25 PST Thiago Macieira wrote:
> Please add a test for each of the specific C++11 features, not for the
> compiler  version. My email with the build errors lists them all, in
> addition to NSDMI.

To be clear: one config.test that happens to test each of the specific C++11 
features used.

Note that this may still disable the module in even in Qt 5.7, since things 
like delegating constructors are not yet permitted. I'd like the module to 
remove the tests and comply with Qt coding requirements before it leaves "tech 
preview" state.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-03 Thread Thiago Macieira
On quinta-feira, 3 de março de 2016 08:48:12 PST Knoll Lars wrote:
> And require(c++11) doesn't prevent things to be compiled for gcc 4.6?

Correct.

Please add a test for each of the specific C++11 features, not for the compiler 
version. My email with the build errors lists them all, in addition to NSDMI.

This will also replace the checks for VS2008-2012, since those compilers 
should then fail the test and the module gets disabled.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-03 Thread Knoll Lars

On 03/03/16 09:35, "Olivier Goffart"  wrote:

>Am Donnerstag, 3. März 2016, 08:24:41 CET schrieb Knoll Lars:
>> On 03/03/16 09:12, "Development on behalf of Thiago Macieira"
>> > of thiago.macie...@intel.com> wrote:
> 
>> 
>> 
>> 
>> >On quinta-feira, 3 de março de 2016 08:05:41 PST Knoll Lars wrote:
>> >
>> >> This looks good.
>> >
>> >
>> >It's good, but not sufficient.
>
>Apparently it requires Non-static data member initializers which is only 
>implemented in GCC 4.7.  So I guess there need to be an explicit check for GCC 
>4.7 or more.

And require(c++11) doesn't prevent things to be compiled for gcc 4.6?

Cheers,
Lars

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-03 Thread Olivier Goffart
Am Donnerstag, 3. März 2016, 08:24:41 CET schrieb Knoll Lars:
> On 03/03/16 09:12, "Development on behalf of Thiago Macieira"
>  of thiago.macie...@intel.com> wrote:
 
> 
> 
> 
> >On quinta-feira, 3 de março de 2016 08:05:41 PST Knoll Lars wrote:
> >
> >> This looks good.
> >
> >
> >It's good, but not sufficient.

Apparently it requires Non-static data member initializers which is only 
implemented in GCC 4.7.  So I guess there need to be an explicit check for GCC 
4.7 or more.


-- 
Olivier 

Woboq - Qt services and support - https://woboq.com - https://code.woboq.org
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-03 Thread Knoll Lars
On 03/03/16 09:12, "Development on behalf of Thiago Macieira" 
 wrote:



>On quinta-feira, 3 de março de 2016 08:05:41 PST Knoll Lars wrote:
>> This looks good.
>
>It's good, but not sufficient.

How is it not sufficient?

Lars

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-03 Thread Knoll Lars





On 03/03/16 08:54, "Development on behalf of Thiago Macieira" 
 wrote:

>On quinta-feira, 3 de março de 2016 07:50:51 PST Knoll Lars wrote:
>> >It matters because it breaks the build.
>> >
>> >Please remove it from the build. It's ok for it to be present, but don't 
>> >compile it.
>> 
>> 
>> Which build are you talking about? The split source packages shouldn't have
>> a problem with this. 
>
>The convenience build for the "qt-everywhere" tarball.
> 
>> For the unified source packages, we should probably simply skip the module
>> if the compiler is not c++11 compliant. 
>
>Please see Stefan Walter's email. He got failures while using -std=c++0x, so 
>this trick won't work.

I guess he's using gcc 4.4 or something similar. One solution could be to add a 
configure test and disable the module if it doesn't pass.
>
>> But I see no reason to remove it
>> for compilers that can handle it. It's certainly not different from other
>> modules such as web engine that also have stricter requirements on
>> compilers or platforms than e.g. Qtbase.
>
>So long as they don't break the build.

Agree, it shouldn't break the build.

Cheers,
Lars

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-02 Thread Koehne Kai
IMO 

https://codereview.qt-project.org/#/c/151180/1/qtserialbus.pro

should fix it. Is there a bug report already that I can link to?

Regards

Kai

> -Original Message-
> From: Development [mailto:development-
> bounces+kai.koehne=theqtcompany@qt-project.org] On Behalf Of
> Thiago Macieira
> Sent: Thursday, March 03, 2016 8:54 AM
> To: development@qt-project.org
> Subject: Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't
> compile in C++98
> 
> On quinta-feira, 3 de março de 2016 07:50:51 PST Knoll Lars wrote:
> > >It matters because it breaks the build.
> > >
> > >Please remove it from the build. It's ok for it to be present, but
> > >don't compile it.
> >
> >
> > Which build are you talking about? The split source packages shouldn't
> > have a problem with this.
> 
> The convenience build for the "qt-everywhere" tarball.
> 
> > For the unified source packages, we should probably simply skip the
> > module if the compiler is not c++11 compliant.
> 
> Please see Stefan Walter's email. He got failures while using -std=c++0x, so
> this trick won't work.
> 
> > But I see no reason to remove it
> > for compilers that can handle it. It's certainly not different from
> > other modules such as web engine that also have stricter requirements
> > on compilers or platforms than e.g. Qtbase.
> 
> So long as they don't break the build.
> 
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
> 
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-02 Thread Thiago Macieira
On quinta-feira, 3 de março de 2016 07:50:51 PST Knoll Lars wrote:
> >It matters because it breaks the build.
> >
> >Please remove it from the build. It's ok for it to be present, but don't 
> >compile it.
> 
> 
> Which build are you talking about? The split source packages shouldn't have
> a problem with this. 

The convenience build for the "qt-everywhere" tarball.
 
> For the unified source packages, we should probably simply skip the module
> if the compiler is not c++11 compliant. 

Please see Stefan Walter's email. He got failures while using -std=c++0x, so 
this trick won't work.

> But I see no reason to remove it
> for compilers that can handle it. It's certainly not different from other
> modules such as web engine that also have stricter requirements on
> compilers or platforms than e.g. Qtbase.

So long as they don't break the build. 

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-02 Thread Knoll Lars





On 03/03/16 08:31, "Development on behalf of Thiago Macieira" 
 wrote:

>On quinta-feira, 3 de março de 2016 07:05:10 PST Heikkinen Jani wrote:
>> Hi,
>> 
>> QtSerialBus is a technology preview in 5.6 and so on this shouldn't matter
>> that much, right? This "limitation" should be acceptable for TPs and so on
>> adding this in known issues page (https://wiki.qt.io/Qt_5.6.0_Known_Issues)
>> should be enough?
>
>It matters because it breaks the build.
>
>Please remove it from the build. It's ok for it to be present, but don't 
>compile it.

Which build are you talking about? The split source packages shouldn't have a 
problem with this. 

For the unified source packages, we should probably simply skip the module if 
the compiler is not c++11 compliant. But I see no reason to remove it for 
compilers that can handle it. It's certainly not different from other modules 
such as web engine that also have stricter requirements on compilers or 
platforms than e.g. Qtbase.

Cheers,
Lars

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-02 Thread Thiago Macieira
On quinta-feira, 3 de março de 2016 07:05:10 PST Heikkinen Jani wrote:
> Hi,
> 
> QtSerialBus is a technology preview in 5.6 and so on this shouldn't matter
> that much, right? This "limitation" should be acceptable for TPs and so on
> adding this in known issues page (https://wiki.qt.io/Qt_5.6.0_Known_Issues)
> should be enough?

It matters because it breaks the build.

Please remove it from the build. It's ok for it to be present, but don't 
compile it.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile in C++98

2016-03-02 Thread Heikkinen Jani
Hi,

QtSerialBus is a technology preview in 5.6 and so on this shouldn't matter that 
much, right? This "limitation" should be acceptable for TPs and so on adding 
this in known issues page (https://wiki.qt.io/Qt_5.6.0_Known_Issues) should be 
enough?

Br,
Jani

>>-Original Message-
>>From: Development [mailto:development-
>>bounces+jani.heikkinen=theqtcompany@qt-project.org] On Behalf Of
>>Thiago Macieira
>>Sent: 3. maaliskuuta 2016 8:59
>>To: development@qt-project.org
>>Subject: [Development] Dropping qtserialbus from Qt 5.6 -- it doesn't compile 
>>in
>>C++98
>>
>>The code was written for C++11 only and there isn't enough time to fix the
>>build issues. Therefore, it needs Qt 5.7.
>>
>>I request that it be dropped from Qt 5.6 packages.
>>
>>See:
>>
>>https://codereview.qt-project.org/151163
>>https://codereview.qt-project.org/151168
>>
>>Unfixed errors:
>>qmodbuspdu.h:163:9: warning: identifier ‘static_assert’ is a keyword in C++11
>>[-Wc++0x-compat]
>>
>>qmodbusdataunit.h:57:25: warning: defaulted and deleted functions only
>>available with -std=c++11 or -std=gnu++11
>>
>>qmodbusdataunit.h:46:7: error: constructor required before non-static data
>>member for ‘QModbusDataUnit::m_type’ has been parsed
>>
>>qmodbusdataunit.h:60:37: warning: delegating constructors only available with
>>-std=c++11 or -std=gnu++11
>>  =>  delegating constructors are not permitted even with Qt 5.7
>>
>>qmodbuspdu.h:87:20: warning: defaulted and deleted functions only available
>>with -std=c++11 or -std=gnu++11
>>
>>qmodbuspdu.h:119:24: warning: variadic templates only available with -std=c+
>>+11 or -std=gnu++11
>>
>>qmodbuspdu.h:159:24: error: ‘is_same’ is not a member of ‘std’
>>qmodbuspdu.h:168:23: error: ‘is_pod’ is not a member of ‘std’
>>  => need to check if those allowed in Qt 5.7
>>
>>After this, the parser gets lost.
>>
>>--
>>Thiago Macieira - thiago.macieira (AT) intel.com
>>  Software Architect - Intel Open Source Technology Center
>>
>>___
>>Development mailing list
>>Development@qt-project.org
>>http://lists.qt-project.org/mailman/listinfo/development
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development