# New module system landing soon

**URL:** https://discourse.paraview.org/t/new-module-system-landing-soon/1094
**Category:** Development
**Created:** [January 2, 2019, 9:32pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094 "2019-01-02T21:32:21Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 2, 2019, 9:32pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/1 "2019-01-02T21:32:21Z")

</div>

Hi all,

VTK’s side of the new module system is landing in the next week or so. ParaView will follow shortly after.

The VTK announcement is here: [https://public.kitware.com/pipermail/vtk-developers/2019-January/036648.html](https://public.kitware.com/pipermail/vtk-developers/2019-January/036648.html)  
Its merge request is here: [https://gitlab.kitware.com/vtk/vtk/merge\_requests/5020](https://gitlab.kitware.com/vtk/vtk/merge_requests/5020)  
The ParaView MR will be up once VTK merges, but the branch as-is can be seen here (updated sporadically): [https://gitlab.kitware.com/ben.boeckel/paraview/tree/new-cmake-module](https://gitlab.kitware.com/ben.boeckel/paraview/tree/new-cmake-module)

CMake changes:

- `PARAVIEW_BUILD_PLUGIN_XXX` → `PARAVIEW_PLUGIN_ENABLE_XXX`
- CMake APIs for plugins, clients, and server manager XML files have been updated and made much more uniform. As with VTK, there is inline documentation with the code which will eventually be extracted and added to ParaView’s Doxygen documentation.
- ClientServer wrapping uses the same patterns as Python and Java now (plugins still get it “for free”).
- ServerManager XML files can now be attached to other modules (though this is not done right now). For example, ParaView can add a proxy to the `VTK::IONetCDF` module and it will be used properly. This is in contrast to the way it is done currently where the XML file is associated with `ParaView::ServerManagerApplication` and it just hopes that `VTK::IONetCDF` is available in some way for the ClientServer wrappings.
- ServerManager, ClientServer, and plugins are built in such a way to provide targets for proper initialization (e.g., ParaView makes a `paraview_server_manager` target for all of its XML outputs). See the documentation for usage details.

The details for VTK are largely the same as for ParaView except:

- Only a handful of plugins have been updated at the moment; the rest will be updated after the initial merge.
- Examples are not updated yet.
- The `catalyze.py` and the edition manifests are not yet updated.
- VisItBridge needs updated for the new system (will likely be done in concert with [https://gitlab.kitware.com/paraview/paraview/issues/18681](https://gitlab.kitware.com/paraview/paraview/issues/18681)).

Some other tasks that need to be done once it lands:

- The `ParaViewCore/Testing` directory needs integrated. As far as I can tell, it isn’t used on `master` either.
- The XML tests should be sorted a bit better.
- ServerManager XML files should be split to be associated with the modules providing the classes behind the proxies (the new CMake API for this makes it much easier).
- ParaView also has lots of unused `.sha512` data files laying around. Whether to remove them from the repo or add tests to use them should be determined.
- Some modules still have optional public dependencies. These should be resolved.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 16, 2019, 8:11pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/2 "2019-01-16T20:11:19Z")

</div>

The merge request is here: [https://gitlab.kitware.com/paraview/paraview/merge\_requests/2971](https://gitlab.kitware.com/paraview/paraview/merge_requests/2971)

A superbuild followup MR will happen once this has landed.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 23, 2019, 11:19am UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/3 "2019-01-23T11:19:19Z")

</div>

Nice work ben ! Building it right now.

Let us know when we can investigate and open related issues.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 23, 2019, 4:49pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/4 "2019-01-23T16:49:06Z")

</div>

@ben.boeckel: could you share a basic ParaView plugin example ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 23, 2019, 8:14pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/5 "2019-01-23T20:14:04Z")

</div>

The only ported ones are those in ParaView itself so far. External plugins night need some more CMake code (e.g., `find_package(ParaView)` and that might still have issues), but I don’t think they’ll need too much.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 24, 2019, 1:28pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/6 "2019-01-24T13:28:20Z")

</div>

Nonetheless, I’m unable to add a plugin in ParaView either.  
I’m even unable to add another dummy filter to ArrowGlyph plugin.

I must be missing something, the client server wrapping does not take place.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 24, 2019, 1:34pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/7 "2019-01-24T13:34:58Z")

</div>

Did you look at those in ParaView? In order to be wrapped in ClientServer, a module must be created. The `vtk_module_scan` and `vtk_module_build` boilerplate in the plugin’s `CMakeLists.txt` will likely be refactored out and made simpler with a new function the plugin CMake API provides, but for now it’s still necessary.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 24, 2019, 1:41pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/8 "2019-01-24T13:41:45Z")

</div>

Of course, I used them as a base.

Here is a simple patch that tries to add a MyElevationFilter to the ArrowGlyph plugin, without success.  
The CS wrapping is not done.

[0001-jpouderoux-test.patch](https://discourse.paraview.org/uploads/default/original/2X/5/558cfd97733cc1c67c1990910500fde869ba0fd5.patch) (7.5 KB)

---

<div class="post-metadata">

### Author: ![Joachim\_Pouderoux](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joachim_pouderoux/32/38_2.png) [@Joachim\_Pouderoux](https://discourse.paraview.org/u/Joachim_Pouderoux)
#### Post date: [January 24, 2019, 2:07pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/9 "2019-01-24T14:07:02Z")

</div>

Mathieu:  
Fix by moving Filters::Core in DEPENDS instead of PRIVATE\_DEPENDS

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 24, 2019, 2:07pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/10 "2019-01-24T14:07:51Z")

</div>

Indeed, thanks !

This is one is kinda hard to spot.

---

<div class="post-metadata">

### Author: ![Joachim\_Pouderoux](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joachim_pouderoux/32/38_2.png) [@Joachim\_Pouderoux](https://discourse.paraview.org/u/Joachim_Pouderoux)
#### Post date: [January 24, 2019, 2:08pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/11 "2019-01-24T14:08:32Z")

</div>

@ben.boeckel A first error when trying to build an external plugin:  
in `paraview-config.cmake.in`: at lines 42 and 43, it should be

```auto
include("${CMAKE_CURRENT_LIST_DIR}/vtk/vtkModuleWrapPython.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/vtk/vtk-python.cmake")

```

instead of

```auto

include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapPython.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/vtk-python.cmake")

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 24, 2019, 3:37pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/12 "2019-01-24T15:37:17Z")

</div>

Yeah, `paraview-config.cmake` needs some other love as well. Those files should actually just be handled with the `find_package(VTK)` that should be there. Once I have the buildbots happier, I’ll focus on that. ParaView has been a rockier merge since my machines test much less of ParaView comparatively and I hadn’t tested plugins on other platforms…

---

<div class="post-metadata">

### Author: ![Joachim\_Pouderoux](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joachim_pouderoux/32/38_2.png) [@Joachim\_Pouderoux](https://discourse.paraview.org/u/Joachim_Pouderoux)
#### Post date: [January 24, 2019, 3:56pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/13 "2019-01-24T15:56:30Z")

</div>

@ben.boeckel Do you have an agenda for this? When can users expect something stable on this side?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 24, 2019, 3:59pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/14 "2019-01-24T15:59:08Z")

</div>

The big issues right now is plugin loading on Windows (debugging now) and Python on Linux not working on the buildbot (next). I’m working on the build failures while I’m getting builds to debug for those. Hopefully it won’t be more than a couple more days…

---

<div class="post-metadata">

### Author: ![Joachim\_Pouderoux](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joachim_pouderoux/32/38_2.png) [@Joachim\_Pouderoux](https://discourse.paraview.org/u/Joachim_Pouderoux)
#### Post date: [January 24, 2019, 4:08pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/15 "2019-01-24T16:08:50Z")

</div>

Great. I guess you also noticed that default plugins are no more listed in the Plugin Manager, which is boring.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 24, 2019, 5:02pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/16 "2019-01-24T17:02:35Z")

</div>

@ben.boeckel : much better now. Everything works when adding a plugin in pv except for the UI\_RESSOURCE with a .qrc file. Is that suposed to work ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 24, 2019, 5:58pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/17 "2019-01-24T17:58:48Z")

</div>

I don’t think I’ve seen that not working. What isn’t working about it?

---

<div class="post-metadata">

### Author: ![Joachim\_Pouderoux](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joachim_pouderoux/32/38_2.png) [@Joachim\_Pouderoux](https://discourse.paraview.org/u/Joachim_Pouderoux)
#### Post date: [January 24, 2019, 6:02pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/18 "2019-01-24T18:02:11Z")

</div>

When loading a plugin where we added:

```auto
paraview_add_plugin( ...
UI_RESOURCES BagPlotViewsAndFilters.qrc
)

```

Plugin load fails and prints:

```auto
ERROR: In /.../paraview/ParaViewCore/ClientServerCore/Core/vtkPVPluginLoader.cxx, line 418
vtkPVPluginLoader (0x55f98a2f3e20): /.../paraview-build/lib/paraview-5.6/plugins/BagPlotViewsAndFilters/BagPlotViewsAndFilters.so: undefined symbol: _ZTV28BagPlotViewsAndFiltersPlugin

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 24, 2019, 6:06pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/19 "2019-01-24T18:06:08Z")

</div>

> [@Joachim\_Pouderoux](#):
>
> \_ZTV28BagPlotViewsAndFiltersPlugin

That’s the vtable for the plugin class. Is the generated source missing a dtor or another function which is declared in the header, but not in the source?

---

<div class="post-metadata">

### Author: ![Joachim\_Pouderoux](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joachim_pouderoux/32/38_2.png) [@Joachim\_Pouderoux](https://discourse.paraview.org/u/Joachim_Pouderoux)
#### Post date: [January 24, 2019, 6:07pm UTC](https://discourse.paraview.org/t/new-module-system-landing-soon/1094/20 "2019-01-24T18:07:47Z")

</div>

Yes but when removing UI\_RESOURCES, plugin works as expected - see [https://gitlab.kitware.com/paraview/paraview/merge\_requests/2974#note\_508209](https://gitlab.kitware.com/paraview/paraview/merge_requests/2974#note_508209).

[Next page](https://discourse.paraview.org/t/new-module-system-landing-soon/1094.md?page=2)
