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

5.1 branch does not load correctly anymore #12

Closed
vadi2 opened this issue Feb 27, 2018 · 1 comment
Closed

5.1 branch does not load correctly anymore #12

vadi2 opened this issue Feb 27, 2018 · 1 comment

Comments

@vadi2
Copy link

vadi2 commented Feb 27, 2018

I'm getting the following:

$ git clone https://github.com/martin-eden/lua_code_formatter.git
Cloning into 'lua_code_formatter'...
remote: Counting objects: 1393, done.
remote: Compressing objects: 100% (116/116), done.
remote: Total 1393 (delta 15), reused 92 (delta 11), pack-reused 1258
Receiving objects: 100% (1393/1393), 253.32 KiB | 778.00 KiB/s, done.
Resolving deltas: 100% (476/476), done.
vadi@volga:~/Programs$ cd lua_code_formatter/
vadi@volga:~/Programs/lua_code_formatter$ git checkout 5.1
Branch 5.1 set up to track remote branch 5.1 from origin.
Switched to a new branch '5.1'
vadi@volga:~/Programs/lua_code_formatter$ sudo luarocks make lcf-scm-1.rockspec
[sudo] password for vadi: 
lcf scm-1 is now installed in /usr/local (license: GPL v3)

Missing dependencies for formatter 0.1.1-1:
   penlight ~> 0.9 (1.5.4-1 installed)
vadi@volga:~/Programs/lua_code_formatter$ lua
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> do
>>   local lua_code_str = 'do return end' -- < fill it
>> 
>>   require('lcf.workshop.base')
>>   local get_ast = request('!.lua.code.get_ast')
>>   local get_formatted_code = request('!.formats.lua.save')
>> 
>>   return get_formatted_code(get_ast(lua_code_str))
>> end
/usr/local/share/lua/5.1/lcf/workshop/base.lua:124: module 'lcf.workshop.formats.lua.save' not found:
	no field package.preload['lcf.workshop.formats.lua.save']
	no file './lcf/workshop/formats/lua/save.lua'
	no file '/usr/local/share/lua/5.1/lcf/workshop/formats/lua/save.lua'
	no file '/usr/local/share/lua/5.1/lcf/workshop/formats/lua/save/init.lua'
	no file '/usr/local/lib/lua/5.1/lcf/workshop/formats/lua/save.lua'
	no file '/usr/local/lib/lua/5.1/lcf/workshop/formats/lua/save/init.lua'
	no file '/usr/share/lua/5.1/lcf/workshop/formats/lua/save.lua'
	no file '/usr/share/lua/5.1/lcf/workshop/formats/lua/save/init.lua'
	no file './lcf/workshop/formats/lua/save.so'
	no file '/usr/local/lib/lua/5.1/lcf/workshop/formats/lua/save.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.1/lcf/workshop/formats/lua/save.so'
	no file '/usr/lib/lua/5.1/lcf/workshop/formats/lua/save.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file './lcf.so'
	no file '/usr/local/lib/lua/5.1/lcf.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.1/lcf.so'
	no file '/usr/lib/lua/5.1/lcf.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
	[C]: in function 'require'
	/usr/local/share/lua/5.1/lcf/workshop/base.lua:124: in function 'request'
	stdin:6: in main chunk
	[C]: ?
> 
@martin-eden
Copy link
Owner

My bad.

At recent update directory structure was changed. But example in readme was not rechecked. Instead of

local get_formatted_code = request('!.formats.lua.save')

should be

local get_formatted_code = request('!.lua.code.ast_as_code')

I'll make corrections to example. Big thanks for ticket that helped to discover it!

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

No branches or pull requests

2 participants