!HCjHPBLFfoFpYNgwdE:matrix.org

Neovim dev

209 Members
Discussion about Neovim development and adjacent topics14 Servers

Load older messages


SenderMessageTime
9 Nov 2024
@realchairforce:matrix.orgrealchairforceMaybe TEST_FILE?08:51:40
@clason:matrix.orgclasonYes, that08:51:50
@clason:matrix.orgclasonAnd TEST_FILTER08:52:27
@realchairforce:matrix.orgrealchairforceNice alright, thank you!08:52:42
@realchairforce:matrix.orgrealchairforce

One more question actually if you don't mind. In Neovim / busted tests I'm used to calling Vim API calls directly. But I've noticed there's a lot of indirection in the unittests of other existing _spec.lua files. Why is that?

I'm guessing it has something to do with these sorts of errors when I run the tests. e.g. ERROR test/functional/lua/foobar.lua @ 1285: blah attempt to call field 'cmd' (a nil value). As in vim.cmd wasn't directly accessible

08:54:37
@clason:matrix.orgclasonWell, depends on whether you want to use the api or test the api08:56:34
@clason:matrix.orgclasonNeovim itself is the test runner for Neovim (different instance)08:56:57
@realchairforce:matrix.orgrealchairforceIn this case it'd be test/functionaltest. If that answers your context08:57:29
@clason:matrix.orgclasonNo, depends on the actual use, not the file08:57:47
@clason:matrix.orgclasonThe runner is minimal and doesn’t have the full (Lua) API08:58:20
@realchairforce:matrix.orgrealchairforceIs the reason why I see exec_lua often in unittests related to this? Something like "escape out to a context that has access to more of the Lua API (because otherwise you'd not have access to the full Lua API)?"08:59:42
@clason:matrix.orgclasonYea08:59:48
@clason:matrix.orgclasonWell, no08:59:55
@clason:matrix.orgclasonExec_lua tells the runner to send that code to the instance being tested09:00:30
@clason:matrix.orgclasonOtherwise you would be running the code in the test runner, so you couldn’t catch errors if it failed 09:01:08
@realchairforce:matrix.orgrealchairforceHm okay, definitely a bit if a mental shift but I'll see what I can accomplish from here. Thank you again09:02:14
@nachonievag:matrix.orgNacho changed their display name from Nacho Nieva to Nacho.23:06:18
11 Nov 2024
@gpanders:matrix.orggpanders
In reply to @realchairforce:matrix.org
Is the reason why I see exec_lua often in unittests related to this? Something like "escape out to a context that has access to more of the Lua API (because otherwise you'd not have access to the full Lua API)?"
It's less "escape out to a context that has access to more of the Lua API" and more "send this code to the Neovim instance under test and run it there". As clason said, when the tests run there are two instances of Neovim running: the instanced running the test and the instance being tested. The former is a barebones Neovim and doesn't include a lot of things, so exec_lua sends a chunk of Lua code to the Neovim instance being tested and runs it there
14:14:57
@gpanders:matrix.orggpanders
In reply to @realchairforce:matrix.org
Is the reason why I see exec_lua often in unittests related to this? Something like "escape out to a context that has access to more of the Lua API (because otherwise you'd not have access to the full Lua API)?"
* It's less "escape out to a context that has access to more of the Lua API" and more "send this code to the Neovim instance under test and run it there". As clason said, when the tests run there are two instances of Neovim running: the instance running the test and the instance being tested. The former is a barebones Neovim and doesn't include a lot of things, so exec_lua sends a chunk of Lua code to the Neovim instance being tested and runs it there
14:15:15
13 Nov 2024
@glepnir:matrix.orgglepnirimage.png
Download image.png
09:08:09
@glepnir:matrix.orgglepnirimage.png
Download image.png
09:08:29
@glepnir:matrix.orgglepnirsomething wrong in ts-vimdoc?09:09:11
@clason:matrix.orgclasonno, something wrong with the commit09:10:12
@clason:matrix.orgclasonthat should be a backtick, not a quote, after the star.09:10:52
@clason:matrix.orgclasonsomeone should add it to the typo PR09:11:27
@glepnir:matrix.orgglepniroh there generate from commit ?09:11:54
@clason:matrix.orgclasonno09:11:59
@clason:matrix.orgclasonsomeone wrote this by hand09:12:04
@clason:matrix.orgclasonhttps://github.com/neovim/neovim/commit/9b357e30fdd0a575480182872331fdb87e9cc331#diff-97a1025f7f83338441026931e13c7d290b607b9dce5c28ebb510ec471fedc085R5409:12:25
@clason:matrix.orgclasonfixed09:14:10

There are no newer messages yet.


Back to Room ListRoom Version: 10