Re: tubes/source/conference.cxx:251:79: error: 'OSL_ENSURE' was not declared in this scope
On 01/07/2015 11:37 AM, Bjoern Michaelsen wrote: Personal opinion: The double bookkeeping of log areas is bad, and people ignore it because its a direct violation of DRY. IMHO if that plugin is active, it should just add the missing log areas. Whoever is caring about consistency in the log areas then simply needs to look at that file once in a while and tweak existing log areas into a consistent state. Consistency is not something that can be achieved by forcing over 200 people to do edits to one file(*), it needs to be maintained by 1-2 people with a good context on what is there and what the customs are. Not sure about the double-bookkeeping and DRY-ness arguments. (For amusement, there's even a real, printed book out there, touting itself as a guidebook on contemporary C, that recommends using string literals instead of enums; you can't make that up.) Regarding the remainder, my perspective is somewhat more relaxed: Log area inconsistencies become a problem when one wants to filter on them. But at least as long as the logging is only enabled in (developers') debug builds, a developer who wants to do filtering and is bitten by some inconsistency can just clean up the relevant code. So as long as the proliferation of log areas does not grow too much out of control, I think we can happily live with the status quo. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: tubes/source/conference.cxx:251:79: error: 'OSL_ENSURE' was not declared in this scope
Hi, On Wed, Jan 07, 2015 at 11:02:19AM +0200, Tor Lillqvist wrote: > My rationale was that if people just come up with new log areas anyway, > without bothering to check if there already is some suitable one, or what > style of log areas we have in general (as if there would be any > consistency, haha...), then the plugin is pointless. Personal opinion: The double bookkeeping of log areas is bad, and people ignore it because its a direct violation of DRY. IMHO if that plugin is active, it should just add the missing log areas. Whoever is caring about consistency in the log areas then simply needs to look at that file once in a while and tweak existing log areas into a consistent state. Consistency is not something that can be achieved by forcing over 200 people to do edits to one file(*), it needs to be maintained by 1-2 people with a good context on what is there and what the customs are. Best, Bjoern (*) aka "technical solution to a social problem" ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: tubes/source/conference.cxx:251:79: error: 'OSL_ENSURE' was not declared in this scope
> there's a Clang plugin to flag uses of log areas not mentioned in > log-areas.dox, but for one that plugin has been deactivated I deactivated it because I got tired of having to add log areas to log-areas.dox after other people came up with new ones (but they had no interest in, or knowledge of, mainaining log-areas.dox). My rationale was that if people just come up with new log areas anyway, without bothering to check if there already is some suitable one, or what style of log areas we have in general (as if there would be any consistency, haha...), then the plugin is pointless. --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: tubes/source/conference.cxx:251:79: error: 'OSL_ENSURE' was not declared in this scope
On 01/06/2015 11:58 PM, ungifted wrote: Is "tubes" area into "other" section good? yes And I found using SAL_INFO( "tubes.method"... in /tubes/source/conference.cxx and manager.cxx May be it should be added too? yes, should also be added; there's a Clang plugin to flag uses of log areas not mentioned in log-areas.dox, but for one that plugin has been deactivated, and for another hardly anybody builds the tubes code, so this went unnoticed ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: tubes/source/conference.cxx:251:79: error: 'OSL_ENSURE' was not declared in this scope
19.12.2014, 18:26, "Eike Rathke" : > Hi ungifted, > > On Thursday, 2014-12-18 22:56:24 +0300, ungifted wrote: >> I found I should report build issues into this maillist. Ok. >> >> Trying to build LibreOffice-4.4. on my Gentoo and got subj. > > First thing you should do is not enable tubes in your build, remove the > --enable-telepathy option from the autogen.sh call. That is an highly > experimental framework not benefitting anyone except developers who want > to work on it. This was Gentoo ebuild changed from 4.3. to 4.4. Proposed ebuild for 4.4 there: https://bugs.gentoo.org/show_bug.cgi?id=533138 still have USE flag "telepathy". >> With this patch I can at least build it now. >> >> +#include > > Thanks anyway for the heads-up, the proper solution would be to convert > the old OSL_ENSURE() macro calls to SAL_WARN_IF() Proposed change looks simple even for me :) I found SAL_WARN_IF() used many times in tubes. Using this as example and by reading desc in log.hxx/log.h patch (not tested). I found I should negative bool value here because: from log.hxx for SAL_WARN_IF "if the given condition is true" from diagnose.h for OSL_ENSURE "If cond is false..." diff -Naur a/tubes/source/conference.cxx b/tubes/source/conference.cxx --- a/tubes/source/conference.cxx 2014-12-18 01:13:50.0 +0300 +++ b/tubes/source/conference.cxx 2015-01-07 00:23:50.821287600 +0300 @@ -248,7 +248,7 @@ void TeleConference::setChannel( TpAccount *pAccount, TpDBusTubeChannel* pChannel ) { -OSL_ENSURE( !mpChannel, "TeleConference::setChannel: already have channel"); +SAL_WARN_IF( mpChannel, "tubes", "TeleConference::setChannel: already have channel"); if (mpChannel) g_object_unref( mpChannel); if (mpAccount) @@ -297,7 +297,7 @@ { INFO_LOGGER( "TeleConference::offerTube"); -OSL_ENSURE( mpChannel, "TeleConference::offerTube: no channel"); +SAL_WARN_IF( !mpChannel, "tubes", "TeleConference::offerTube: no channel"); if (!mpChannel) return false; @@ -319,7 +319,7 @@ { INFO_LOGGER( "TeleConference::setTube"); -OSL_ENSURE( !pImpl->mpTube, "TeleConference::setTube: already tubed"); +SAL_WARN_IF( pImpl->mpTube, "tubes", "TeleConference::setTube: already tubed"); pImpl->mpTube = pTube; > and include sal/log.hxx for that It coming from #include #include and then from #include > and add a proper section to include/sal/log-areas.dox Is "tubes" area into "other" section good? diff -Naur a/include/sal/log-areas.dox b/include/sal/log-areas.dox --- a/include/sal/log-areas.dox 2014-12-18 01:13:50.0 +0300 +++ b/include/sal/log-areas.dox 2015-01-07 00:55:31.143174332 +0300 @@ -501,6 +501,7 @@ @li @c store @li @c svg @li @c test +@li @c tubes @li @c ucbhelper @li @c unoidl @li @c unoxml And I found using SAL_INFO( "tubes.method"... in /tubes/source/conference.cxx and manager.cxx May be it should be added too? Please look. Thanks ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: tubes/source/conference.cxx:251:79: error: 'OSL_ENSURE' was not declared in this scope
Hi ungifted, On Thursday, 2014-12-18 22:56:24 +0300, ungifted wrote: > I found I should report build issues into this maillist. Ok. > > Trying to build LibreOffice-4.4. on my Gentoo and got subj. First thing you should do is not enable tubes in your build, remove the --enable-telepathy option from the autogen.sh call. That is an highly experimental framework not benefitting anyone except developers who want to work on it. > With this patch I can at least build it now. > > +#include Thanks anyway for the heads-up, the proper solution would be to convert the old OSL_ENSURE() macro calls to SAL_WARN_IF() and include sal/log.hxx for that and add a proper section to include/sal/log-areas.dox Eike -- LibreOffice Calc developer. Number formatter stricken i18n transpositionizer. GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/ Care about Free Software, support the FSFE https://fsfe.org/support/?erack pgplOTseRjCJO.pgp Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
tubes/source/conference.cxx:251:79: error: 'OSL_ENSURE' was not declared in this scope
Hi I found I should report build issues into this maillist. Ok. Trying to build LibreOffice-4.4. on my Gentoo and got subj. With this patch I can at least build it now. --- tubes/source/conference.cxx 2014-12-17 18:06:37.473426509 +0300 +++ tubes/source2/conference.cxx2014-12-17 18:04:20.0 +0300 @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include + #include #include Please look Thanks /var/tmp/portage/app-office/libreoffice-4.4./work/libreoffice-4.4./tubes/source/conference.cxx: In member function 'void TeleConference::setChannel(TpAccount*, TpDBusTubeCh annel*)': /var/tmp/portage/app-office/libreoffice-4.4./work/libreoffice-4.4.9999/tubes/source/conference.cxx:251:79: error: 'OSL_ENSURE' was not declared in this scope OSL_ENSURE( !mpChannel, "TeleConference::setChannel: already have channel"); ^ /var/tmp/portage/app-office/libreoffice-4.4./work/libreoffice-4.4./tubes/source/conference.cxx: In member function 'bool TeleConference::offerTube()': /var/tmp/portage/app-office/libreoffice-4.4./work/libreoffice-4.4./tubes/source/conference.cxx:300:67: error: 'OSL_ENSURE' was not declared in this scope OSL_ENSURE( mpChannel, "TeleConference::offerTube: no channel"); ^ /var/tmp/portage/app-office/libreoffice-4.4./work/libreoffice-4.4./tubes/source/conference.cxx: In member function 'bool TeleConference::setTube(GDBusConnection*)': /var/tmp/portage/app-office/libreoffice-4.4./work/libreoffice-4.4./tubes/source/conference.cxx:322:73: error: 'OSL_ENSURE' was not declared in this scope OSL_ENSURE( !pImpl->mpTube, "TeleConference::setTube: already tubed"); ^ /var/tmp/portage/app-office/libreoffice-4.4./work/libreoffice-4.4./solenv/gbuild/LinkTarget.mk:189: recipe for target '/var/tmp/portage/app-office/libreoffice-4.4./work /libreoffice-4.4./workdir/CxxObject/tubes/source/conference.o' failed make[1]: *** [/var/tmp/portage/app-office/libreoffice-4.4./work/libreoffice-4.4./workdir/CxxObject/tubes/source/conference.o] Error 1 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice