lite-xl-plugin-manager icon indicating copy to clipboard operation
lite-xl-plugin-manager copied to clipboard

MacOS : lpm doesn't seem to work

Open rom100main opened this issue 10 months ago • 6 comments

A lot of commands seem to not work on MacOS, here some I tested

lpm install plugin_manager --assume-yes --verbose
lpm.lua:1621: attempt to index a nil value (field 'integer index')
stack traceback:
	lpm.lua:1621: in method 'all_addons'
	lpm.lua:1697: in method 'get_addon'
	lpm.lua:1927: in field 'retrieve_addons'
	lpm.lua:2007: in field 'install'
	lpm.lua:2317: in field 'command'
	lpm.lua:2340: in field 'run'
	lpm.lua:2859: in function <lpm.lua:2858>
	[C]: in field 'flock'
	lpm.lua:555: in upvalue 'engage_locks'
	lpm.lua:2858: in function <lpm.lua:2374>
	[C]: in function 'xpcall'
	lpm.lua:2374: in main chunk
lpm self-upgrade --verbose
lpm.lua:2210: cannot get undefined global variable: EXEFILE
stack traceback:
	[C]: in function 'error'
	lpm.lua:3: in metamethod 'index'
	lpm.lua:2210: in field 'self_upgrade'
	lpm.lua:2847: in function <lpm.lua:2374>
	[C]: in function 'xpcall'
	lpm.lua:2374: in main chunk
lpm upgrade --verbose
lpm.lua:1621: attempt to index a nil value (field 'integer index')
stack traceback:
	lpm.lua:1621: in method 'all_addons'
	lpm.lua:1650: in method 'installed_addons'
	lpm.lua:2200: in function <lpm.lua:2199>
	(...tail calls...)
	lpm.lua:2340: in field 'run'
	lpm.lua:2859: in function <lpm.lua:2858>
	[C]: in field 'flock'
	lpm.lua:555: in upvalue 'engage_locks'
	lpm.lua:2858: in function <lpm.lua:2374>
	[C]: in function 'xpcall'
	lpm.lua:2374: in main chunk

I installed LiteXL with the official downloader

I installed lpm with this command in my Download folder wget https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.aarch64-darwin -O lpm && chmod +x lpm

lpm --version gives me -aarch64-darwin, I don't know if it is the right behaviour. My version is this one.

Since the command to get the plugin manager doesn't work I installed it manually but putting in ~/config/lite-xl/plugin_manager init.lua, lpm.aarch64-darwin and plugin_view.lua. Inside Lite XL installing a plugin work, upgrading seems to also work. But adding a repo doesn't Capture d’écran 2025-01-16 à 10 55 59

rom100main avatar Jan 16 '25 09:01 rom100main

Hrm. Odd. I'll review this. I'm going to be releasing a new verison of lpm which may solve of these problems soon anyway. The issue I don't really have a mac to test on, and apple just nuked the tool that was letting non-mac developers test mac software, so there's no good way to test it on mac at the moment for me.

But when I release the new version, let's try that, and see if it helps.

adamharrison avatar Jan 16 '25 14:01 adamharrison

I'm back

I tested the new version (177167f) and it seems everything is now working except lpm self-upgrade which gives me now this error :

./lpm self-upgrade --verbose                       
lpm.lua:2232: cannot get undefined global variable: EXEFILE
stack traceback:
	[C]: in function 'error'
	lpm.lua:4: in metamethod 'index'
	lpm.lua:2232: in field 'self_upgrade'
	lpm.lua:2950: in function <lpm.lua:2467>
	[C]: in function 'xpcall'
	lpm.lua:2467: in main chunk

rom100main avatar Jan 25 '25 18:01 rom100main

Well, I'm glad it's at least mostly working.

And yeah, I think I see the issue with this one. I pulled the logic from lxl, but mac actually has different logic to determine final location.

I'll just copy that logic over for the next release. Might be able to get around to it today.

adamharrison avatar Jan 25 '25 18:01 adamharrison

OK. This should be handled as of b1a1e27. Can you verify on the continuous release?

adamharrison avatar Jan 26 '25 22:01 adamharrison

Sadly I get the same error on d7cead3 It seems the if/else doesn't work

rom100main avatar Jan 27 '25 23:01 rom100main

Huh. If you stick #error test in the __APPLE__ block, and then compile, does it crash your compile?

adamharrison avatar Jan 28 '25 01:01 adamharrison