File tree Expand file tree Collapse file tree 7 files changed +18
-22
lines changed Expand file tree Collapse file tree 7 files changed +18
-22
lines changed Original file line number Diff line number Diff line change 2020 }
2121 },
2222 "args" : [
23- " --socket=5007 "
23+
2424 ],
2525 "cwd" : " ${workspaceFolder}"
2626 },
Original file line number Diff line number Diff line change 22
33cargo build --release
44
5- if [ ! -d " dist" ]; then
6- mkdir dist
5+ if [ -d " dist" ]; then
6+ rm -rf dist
77fi
88
9- cp target/release/lua-language-server.exe dist/
9+ mkdir dist
10+
11+ cp target/release/lua-language-server dist/
1012
1113cp -r resources dist/
Original file line number Diff line number Diff line change 11cargo build -- release
22
3- if (-Not (Test-Path - Path " dist" )) {
4- New-Item - ItemType Directory - Path " dist"
3+ $distPath = " dist"
4+
5+ if (Test-Path - Path $distPath ) {
6+ Remove-Item - Path $distPath - Recurse - Force
57}
68
7- Copy-Item - Path " target/release/lua-language-server.exe" - Destination " dist/"
9+ New-Item - ItemType Directory - Path $distPath
10+
11+ Copy-Item - Path " target/release/lua-language-server.exe" - Destination $distPath
812
9- Copy-Item - Path " resources" - Destination " dist/ " - Recurse
13+ Copy-Item - Path " resources" - Destination $distPath - Recurse
Original file line number Diff line number Diff line change @@ -7,17 +7,8 @@ local thread = require 'bee.thread'
77local taskpad = thread.channel('taskpad')
88 print("hello world2")
99local counter = 0
10- while true do
11- print("hello world")
12- taskpad:push(counter)
13- counter = counter + 1
14- thread.sleep(100)
15- end
10+ taskpad:push("hello world", "hello world2", counter)
1611]] )
17- -- thread.sleep(100)
18- print (" hello world" )
19- -- coroutine.yield()
20- print (" thread 1" , d , " hello world" )
2112while true do
2213 print (d :bpop ())
2314end
Original file line number Diff line number Diff line change @@ -113,8 +113,7 @@ impl UserData for LuaChannel {
113113 let data = receiver. lock ( ) . unwrap ( ) . recv ( ) . await ;
114114 if let Some ( data) = data {
115115 let lua_seri_unpack = lua. globals ( ) . get :: < LuaFunction > ( "lua_seri_unpack" ) ?;
116- let mut returns = lua_seri_unpack. call :: < mlua:: MultiValue > ( data) . unwrap ( ) ;
117- returns. insert ( 0 , mlua:: Value :: Boolean ( true ) ) ;
116+ let returns = lua_seri_unpack. call :: < mlua:: MultiValue > ( data) . unwrap ( ) ;
118117 return Ok ( returns) ;
119118 }
120119 }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ unsafe extern "C-unwind" fn lua_seri_pack(lua_state: *mut lua_State) -> i32 {
1414 return 0 ;
1515 }
1616
17- let buffer_id = seri_pack ( lua_state, 1 , std:: ptr:: null_mut ( ) ) ;
17+ let buffer_id = seri_pack ( lua_state, 0 , std:: ptr:: null_mut ( ) ) ;
1818 ffi:: lua_pushinteger ( lua_state, buffer_id as i64 ) ;
1919 1
2020}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ async fn main() -> LuaResult<()> {
2323 }
2424
2525 build_args ( & lua) ;
26- let main = lua. load ( path:: Path :: new ( "resources/testmain .lua" ) ) ;
26+ let main = lua. load ( path:: Path :: new ( "resources/main .lua" ) ) ;
2727 main. call_async ( ( ) ) . await ?;
2828 Ok ( ( ) )
2929}
You can’t perform that action at this time.
0 commit comments