2022-06-27 10:38:12 -07:00
|
|
|
# Strictest
|
|
|
|
|
|
|
|
## Runtime Strictness for Minetest Mods
|
|
|
|
|
|
|
|
*Strictest* consists of two components:
|
|
|
|
|
|
|
|
* Lua strictness: Will disallow string indexing and string - number coercion.
|
|
|
|
* Minetest strictness: Disallows usage of deprecated APIs & using entity-only or player-only methods on the wrong type of object.
|
|
|
|
|
|
|
|
Particularly useful when writing new mods that don't target older Minetest versions.
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
`strictest.action` can be set to either `error` or `log`:
|
|
|
|
|
|
|
|
* `error`: Immediately throw an error on strictness violations.
|
|
|
|
* `log`: Merely log the error (including a stacktrace).
|
|
|
|
|
|
|
|
Potentially partially redundant with the `deprecated_lua_api_handling` setting.
|
|
|
|
|
2022-06-29 07:52:29 -07:00
|
|
|
## Usage
|
|
|
|
|
2022-06-30 13:21:58 -07:00
|
|
|
Install & enable `strictest`, then **make sure to optionally depend on it** in `mod.conf`.
|
2022-06-29 07:52:29 -07:00
|
|
|
|
2022-07-04 07:45:34 -07:00
|
|
|
Note that runtime strictness always comes at a cost. Running `strictest` on production servers under heavy load is thus not advisable.
|
2022-06-27 10:38:12 -07:00
|
|
|
|
2022-07-04 07:45:34 -07:00
|
|
|
---
|
|
|
|
|
|
|
|
Links: [GitHub](https://github.com/appgurueu/strictest), [ContentDB](https://content.minetest.net/packages/LMD/strictest/), [Minetest Forums](https://forum.minetest.net/viewtopic.php?t=28327)
|
|
|
|
|
|
|
|
License: Written by Lars Müller and licensed under the MIT license.
|