Merge lp:~compiz-team/compiz/compiz.fix_1067246.1 into lp:compiz/0.9.10

Proposed by Sam Spilsbury
Status: Merged
Approved by: Andrea Azzarone
Approved revision: 3756
Merged at revision: 3764
Proposed branch: lp:~compiz-team/compiz/compiz.fix_1067246.1
Merge into: lp:compiz/0.9.10
Diff against target: 100 lines (+1/-64)
3 files modified
include/core/CMakeLists.txt (+1/-0)
src/logmessage/CMakeLists.txt (+0/-13)
src/logmessage/include/core/logmessage.h (+0/-51)
To merge this branch: bzr merge lp:~compiz-team/compiz/compiz.fix_1067246.1
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Sam Spilsbury Approve
Review via email: mp+174865@code.launchpad.net

This proposal supersedes a proposal from 2013-07-15.

Commit message

Remove redundant src/logmessage/include/core/logmessage.h

(LP: #1067246)

Description of the change

Remove redundant src/logmessage/include/core/logmessage.h

(LP: #1067246)

To post a comment you must log in.
Revision history for this message
Micheal Hsu (mkhu) wrote : Posted in a previous version of this proposal

there is a lot of inconsistency in src/:

1. headers. where should we put public headers?
   some headers are in $(top_srcdir)/include, : e.g. plugin.h, point.h
   some are in $(top_srcdir)/src/<sub_directory>/include/: e.g. string.h
   my proposal: put all public headers in $(top_srcdir)/include
2. .cpp files. where should we put source files?
   some .cpp files are in $(top_srcdir)/src : e.g. plugin.cpp
   some .cpp files are in $(top_srcdir)/<sub_directory>/src/: e.g. point.cpp
   my proposal: put all .cpp files in $(top_srcdir)/src/
3. tests. where should we put tests?
   some tests are in $(top_srcdir)/src/<sub_directory>/tests: e.g. plugin, point
   some tests are in $(top_srcdir)/tests/
   my proposal: put all tests in $(top_srcdir)/src/tests
4. tests naming inconsistency:
   e.g. compiz_option_test, option.cpp for option/tests
        compiz_plugin_test, test-plugin.cpp for plugin/tests
        compiz_test_outputdevices, test_outputdevices.cpp for tests/
   my proposal: all test executables should be "compiz_test_xxxx"
                all test files should be "test-xxxx"

Revision history for this message
Micheal Hsu (mkhu) wrote : Posted in a previous version of this proposal

I' like to know your opinion

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

On Mon, May 20, 2013 at 11:16 AM, Hu Kang <email address hidden> wrote:
> there is a lot of inconsistency in src/:

You'd be right. There was a half-finished effort to split the compiz
core code into "modules" - although these days that model doesn't
really make sense.

>
> 1. headers. where should we put public headers?
> some headers are in $(top_srcdir)/include, : e.g. plugin.h, point.h
> some are in $(top_srcdir)/src/<sub_directory>/include/: e.g. string.h
> my proposal: put all public headers in $(top_srcdir)/include

Lets put all the public headers in include/.

> 2. .cpp files. where should we put source files?
> some .cpp files are in $(top_srcdir)/src : e.g. plugin.cpp
> some .cpp files are in $(top_srcdir)/<sub_directory>/src/: e.g. point.cpp
> my proposal: put all .cpp files in $(top_srcdir)/src/

They can probably all go in src/ - as long as they are still compiled
into independent static libraries.

> 3. tests. where should we put tests?
> some tests are in $(top_srcdir)/src/<sub_directory>/tests: e.g. plugin, point
> some tests are in $(top_srcdir)/tests/
> my proposal: put all tests in $(top_srcdir)/src/tests

Likewise.

The only places where (2) and (3) cannot apply is in the plugins,
because CompizPlugin.cmake will take all the files in src/*.cpp and
compile that into the plugin, which isn't really what we want for
testing purposes.

> 4. tests naming inconsistency:
> e.g. compiz_option_test, option.cpp for option/tests
> compiz_plugin_test, test-plugin.cpp for plugin/tests
> compiz_test_outputdevices, test_outputdevices.cpp for tests/
> my proposal: all test executables should be "compiz_test_xxxx"
> all test files should be "test-xxxx"
>

I think compiz_test_xxx for executables and compiz_test_xxx.cpp for
the test files really.

> --
> https://code.launchpad.net/~stevenhooke11/compiz/compiz.fix_1067246/+merge/164665
> Your team Compiz Maintainers is requested to review the proposed merge of lp:~stevenhooke11/compiz/compiz.fix_1067246 into lp:compiz.

--
Sam Spilsbury

Revision history for this message
Micheal Hsu (mkhu) wrote : Posted in a previous version of this proposal

Sam. thanks for your comment

some corrections for my previous comment:
(I am talking about files in $(top_srcdir)/src/)
////////////////////
2. .cpp files. where should we put source files?
   some .cpp files are in $(top_srcdir)/src : e.g. plugin.cpp
   some .cpp files are in $(top_srcdir)/src/<sub_directory>/src/: e.g. point.cpp
   my proposal: put all .cpp files in $(top_srcdir)/src/
3. tests. where should we put tests?
   some tests are in $(top_srcdir)/src/<sub_directory>/tests: e.g. point
   some tests are in $(top_srcdir)/src/tests/
   my proposal: put all tests in $(top_srcdir)/src/tests/
////////////////////

I'll push a new branch with 1, 2, 3, 4, applied to $(top_srcdir)/src/.

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

Hu, great to see that you are helping with the cleanup/inconsistency-elimination !
This was one point on my TODO list. :) Thanks for taking care of it...

+1

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Just before this can be merged in, the install () command which installs whatever is in PUBLIC_HEADERS needs to be removed to (and that would effectively make the SET_TARGET_PROPERTIES call setting PUBLIC_HEADERS redundant in that directory too).

Right now, there are two install () statements that cover the same file.

(Sorry for the late review on that one, today's been kind of hectic, and the next week is going to be a bit all over the place too).

review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

Hey Hu.

Were you going to get to this? I should be able to make the required changes myself - I just don't want to accidentally step on you! :)

Revision history for this message
Micheal Hsu (mkhu) wrote : Posted in a previous version of this proposal

sorry, i've been a little busy recently. i do have a branch, but haven't tested throughly.
so i guess i won't have time to do that.

Revision history for this message
MC Return (mc-return) wrote : Posted in a previous version of this proposal

> sorry, i've been a little busy recently. i do have a branch, but haven't
> tested throughly.
> so i guess i won't have time to do that.

Please take your time, but do not throw away work you've already done...
We will simply wait :)

Revision history for this message
Sam Spilsbury (smspillaz) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
Approved revid is not set in launchpad. This is most likely a launchpad issue and re-approve should fix it. There is also a chance (although a very small one) this is a permission problem of the ps-jenkins bot.
http://jenkins.qa.ubuntu.com/job/compiz-autolanding/127/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/compiz-saucy-amd64-autolanding/39
    SUCCESS: http://jenkins.qa.ubuntu.com/job/compiz-saucy-armhf-autolanding/39
    SUCCESS: http://jenkins.qa.ubuntu.com/job/compiz-saucy-i386-autolanding/39

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/core/CMakeLists.txt'
2--- include/core/CMakeLists.txt 2013-01-03 16:05:26 +0000
3+++ include/core/CMakeLists.txt 2013-07-15 21:05:55 +0000
4@@ -6,6 +6,7 @@
5 countedlist.h
6 global.h
7 icon.h
8+ logmessage.h
9 match.h
10 modifierhandler.h
11 option.h
12
13=== modified file 'src/logmessage/CMakeLists.txt'
14--- src/logmessage/CMakeLists.txt 2012-01-23 17:46:28 +0000
15+++ src/logmessage/CMakeLists.txt 2013-07-15 21:05:55 +0000
16@@ -1,15 +1,9 @@
17-
18 INCLUDE_DIRECTORIES(
19- ${CMAKE_CURRENT_SOURCE_DIR}/include
20-
21 ${compiz_SOURCE_DIR}/include
22
23 ${Boost_INCLUDE_DIRS}
24 )
25
26-SET( PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/core/logmessage.h )
27-SET( PRIVATE_HEADERS )
28-
29 SET( SRCS ${CMAKE_CURRENT_SOURCE_DIR}/src/logmessage.cpp )
30
31 ADD_LIBRARY(
32@@ -24,10 +18,3 @@
33 IF (COMPIZ_BUILD_TESTING)
34 ADD_SUBDIRECTORY( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
35 ENDIF (COMPIZ_BUILD_TESTING)
36-
37-SET_TARGET_PROPERTIES(
38- compiz_logmessage PROPERTIES
39- PUBLIC_HEADER "${PUBLIC_HEADERS}"
40-)
41-
42-install (FILES ${PUBLIC_HEADERS} DESTINATION ${COMPIZ_CORE_INCLUDE_DIR})
43
44=== removed directory 'src/logmessage/include'
45=== removed directory 'src/logmessage/include/core'
46=== removed file 'src/logmessage/include/core/logmessage.h'
47--- src/logmessage/include/core/logmessage.h 2011-10-31 13:51:00 +0000
48+++ src/logmessage/include/core/logmessage.h 1970-01-01 00:00:00 +0000
49@@ -1,51 +0,0 @@
50-/*
51- * Copyright © 2007 Novell, Inc.
52- *
53- * Permission to use, copy, modify, distribute, and sell this software
54- * and its documentation for any purpose is hereby granted without
55- * fee, provided that the above copyright notice appear in all copies
56- * and that both that copyright notice and this permission notice
57- * appear in supporting documentation, and that the name of
58- * Novell, Inc. not be used in advertising or publicity pertaining to
59- * distribution of the software without specific, written prior permission.
60- * Novell, Inc. makes no representations about the suitability of this
61- * software for any purpose. It is provided "as is" without express or
62- * implied warranty.
63- *
64- * NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
65- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
66- * NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
67- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
68- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
69- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
70- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
71- *
72- * Author: David Reveman <davidr@novell.com>
73- */
74-
75-#ifndef _COMPIZ_LOGMESSAGE_H
76-#define _COMPIZ_LOGMESSAGE_H
77-
78-typedef enum {
79- CompLogLevelFatal = 0,
80- CompLogLevelError,
81- CompLogLevelWarn,
82- CompLogLevelInfo,
83- CompLogLevelDebug
84-} CompLogLevel;
85-
86-void
87-logMessage (const char *componentName,
88- CompLogLevel level,
89- const char *message);
90-
91-void
92-compLogMessage (const char *componentName,
93- CompLogLevel level,
94- const char *format,
95- ...);
96-
97-const char *
98-logLevelToString (CompLogLevel level);
99-
100-#endif

Subscribers

People subscribed via source and target branches

to all changes: