Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add utils split_args function #1276

Merged
merged 4 commits into from
Aug 9, 2024

Conversation

Diaoul
Copy link
Contributor

@Diaoul Diaoul commented Jul 2, 2024

Fixes #629, #816 and #1267

@Diaoul Diaoul force-pushed the feat/add-utils-split-args branch from 69afab1 to 954bed0 Compare July 2, 2024 16:46
@Diaoul
Copy link
Contributor Author

Diaoul commented Jul 2, 2024

Not sure where to add unit tests 🤷

Nevermind, found it, it's just called "spec" in lua, how confusing..

@Diaoul
Copy link
Contributor Author

Diaoul commented Jul 2, 2024

Here are test results ran locally though:

{ [1] = runserver, [2] = --debug, [3] = true, [4] = --reason, [5] = I'm dumb } 
{ [1] = --comment, [2] = I'm "this" close }

@Diaoul
Copy link
Contributor Author

Diaoul commented Jul 2, 2024

Added some tests but I cannot run them locally, new to lua projects and I can't seem to have a working env.
I'll rely on the CI to iterate or if you can fix the CI issues that would be awesome (since CI needs your approval to run) 🙏

@Diaoul
Copy link
Contributor Author

Diaoul commented Jul 5, 2024

Do you have some good documentation about setting up a lua dev environment on Linux for Lua? I'm struggling with busted for some reason...

❯ luarocks --lua-version 5.3 test --local

nvim-dap scm-1 depends on lua >= 5.1, < 5.4 (5.3-1 provided by VM: success)

nvim-dap scm-1 depends on nlua (0.2.0-1 installed: success)
E5113: Error while calling lua chunk: /home/antoine/.luarocks/share/lua/5.3/pl/path.lua:26: pl.path requires LuaFileSystem
stack traceback:
	[C]: in function 'error'
	/home/antoine/.luarocks/share/lua/5.3/pl/path.lua:26: in main chunk
	[C]: in function 'require'
	/home/antoine/.luarocks/share/lua/5.3/busted/runner.lua:3: in main chunk
	[C]: in function 'require'
	...uarocks/lib/luarocks/rocks-5.3/busted/2.2.0-1/bin/busted:3: in function 'fn'
	/home/antoine/.luarocks/bin/nlua:79: in main chunk

Error: test suite failed

Yet

❯ luarocks install luafilesystem --lua-version=5.3 --local
Installing https://luarocks.org/luafilesystem-1.8.0-1.src.rock
luafilesystem 1.8.0-1 is already installed in /home/antoine/.luarocks
Use --force to reinstall.

@Diaoul
Copy link
Contributor Author

Diaoul commented Jul 13, 2024

Happy to have some help here to push this to the finish line when you have some time @mfussenegger 🙏

@mfussenegger mfussenegger merged commit 7bf34e0 into mfussenegger:master Aug 9, 2024
4 checks passed
@mfussenegger
Copy link
Owner

Thanks. I've made a couple of changes to add docs, simplify it a bit, and got rid of the failing scenario (nested escaped quotes inside quotes)

@Diaoul
Copy link
Contributor Author

Diaoul commented Aug 11, 2024

Very cool! Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a function to get arguements for the program as user input
2 participants