Slicer / Slicer

Multi-platform, free open source software for visualization and image computing.
https://www.slicer.org
Other
1.7k stars 549 forks source link

Document the terminology related to `built-in`, `installed` and `embedded` module #6980

Open jcfr opened 1 year ago

jcfr commented 1 year ago

Do we have somewhere a definition of "installed" and "built-in" module? (not installed = in build tree? not built-in = provided by extension?)

_Originally posted by @lassoan in https://github.com/Slicer/Slicer/pull/6970#discussion_r1197307006_

jcfr commented 1 year ago

not installed = in build tree ?

Since extension can be installed in the build tree in the "special" folder <applicationHome>/<org-name-or-domain>/Extensions-12345, saying this is not exactly true.

not built-in = provided by extension?

Not exactly correct either as module can be specific using option like --additional-module-path/--additional-module-paths and in that care they are not installed using the extension manager.


I create a "mermaid" diagram to include in our documentation

Reference:

_Originally posted by @jcfr in https://github.com/Slicer/Slicer/pull/6970#discussion_r1197318853_

jcfr commented 1 year ago

I guess what I miss is a very high-level description of what installed and built-in flags are meant to distinguish between.

For example, built-in could refer to "not being manually installed by the user" or "source code is in Slicer source tree". Both could make sense, both could be useful to know.

_Originally posted by @lassoan in https://github.com/Slicer/Slicer/pull/6970#discussion_r1197327348_

jcfr commented 1 year ago

re: built-in

A built-in module is a module that is distributed along side the Slicer application.

This usually means its source code is either located in the Slicer source tree or integrated into it using add_subdirectory().

re: installed

A module is considered installed if it is not built-in and it it is installed using the extensions manager.

Generally speaking, this means it is loaded from an install tree.

re: embedded

Looking at the implementation, a module is considered embedded if it is a descendant of the <applicationHome> except <applicationHome>/<org-name-or-domain>/Extensions-12345

Conclusion

Background to motivate the removal:

The function vtkSlicerApplicationLogic::IsPluginBuiltIn():

The function vtkSlicerApplicationLogic::IsEmbeddedModule():