modularized all source code #4391
Conversation
The new directory structure can be browsed here: https://github.com/ktsaou/netdata/tree/plugins3 |
|
Why only The key point here is that every plugin and every module should be in its own directory. I prefer to have them under
So, you don't like non-C code to be in |
If you put everything in Another aspect is the fact that core part written in C is the only one which needs compilation. This also can be reflected by a directory structure. I don't think there is a need to compile whole netdata when developing only apps_plugin. This increase in developer experience could be achieved partly by changing build system and partly by better directory structure. In my opinion it would be more beneficial if code would be structured in something similar to:
This way you have clear distinction what is what and where it resides. Also I don't see any need to have directories like It would be possibly even better if
TL;DR Group directories first by function then by code type to provide better DevEX and modularity. As for other things:
This should be in
Almost no one reads READMEs which are far down in directory layout. This should be in documentation. Also look at this part:
This is pointless, you put |
Also regarding build system, good directory layout can lead to less code generation. For example Makefiles for python plugin doesn't need to be automatically created by autoconf/cmake and they can consist of developer tooling. This means that if someone is developing only parts of python code, then he/she doesn't need things like gcc, cmake/autoconf etc. as only thing needed is to have standard tools needed for particular language (python in this case). Not even core part is needed and if it is then can be downloaded from nightly build or run with docker container. |
Then I think the best way is to move |
Navigate a bit this: https://github.com/ktsaou/netdata/tree/plugins3/src/plugins |
I really like removing it... It will be a great improvement... |
Added |
oops! sorry @paulfantom @Ferroin |
I ran some basic tests and it seems to be ok. |
8fbf817
into
netdata:master
This PR changes the structure of source tree for almost every piece of code and config file.
This was required to allow more people step into netdata source tree, understand how it works, allow netdata to integrate sub-gits into it, etc.
The new structure follows the key functions of netdata:
Every file of netdata is now under these directories.