ericsson / codecompass Goto Github PK
View Code? Open in Web Editor NEWCodeCompass is a software comprehension tool for large scale software written in C/C++ and Java
Home Page: https://codecompass.net
License: GNU General Public License v3.0
CodeCompass is a software comprehension tool for large scale software written in C/C++ and Java
Home Page: https://codecompass.net
License: GNU General Public License v3.0
This diagram shows the the directories (modules) that are users of the queried module.
I've followed instructions but when building I got this error:
[...]
libtool: warning: '/home/ovi/cc/CodeCompass-deps/lib/../lib64/libstdc++.la' seems to be moved
libtool: warning: '/home/ovi/cc/CodeCompass-deps/lib/../lib64/libstdc++.la' seems to be moved
libtool: warning: '/home/ovi/cc/CodeCompass-deps/lib/../lib64/libstdc++.la' seems to be moved
[...]
make all-am
make[1]: Entering directory '/home/john/cc/CodeCompass'
make[1]: *** No rule to make target '/home/john/cc/CodeCompass/lib/java/commons-cli-1.3.1.jar', needed by 'all-am'. Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/ovi/cc/CodeCompass'
Makefile:3780: recipe for target 'all' failed
make: *** [all] Error 2
Any ideea what could be wrong?
Create a table for tags(CppTag) to store some extra information for CppEntity's(ctor, dtor, virt, pod
, etc.). Then we can remove the CppFunction, CppType etc. tables.
Hello guys, I was encountered with problem during compilation.
Here what ./configure
said to me:
checking for Xerces C++ Parser headers in /usr/src/cc/CodeCompass-deps/include and /usr/src/cc/CodeCompass-deps/include/xercesc... not found
checking for Xerces C++ Parser... no
configure: error: cannot find the Apache Xerces library
I strictly follow instructions from this page: https://github.com/Ericsson/CodeCompass/wiki/Lazy-Dog.
And dependencies building finished without problems.
But it looks like there is really no xerces includes in CodeCompass-deps tree.
UPD:
I examined build-deps.sh
and found that link in build_xercesc
is broken http://xenia.sote.hu/ftp/mirrors/www.apache.org/xerces/c/3/sources/xerces-c-3.1.1.tar.gz, returns 404 result.
Hi,
I'm following the steps described here: https://github.com/Ericsson/CodeCompass/wiki/How-To-Build-Codecompass ― I'm using Fedora 24.
When running the CodeCompass/scripts/build_deps.sh
script it seems to me that it appears to download and build GCC 4.9.3. I'm not sure why it needs to build such an old version of GCC, but unfortunately the build fails. (I have GCC 6.2.1 installed, and maybe they didn't think about using it to build an older version of GCC...)
Here is the relevant part of the log:
g++ -c -DIN_GCC_FRONTEND -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -Icp -I../.././gcc -I../.././gcc/cp -I../.././gcc/../include -I../.././gcc/../libcpp/include -I/home/Timur/Projects/Others/cc/CodeCompass-deps/deps/gcc-4.9.3/host-x86_64-unknown-linux-gnu/gmp -I/home/Timur/Projects/Others/cc/CodeCompass-deps/deps/gcc-4.9.3/gmp -I/home/Timur/Projects/Others/cc/CodeCompass-deps/deps/gcc-4.9.3/host-x86_64-unknown-linux-gnu/mpfr -I/home/Timur/Projects/Others/cc/CodeCompass-deps/deps/gcc-4.9.3/mpfr -I/home/Timur/Projects/Others/cc/CodeCompass-deps/deps/gcc-4.9.3/mpc/src -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/bid -I../libdecnumber -I../.././gcc/../libbacktrace -DCLOOG_INT_GMP -I/home/Timur/Projects/Others/cc/CodeCompass-deps/deps/gcc-4.9.3/host-x86_64-unknown-linux-gnu/cloog/include -I/home/Timur/Projects/Others/cc/CodeCompass-deps/deps/gcc-4.9.3/cloog/include -I./cloog/include -I/home/Timur/Projects/Others/cc/CodeCompass-deps/deps/gcc-4.9.3/host-x86_64-unknown-linux-gnu/isl/include -I/home/Timur/Projects/Others/cc/CodeCompass-deps/deps/gcc-4.9.3/isl/include -I/home/Timur/Projects/Others/cc/CodeCompass-deps/usr/include -I/home/Timur/Projects/Others/cc/CodeCompass-deps/include -o cp/init.o -MT cp/init.o -MMD -MP -MF cp/.deps/init.TPo ../.././gcc/cp/init.c
In file included from ./tm.h:27:0,
from ../.././gcc/cp/except.c:27:
../.././gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
^
../.././gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
In file included from ./tm.h:45:0,
from ../.././gcc/cp/except.c:27:
../.././gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
^
In file included from ../.././gcc/cp/except.c:1013:0:
cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’:
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here
cfns.gperf: At global scope:
cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int)’ used but never defined
Makefile:1058: recipe for target 'cp/except.o' failed
make[3]: *** [cp/except.o] Error 1
My question is: is it possible to fix this, or could I build CodeCompass without it building GCC 4.9.3?
Server side syntax highlight
for cpp service.
The constructor of ThriftHandler
gets a webserver name as a second parameter. As far as I have seen, the Thrift handler does nothing with this parameter. This should be eliminated.
If I click on the TiXmlString node in tinystr.h file at 78 line and I get an Info Tree, the Usages will throw an exception. The exception is throwing in the util textRange function.
78. TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0) // click on TiXmlString
79. {
80. init( static_cast<size_type>( strlen(copy) ));
81. memcpy(start(), copy, length());
82. }
Friend functions should also be collected in CppFriendship
table. Now only friend classes are stored.
In the CLI we use the file names (e.g. build.json, parselog, build.log
, etc.) several places in the sourcecode. These should be refactored to global variables or in a config file
.
We should try store file contents compressed by zip in the database (CodeChecker does this too).
Add user guide
at infopage.
Parse inclusion directives and support jump to definition in text editor.
Create a JavaScript global object to store common information such as file id, fileInfo, url information etc.
We should reconsider some common functions why do they have the given parameter list. For example the modules with type ContextButton
have a render()
function which is given a FileInfo
object. Why FileInfo
? What if later something else will also be needed for a plugin? If we think it is likely that these parameters may change in the future then we should get prepared even now. Shouldn't these functions somehow rely on this global context?
UML class diagram uses an implementation which needs libexpat
as dependency in GraphViz.
The different modules which provide webgui functionality should have separate CSS files.
Interface diagram shows the used and provided interfaces of a source code file and shows linking information.
I don't think we should show empty reference nodes at InfoTree. We should remove or disable them.
It shows the namespaces, classes and their doxygen documentation in a tree.
The revision control navigator allows to search in the GIT repositories, visualize branches and merges, list and show commit diffs.
// NestedClass.h
class NestedClass{
public:
class InnerClass
{
static const int staticInt;
void f(int param_);
};
private:
static InnerClass createNestedClass();
};
// NestedClass.cpp
const int NestedClass::InnerClass::staticInt = 1; /*!< No ast node for InnerClass and NestedClass at this context */
void NestedClass::InnerClass::f(int param_) /*!<
1. If I get an Info Tree for InnerClass, it will return the Info Tree of the f function
2. If I get an Info Tree for NestedClass, it will return the Info Tree of the InnerClass
*/
{
}
NestedClass::InnerClass NestedClass::createNestedClass() /*!< No ast nodes for NestedClass at both places */
{
return InnerClass{};
}
Shows the individual class members and their inheritance hierarchy.
Hi,
How would one make this work with a build system that does not invoke directly gcc or make?
I have a build system driver written in python which in turn calls CMake to generate the makefiles and after it calls make. All of that is done from within python scripts. I have built and installed Code Compass
and I try to parse my project by passing to -b
a shell script which calls my python script. My project builds OK, which means the script invocation works but the parser does not parse anything! I instructed it to look for CMake, my python script invocation, gcc and make using export CC_LOGGER_GCC_LIKE="python_script:cmake:make:gcc"
, but still it does not parse anything.
Do you have any pointers on how I could overcome that?
Function Virtual Call is not working properly.
class Base
{
public:
virtual void f() = 0;
};
class Derived
{
virtual void f(){} // f function's Virtual call is empty.
};
int main()
{
Derived *d = new Derived();
d->f();
return 0;
}
The command line interface of CodeCompass, i.e. the python script should support SQLite besides PostgreSQL.
When there are several findings in a file in the same row then the Query results window contains all of them but clicking any of these jumps to the last occurance in the row.
hello blabla hello
Here we always jump to the second hello.
The parser doesn't parse the macros. We should support it.
When the server is started with an empty workspace.cfg
file then an empty page appears in the browser.
Create a new reference
in cpp service for function return type
.
This might not be an issue but a misconfiguration on my part. I've followed all instructions, and I've also tried the ones from lazy dog
page but all I get is a blank page and the following debug info in Safari:
http://i.imgur.com/Eyc39OF.png
Here is what I did (after installing required packages and succesfully building codecompass):
/home/john/cc/CodeCompass-deps/bin/postgres -D /home/john/pgsql_data -p 6250 >pgsql_log 2>&1
CodeCompass parse -f -w /home/john/cc/workdir -n tinyxml -b "g++ *.cpp -std=c++11" --dbuser john --dbport 6250
CodeCompass server -w /home/john/cc/workdir -p 6251 --dbport 6250 --dbuser john
No errors are issues on any of those commands.
Thanks for your help and for fixing previous issue, now building of the project went ok.
Here is more info:
INFO CodeCompass: Webserver: [tid: 140659779868480, time: 1477215622] util/src/environment.cpp:143
Detected CodeCompass install path: /home/jonh/cc/CodeCompass-install
Workspace
id = simple_project
connection = pgsql:host=localhost;database=simple_project;user=jonh;port=6250
description = simple_project
datadir = /home/jonh/cc/workdir/simple_project/data
Workspace
id = tinyxml
connection = pgsql:host=localhost;database=tinyxml;user=jonh;port=6250
description = tinyxml
datadir = /home/jonh/cc/workdir/tinyxml/data
DEBUG CodeCompass: Webserver: [tid: 140659779868480, time: 1477215622] webserver/pluginable-webserver/src/userstat.cpp:126
The default root interface is: enp0s3
Mongoose web server v. 5.4, starting on port(s) 6251 with web root [/home/jonh/cc/CodeCompass-install/share/codecompass/html]
Oct 23, 2016 12:40:22 PM cc.search.service.app.service.ServiceApp main
INFO: Search server started!
Oct 23, 2016 12:40:22 PM cc.search.service.app.service.ServiceApp main
INFO: Search server started!
Oct 23, 2016 12:40:22 PM cc.search.suggestion.SuggestionHandler loadDatabases
SEVERE: Failed to load the file name suggestion database!
java.io.EOFException
at org.apache.lucene.store.InputStreamDataInput.readByte(InputStreamDataInput.java:37)
at org.apache.lucene.store.DataInput.readInt(DataInput.java:96)
at org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:134)
at org.apache.lucene.util.fst.FST.(FST.java:322)
at org.apache.lucene.util.fst.FST.(FST.java:308)
at org.apache.lucene.search.suggest.analyzing.AnalyzingSuggester.load(AnalyzingSuggester.java:593)
at cc.search.suggestion.SuggestionHandler.loadFileNameSuggester(SuggestionHandler.java:120)
at cc.search.suggestion.SuggestionHandler.loadDatabases(SuggestionHandler.java:47)
at cc.search.service.app.service.SearchHandler.(SearchHandler.java:158)
at cc.search.service.app.service.ServiceApp.(ServiceApp.java:30)
at cc.search.service.app.service.ServiceApp.main(ServiceApp.java:51)
Oct 23, 2016 12:40:22 PM cc.search.suggestion.SuggestionHandler loadDatabases
SEVERE: Failed to load the file name suggestion database!
java.io.EOFException
at org.apache.lucene.store.InputStreamDataInput.readByte(InputStreamDataInput.java:37)
at org.apache.lucene.store.DataInput.readInt(DataInput.java:96)
at org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:134)
at org.apache.lucene.util.fst.FST.(FST.java:322)
at org.apache.lucene.util.fst.FST.(FST.java:308)
at org.apache.lucene.search.suggest.analyzing.AnalyzingSuggester.load(AnalyzingSuggester.java:593)
at cc.search.suggestion.SuggestionHandler.loadFileNameSuggester(SuggestionHandler.java:120)
at cc.search.suggestion.SuggestionHandler.loadDatabases(SuggestionHandler.java:47)
at cc.search.service.app.service.SearchHandler.(SearchHandler.java:158)
at cc.search.service.app.service.ServiceApp.(ServiceApp.java:30)
at cc.search.service.app.service.ServiceApp.main(ServiceApp.java:51)
Oct 23, 2016 12:40:22 PM cc.search.service.app.service.ServiceApp main
INFO: Start serving search for index /home/jonh/cc/workdir/simple_project/data/search
Oct 23, 2016 12:40:22 PM cc.search.service.app.service.ServiceApp main
INFO: Start serving search for index /home/jonh/cc/workdir/tinyxml/data/search
For most types codecompass shows what functions return this type. It does not work for enums.
Shows the classes from which this class inherits and which inherit this one.
While CodeCompass server is running, the used databases can't be removed. We should give a user friendly warning message that the delete command emitted by the CLI was rejected and we should make sure that in this case the other parts of the workspace (i.e. the content of workspace.cfg and the project directory) is untouched.
When I am looking for a class, it is annoying to list all the forward declarations. Of course, I can always use go to definition, but I think it is a redundant action. We either should not show forward declarations or list them after the real definitions.
Suggestion database doesn't work in search plugin.
Create tests for cpp service.
Component Users diagram for source file S shows which source files depend on S through the interfaces S provides.
If I use "Non Reduced View" to see "Component Users" of a main.cpp file for a big project I get the following error right away:
"Graph generation seems to be too long."
Still I can see a loading animation but I wander maybe I should get this error after a while not right away.
Also I wonder if I should wait more for the drawing to appear (in this case) or it will never appear? (I've waited like 10 minutes)
update: I will try "Non Reduced View" option with a simpler project, I was just curios what is displayed for a bigger project.
Thrift 0.9.3 introduced a change:
[THRIFT-727] - support native C++ language specific exception message
This change generates a what() method for all generated exception classes. CodeCompass
has a what field in most exception classes leading to conflicting definitions in generated files.
At least one CodeCompass thrift file seems to have become invalid in thrift 0.9.3:
[ERROR:CodeCompass/service/version-api/version.thrift:368] (last token was 'from')
Cannot use reserved language keyword: "from"
This diagram shows the relationships between the subdirectories of the queried module. This diagram is useful to understand the relationships of the subdirectories (submodules) of a module.
Hi.
When I try to use the following line:
CodeCompass codechecker -w /home/john/cc/workdir/ -n src_test_project --dbport 6250 --dbuser john
I am getting this error:
Set CODECHECKER_HOME environment variable!
even if that variable is set:
$ env | grep -i codechecker
CODECHECKER_HOME=/home/john/cc/CodeCompass/service/codechecker
I've also tried:
python /home/john/cc/CodeCompass-install/share/codecompass/cli/CodeCompass.py codechecker -w /home/john/cc/workdir/ -n src_test_project --dbport 6250 --dbuser john
Any idea what to do?
Browsing History
shows the path of the source code's iteration in a tree structure. When a file is opened via File Manager, Info Tree or Query Results
then a new tree node is added under the root.
Print statistics at the end of parse.
Create an infobox feature which shows the documentation
of the clicked AST node.
The file given after –l
flag in wrapper script should be copied as build.json
to the project directory. This is necessary because CodeCompass codechecker ...
command uses this file too.
Info Tree Variable Read/Write
are empty.
libindexerservice.so
is installed directly under lib
directory. This file is used for parsing for sure. If it is not used for service then this file should go under parserplugin
directory.
We can create shortcuts
(labels) to some parts of the project, such as to the root of the directory containing the source code of the project and after we can jump to that parts easily.
What happens if user provides a --skip action for a parser which is the dependency of an other? We should warn the user about this in a log message.
The "depends on" diagram on module A traverses the subdirectories of module A and shows all directories that contain files that any of the source files in A includes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.