Matthew Wild
90fea186dd
modulemanager: Remove autoloading of per-platform module
...
We only support posix these days, and we moved it to the core startup process
to make it more deterministic and reliable.
2025-02-13 18:00:54 +00:00
Matthew Wild
bde66f9436
modulemanager: Allow modules to specify supported Lua versions in metadata
2025-01-09 16:44:48 +00:00
Matthew Wild
f6ed03a903
modulemanager: Handle multiple digits in Lua version number
...
Lua has a slow release cycle, but it would be nice if Prosody doesn't break
unnecessarily with 5.10 :)
2025-01-09 16:06:53 +00:00
Matthew Wild
8a38b5d0da
modulemanager: Allow modules to expose module.ready - to be called after init
...
This is a shortcut for module:on_ready() which exposes the functionality in an
idiomatic way consistent with module.load, module.unload, etc.
module.ready runs when the module is loaded and the server has finished
starting up.
2023-11-30 10:09:47 +00:00
Kim Alvefur
d47a7bb3bd
core: Prefix module imports with prosody namespace
2023-03-17 16:23:07 +01:00
Kim Alvefur
a696800291
core.modulemanager: Fix global flag on per-host instances of shared modules ( fix #1736 )
...
This flag is something of a shortcut for `module.host == "*"` and should
always be equal to that. Its absence on the proxy object made the
property of the global module instance visible, causing problems such as
with URL reporting in mod_http
2022-04-04 18:44:57 +02:00
Kim Alvefur
8648dd2191
core.modulemanager: Save module metadata for potential later use
...
Makes it reachable from the shell if nothing else
2022-02-05 01:33:46 +01:00
Matthew Wild
b917045785
modulemanager: Shorten metadata keys to improve readability and memorability
2022-02-04 15:42:13 +00:00
Matthew Wild
61d33dd364
modulemanager: Add plugin load filter that reads module metadata from source
...
Metadata in modules is added using lines formatted as:
--% key: value
Where key is a valid identifier string, and value is also a string (leading
and trailing whitespace are trimmed during parsing).
The initial supported keys are:
--% requires_core_features: feature1, feature2, ...
--% conflicts_core_features: feature1, feature2. ...
These 'features' map to features reported by the new core.features module.
A benefit of this load-time metadata approach compared to e.g. something like
module:requires()/module:conflicts() is that we can continue to look in module
search paths for a suitable module. Aborting an already-loaded module due to
a version conflict would be too late.
2022-02-04 14:20:00 +00:00
Matthew Wild
4bdff5a452
modulemanager, moduleapi: Switch to new pluginloader interface
2022-02-04 14:11:46 +00:00
Kim Alvefur
0736ecc63d
core.modulemanager: Remove compat for mod_console rename in 0.8
...
Should no longer be needed, especially since mod_admin_telnet morphed
into mod_admin_shell and mod_admin_socket
2022-01-05 04:04:45 +01:00
Kim Alvefur
e813cdf91b
core.modulemanager: Load mod_smacks on Components
...
Since it applies to s2s on Components as well as on VirtualHosts.
2021-12-20 00:16:22 +01:00
Kim Alvefur
4395895fef
core.modulemanager: Inherit mod_server_contact_info onto components #1270
2021-05-27 11:18:42 +02:00
Kim Alvefur
8f64eafaf7
core.modulemanager: Fix resource location compat with LuaRocks 2.x
...
The path doesn't include lua version, at least least on Debian, which
still has luarocks 2.x
2021-01-16 00:24:06 +01:00
Kim Alvefur
bb3948c857
core.modulemanager: Fix error if installer path missing
...
Happens if run outside prosody. Noticed because because the storage
tests fail.
2020-10-11 14:27:28 +02:00
Kim Alvefur
387a03e1d3
core.modulemanager: Add compat for LuaRocks 2.x
2020-10-07 22:54:12 +02:00
Kim Alvefur
915cebae96
core.modulemanager: Locate resources of LuaRocks-installed modules
...
Extra non-code files included with a `copy_directories` directive in a
LuaRocks manifest will be copied into a per-module and per-version
directory under /lib/luarocks/ and all this is there to dig that out so
it can be used in e.g. moduleapi :load_resource().
2020-10-07 15:51:37 +02:00
Kim Alvefur
3f89e9373b
core.modulemanager: Silence warning about unused err variable [luacheck]
2019-12-20 22:38:45 +01:00
Kim Alvefur
72f1544f6d
Merge 0.11->trunk
2019-11-23 23:12:01 +01:00
Kim Alvefur
7ac5e467ba
core.modulemanager: Disable mod_vcard if mod_vcard_legacy is enabled to prevent conflict ( #1469 )
2019-11-23 23:11:03 +01:00
Kim Alvefur
2ad505a81f
core.modulemanager: Split lists across multiple lines for improved readability
...
Patches will also be easier to read.
2019-09-29 17:07:39 +02:00
Kim Alvefur
ef38f2d062
mod_s2s_bidi: Enables bi-directional streams via XEP-0288
2019-09-08 19:45:39 +02:00
Matthew Wild
d833e2c6d4
modulemanager: Fix issues introduced in previous commit acf74ad0b795 [thanks luacheck, scansion]
2018-10-26 19:53:02 +01:00
Matthew Wild
f5f6460b2e
Many things: switch from hacky multi-arg xpcall implementations to a standard util.xpcall
2018-10-26 19:32:00 +01:00
Matthew Wild
06a10d3a77
modulemanager: Expose function to get the list of modules that should be loaded on a host
2018-06-20 10:41:02 +01:00
Kim Alvefur
77fbea8cdc
core: Use prosody.hosts instead of _G.hosts for consistency
2018-03-29 16:58:06 +02:00
Kim Alvefur
43b814a83b
vairious: Add annotation when an empty environment is set [luacheck]
2018-02-28 20:06:26 +01:00
Kim Alvefur
1ecc3a7918
core: Split some very long lines [luacheck]
2017-03-04 17:49:48 +01:00
Kim Alvefur
487f77d6ef
modulemanager: Silence log message about attempts to load already loaded modules for shared modules
2016-03-19 16:35:43 +01:00
Kim Alvefur
e349fb9c87
loggingmanager,modulemanager,moduleapi: Ignore warning about accessing _G.unpack [luacheck]
2016-02-18 14:57:51 +01:00
Kim Alvefur
bad300a675
loggingmanager,modulemanager,moduleapi: Localize unpack compatible with Lua 5.2+
2016-02-18 14:57:04 +01:00
Kim Alvefur
27265c20e2
core.*: Remove use of module() function
2015-02-21 10:42:19 +01:00
Matthew Wild
428f9dc002
modulemanager: Add luacheck annotations
2015-05-06 19:16:16 +01:00
Matthew Wild
2553822831
modulemanager: Remove unused import of pcall #luacheck
2015-05-06 19:15:35 +01:00
Kim Alvefur
b58d3248b7
core.module{manager,api}: Fix for 010b141e91ed (Thanks v1ct0r)
2014-09-23 00:23:33 +02:00
Kim Alvefur
93a297bc8f
core.modulemanager, core.moduleapi: Hack around dependency loop
2014-09-17 14:48:49 +02:00
Matthew Wild
878efeecd5
Merge 0.9->0.10
2014-08-28 09:23:24 +01:00
Kim Alvefur
3dc45c1222
modulemanager: Reduce warning to debug level message about modules already being loaded, it's probably just module:depends()
2014-08-27 10:46:22 +02:00
Kim Alvefur
bd17040999
mod_s2s_auth_certs: Split PKIX based certificate checking from mod_s2s into new plugin
2014-07-25 20:41:54 +02:00
Kim Alvefur
8c0d996be4
Merge 0.9->0.10
2014-03-25 19:16:38 +01:00
Kim Alvefur
461da4b3b6
modulemanager: Load mod_saslauth on components by default
2014-03-22 12:42:01 +01:00
Kim Alvefur
f73e31b9c2
modulemanager: Always load a platform-specific module, add stub modules for Windows and unknown platforms
2014-01-26 21:16:24 +01:00
Florian Zeitz
1d833bb807
Remove all trailing whitespace
2013-08-09 17:48:21 +02:00
Marco Cirillo
4453095de2
modulemanager: add missing ipairs import.
2013-04-01 23:41:57 +00:00
Marco Cirillo
a299b9096d
modulemanager: add function to retrieve module items from a specific host entity.
2013-04-01 22:34:44 +00:00
Kim Alvefur
1acfdf5914
core.*: Complete removal of all traces of the "core" section and section-related code.
2013-03-23 02:33:15 +01:00
Matthew Wild
565ea2bbe1
modulemanager: Set module.reloading when a module is reloading, and when loading make the saved state available in module.saved_state (if any)
2012-11-22 20:59:20 +00:00
Waqas Hussain
48a297e80c
hostmanager, modulemanager: Ensure hosts[*].modules always exists.
2012-09-13 00:32:12 +05:00
Matthew Wild
cf15c2a1e0
modulemanager: Set module status on successful or failed module load
2019-03-19 09:05:15 +00:00
Florian Zeitz
d49b9bc2ab
Eliminate direct setfenv usage
2012-06-08 05:04:38 +02:00