Suggestion: Lua Runtime Strictness #3119

Closed
opened 2022-11-23 11:57:07 +00:00 by sherkhan30452 · 4 comments

Runtime Strictness
https://content.minetest.net/packages/LMD/strictest/

Disallows questionable usage of the Lua API & Lua itself to help catch errors.

Description:
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.

Runtime Strictness https://content.minetest.net/packages/LMD/strictest/ Disallows questionable usage of the Lua API & Lua itself to help catch errors. Description: 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.
AliasAlreadyTaken added the
1. kind/enhancement
label 2022-11-23 12:02:50 +00:00
Member

Will disallow string indexing and string - number coercion.

when are these useful? lua is already rather strict, i can't recall a bug i blamed on such a feature.

Particularly useful when writing new mods that don't target older Minetest versions.

the server generally runs the latest stable version, why should we care?

> Will disallow string indexing and string - number coercion. when are these useful? lua is already rather strict, i can't recall a bug i blamed on such a feature. > Particularly useful when writing new mods that don't target older Minetest versions. the server generally runs the latest stable version, why should we care?

stuff that does shenanigans shouldn´t end up on the server so that mod wouldn´t be helpful there.
maybe useful in a dev environment but for me it would make more sense to add those things to luacheck or similar in your code editor to get a warning even before you start minetest.

stuff that does shenanigans shouldn´t end up on the server so that mod wouldn´t be helpful there. maybe useful in a dev environment but for me it would make more sense to add those things to luacheck or similar in your code editor to get a warning even before you start minetest.
flux added
1. kind/bug
1. kind/other
1. kind/breaking
and removed
1. kind/enhancement
labels 2022-11-24 15:42:17 +00:00
Member

(again, i need to not respond to things when i'm half asleep, i didn't properly understand this)

this is the sort of thing that ought to be run by developers in their local environment, not on a live server.

also, triggering errors for use of deprecated API is already a config option:

however, your-land depends on a lot of mods which haven't seen active development in a long time, and use deprecated API calls. cleaning all that up is something i've had in the back of my head for a while, but there's been more important things to care about.

(again, i need to not respond to things when i'm half asleep, i didn't properly understand this) this is the sort of thing that ought to be run by *developers* in their *local* environment, not on a live server. also, triggering errors for use of deprecated API is already a config option: * https://github.com/minetest/minetest/blob/1c10988d6a19b06ac9c64e83675a76dea29cad2e/builtin/settingtypes.txt#L1583-L1587 however, your-land depends on a *lot* of mods which haven't seen active development in a long time, and use deprecated API calls. cleaning all that up is something i've had in the back of my head for a while, but there's been more important things to care about.

This is basically a question how to deal with depreciation messages in abandoned upstream mods.

  1. Let's NOT add Lua Runtime Strictness to the live server
  2. Let's discuss how to deal with deprecated mods here: your-land/administration#180
This is basically a question how to deal with depreciation messages in abandoned upstream mods. 1. Let's NOT add Lua Runtime Strictness to the live server 2. Let's discuss how to deal with deprecated mods here: https://gitea.your-land.de/your-land/administration/issues/180
AliasAlreadyTaken added the
5. result/wontfix
label 2023-01-12 23:07:07 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#3119
No description provided.