Time Nick Message 17:59 sfan5 any more thoughts on #16158? 17:59 ShadowBot https://github.com/luanti-org/luanti/issues/16158 -- [no sq] Do not allow vector components to be nil or NaN + unit tests by sfan5 18:37 Krock for the affected API parts, you could use a separate, more relaxed function to retrieve x, (y) values 18:37 Krock but finding all API functions that would be affected could be rather tricky 18:42 sfan5 everything is theoretically affected 18:47 Krock how so? there's only few functions that accept this special vector format 18:51 sfan5 I mean how grorp pointed out that even our official docs have {y=123} as an example for a v3s16 18:56 Krock I'd correct that example, do minor adjustments to the PR to cover known cases and push to master for testing 18:56 Krock coordinates should always be specified, as documented in the vector section 18:57 Krock to be precise: https://github.com/luanti-org/luanti/blob/fa0c09d202537acbd267a38958f16c883359baca/doc/lua_api.md?plain=1#L3956-L3957 19:02 sfan5 we can do that but I fear that in the end we will be moving to less strict checks anyway because it broke something 19:09 Krock ¯\_(ツ)_/¯ 19:13 sfan5 rubenwardy: can you grep contentdb for {\s*[xy]\s*=[^,}]+\s*,\s*[yz]\s*=[^,}]+} 19:13 rubenwardy Regex in zipgrep is currently broken 19:13 cheapie Can vectors with missing components perhaps be considered deprecated, as in trigger a warning by default, or an error if the relevant setting is set to do so? 19:14 sfan5 and also for {\s*[xyz]\s*=[^,}]+} 19:14 sfan5 rubenwardy: then I'd like a copy of all current mods 19:14 Krock sfan5: get yourself an additional 1 TB drive 19:15 Krock actually I have no idea how large they are. rubenwardy: what's the compressed data volume like? 19:15 sfan5 cheapie: it can be but I am tired of having to put every stupid behavior behind a deprecation-gate 19:15 rubenwardy I can probably run the command manually. Or work out what the problem is 19:15 MTDiscord i agree that the situation sucks 19:15 MTDiscord and it extends beyond vectors even 19:16 sfan5 damn the irc log is broken, gotta fix that later 19:16 MTDiscord i think ultimately it'll have to be some kind of "deprecation gate" 19:17 sfan5 uhh nevermind 19:17 cheapie sfan5: Fair, although at the same time as a user it's a bit annoying when something that works fine in one version suddenly breaks in the next with no warning 19:17 MTDiscord but maybe we can figure out a better way to do that. for example, API levels games can opt in to. 19:17 sfan5 that doesn't really work for different mods 19:17 sfan5 javascript has a per-function "use strict" for example, but that's not something we can do 19:18 Krock we could do core.myfunction2 and myfunction3 and so on 19:18 MTDiscord i mean we could do it, it'd just probably not be worth the effort 19:18 sfan5 core.real_get_node2 19:18 Krock _final_copy_of 19:19 cheapie luatic: TBH that's something I've wished for before but didn't mention since it sounded... not great from an implementation point of view 19:19 sfan5 cheapie: realistically the relevant games (usually MCL) would fix their code in time 19:20 sfan5 however users might upgrade Luanti without upgrading their games and I can understand if they'd be upset at games suddenly breaking 19:20 cheapie I really need to dig through DB and fix some of the more egregious stuff sometime 19:21 MTDiscord i mean db doesnt really have much of its own code, its just git submodules 19:22 cheapie That's what I mean, the things pointed to as those submodules are... not great, in quite a few places 19:22 cheapie Changing deprecation handling to "error" or enabling random load order usually just immediately breaks it 19:23 cheapie Combine that with the sheer amount of useless log spew some of those mods give when loading and it's amazing just how much mostly-yellow text scrolls past 19:23 rubenwardy egrep: bad regex '{\\s*[xy]\\s*=[^,}]+\\s*,\\s*[yz]\\s*=[^,}]+}': Repetition not preceded by valid expression 19:23 rubenwardy double escaping? Or maybe that's just from printing 19:24 sfan5 probably needs the -P flag 19:27 rubenwardy egrep: unrecognized option: P 19:27 rubenwardy BusyBox v1.36.0 19:27 sfan5 why is your grep from busybox 19:27 rubenwardy probably due to alpine 19:29 sfan5 well anyway 19:29 sfan5 I'll go with the "deprecate first" plan 19:43 sfan5 PR updated 19:50 sfan5 different topic 19:51 sfan5 rubenwardy: if I make the engine/c++ part work, will you implement a contentdb cli? 19:54 MTDiscord curious: what would a cli entail for the engine? 19:57 sfan5 I'm thinking the ability to do 'luantiserver --cdb install minetest_game' 19:58 MTDiscord so wheel reinventing https://github.com/ronoaldo/minetools in the engine pretty much 19:59 sfan5 first-party wheel reinventing, yes 20:42 rubenwardy I'm certainly interested in it as a feature. The main difficulty is a lot of the code is in Lua and some of it is bound to the UI, would want to introduce a nice new C++ folder for it 20:42 rubenwardy or set it up to be able to use Lua in a CLI 21:11 sfan5 the latter is what I mean by "make the engine/c++ part work" 21:11 sfan5 there's no point in refactoring working Lua code to C++ if we can instead re-use it