Skip to content

Atempt to simplify the configuration stack in CubicWeb

Related #476 (closed)

I've made the mistake to look at CW source code again, or was forced too, idk.

Anyway, I've made a map of all the weird configuration gigantic class stack we have in CW.

Here how it looks WITHOUT devtools:

image

And with devtools:

configuration_tree

It's kinda overly complicated for no real good justification.

So I've decided to try to simplify it like that:

image

Which result in that:

configuration_tree_simplify2

And with devtools (which explains why I couldn't merge it even more) :

configuration_tree_simplify

Since this is a lot of modification I've split it into parts because we might not want all of them or all of them at once, so commits are in this order:

  1. merging CubicWebNoAppConfiguration into CubicWebConfiguration because it has no real usage
  2. merging WebConfigurationBase into WebConfiguration because it has no real usage
  3. remove the -c option to 'cubicweb-ctl create' which allowed to create CW using "repository.conf" or "pyramid.conf" but was in practice never used and we only use (I think?) "all-in-one.conf" today
  4. this allow to remove CubicWebPyramidConfiguration because it's not used anymore
  5. which allow to merge BaseWebConfiguration into WebConfiguration

I've used search-forge to see if any of the removed class are used somewhere and the only case is here:

For CubicWebPyramidConfiguration which just needs to be removed from this list.

So we'll probably won't have any real retrocompatibility issues.

Edited by François Ferry

Merge request reports