Merge lp:~mkhu/compiz/compiz.fix_1067246 into lp:compiz/0.9.10

Proposed by Micheal Hsu
Status: Superseded
Proposed branch: lp:~mkhu/compiz/compiz.fix_1067246
Merge into: lp:compiz/0.9.10
Diff against target: 76 lines (+1/-54)
2 files modified
src/logmessage/CMakeLists.txt (+1/-3)
src/logmessage/include/core/logmessage.h (+0/-51)
To merge this branch: bzr merge lp:~mkhu/compiz/compiz.fix_1067246
Reviewer Review Type Date Requested Status
Sam Spilsbury Needs Fixing
Review via email: mp+164665@code.launchpad.net

This proposal has been superseded by a proposal from 2013-07-15.

Description of the change

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

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

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 :

I' like to know your opinion

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

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 :

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 :

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 :

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 :

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 :

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 :

> 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 :)

Unmerged revisions

Preview Diff

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

Subscribers

People subscribed via source and target branches