[MDEV-6248] GUI-friendly cmake options to enable/disable plugins Created: 2014-05-16 Updated: 2015-10-24 Due: 2014-09-18 Resolved: 2014-06-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | 10.1.0 |
| Type: | Task | Priority: | Minor |
| Reporter: | Sergei Golubchik | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Currently cmake uses WITH_XXX, WITHOUT_XXX, WITH_XXX_STORAGE_ENGINE, WITHOUT_XXX_STORAGE_ENGINE to specify what plugins should be compiled and how. They are
This is the current behavior (ignoring *_STORAGE_ENGINE variants):
In this task we implement a set of BUILD_PLUGIN_XXX options:
This is the new behavior:
Thus BUILD_PLUGIN_XXX can be explained as «the highest desired plugin integration level». For example, if it is set to STATIC, but plugin does not support static builds — okay, it'll be built dynamically. But if we want at most DYNAMIC integration level and the plugin only supports static, it will not be built at all. |
| Comments |
| Comment by Elena Stepanova [ 2014-05-16 ] | ||||||||||||
|
I think the semantics is not flawless, and I expect there will be some confusion (and probably bug reports), particularly due to this combination:
The problem is, comparing to the old semantics, awful as it was, we are losing one value. Previously we had 4:
With the new values, we have Thus, we have lost WITH=ON, WITHOUT=ON, and semantics of the last line is wrong. IIRC we have a similar thing for SSL (yes/system/bundled/no). | ||||||||||||
| Comment by Sergei Golubchik [ 2014-05-16 ] | ||||||||||||
|
Right. I considered the case when both WITH and WITHOUT are used as "undefined I don't know whether it was intentionally implemented to "allow only static" But ok, I can do it your way too. | ||||||||||||
| Comment by Kristian Nielsen [ 2014-06-18 ] | ||||||||||||
|
We discussed on IRC the following idea: Currently, if user specifies eg. -DWITH_CASSANDRA_STORAGE_ENGINE=1, but some dependency is missing and Cassandra cannot be built, the cmake run will still succeed. It does give a warning about not using the option, but since the exit code is zero, this might easily be missed by following outputs from eg. build scripts. So if the new options could be made to fail the cmake run if the requested plugin could not be built, that might be a better semantics. | ||||||||||||
| Comment by Sergei Golubchik [ 2014-06-18 ] | ||||||||||||
|
The original design was based on preserving the same functionality we had with WITH_ and WITHOUT_ but in a GUI-friendly and logically consistent matter. Adding new functionality was not the goal. But If I'll list all possible preference and combinations, I'd get something like
Those in bold were possible in 5.5 and 10.0. They are supported in my current implementation, with the values NO, STATIC, DYNAMIC, AUTO. But I don't really know how to support all nine variants without making this option too confusing to use. And I don't know whether it makes sense to do that. | ||||||||||||
| Comment by Sergei Golubchik [ 2014-06-22 ] | ||||||||||||
|
Suggestion:
Where NO is, basically, a noise word, always ignored. It's added for readability. Otherwise, all 9 variants as above can be specified as
also, I could allow abbreviating them to the first letter. Making it simply D,A or S,D, for example. | ||||||||||||
| Comment by Sergei Golubchik [ 2014-06-22 ] | ||||||||||||
|
Alternatively, we can keep the list of NO, STATIC, DYNAMIC, AUTO. And add the value of FORCE (which means the same as AUTO, but aborts if the plugin cannot be build. It'd be S,D,A in the previous comment). This FORCE matches the behavior of --plugin-XXX=FORCE as the server command-line option | ||||||||||||
| Comment by Sergei Golubchik [ 2014-06-23 ] | ||||||||||||
|
per irc discussion, I've renamed FORCE to YES | ||||||||||||
| Comment by Elena Stepanova [ 2015-10-24 ] | ||||||||||||
|
Final implementation is described in the KB: https://mariadb.com/kb/en/mariadb/specifying-which-plugins-to-build/
|