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

CMake refactors: Allow to choose between system/bundled LibRaw/Lua #243

Merged

Conversation

AlynxZhou
Copy link

Also tried to make the Lua code cleaner, it could build with both values on my system, but I personally never use Lua scripts, if there are users who find real problems with my changes, please @ me, I'll try to fix.

By default this is enabled so we could still control the version in CI
build, but this option will allow packagers to use their system-wide
LibRaw instead of the bundled one.
Which means we have `USE_BUNDLED_LUA=ON` instead of
`DONT_USE_INTERNAL_LUA=ON` by default, this should not be a huge change
because we don't build with Lua in CI.
Copy link

sonarqubecloud bot commented Dec 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.8% 1.8% Duplication

@aurelienpierre aurelienpierre merged commit d825e81 into aurelienpierreeng:master Dec 3, 2023
archlinux-github pushed a commit to archlinux/aur that referenced this pull request Dec 4, 2023
@vredesbyyrd
Copy link

Would anyone mind telling me if lua scripts are currently unsupported and the following is expected? I'm using the ansel-git package from the aur, and when running ansel -d lua the following error is returned:

0.751038 LUA ERROR : dt_lua_event_add: wrong number of args for post-import-film, expected 3, got 4
0.789819 LUA ERROR : /home/clu/.config/ansel/lua/tools/script_manager.lua:57: module 'darktable.debug' not found:
	no field package.preload['darktable.debug']
	no file '/home/clu/.lua/darktable/debug.lua'
	no file '/usr/share/lua/5.4/darktable/debug.lua'
	no file '/usr/share/lua/5.4/darktable/debug/init.lua'
	no file '/usr/lib/lua/5.4/darktable/debug.lua'
	no file '/usr/lib/lua/5.4/darktable/debug/init.lua'
	no file './darktable/debug.lua'
	no file './darktable/debug/init.lua'
	no file '/usr/share/ansel/lua/darktable/debug.lua'
	no file '/home/clu/.config/ansel/lua/darktable/debug.lua'
	no file '/usr/lib/lua/5.4/darktable/debug.so'
	no file '/usr/lib/lua/5.4/loadall.so'
	no file './darktable/debug.so'
	no file '/usr/lib/lua/5.4/darktable.so'
	no file '/usr/lib/lua/5.4/loadall.so'
	no file './darktable.so'

It appears script_manager.lua is looking for darktable binaries? Which leads me to believe lua scripts are not supported yet, but I am not a programmer and clarification would be helpful.

@AlynxZhou
Copy link
Author

@vredesbyyrd Are you using latest commit? Try re-run the command that you build the AUR package and it will fetch and build the latest commit.

@vredesbyyrd
Copy link

@AlynxZhou

I rebuilt just to be sure, but same error persists. I did realize importing some lua scripts directly from luarc works, eg:

require "official/image_path_in_ui"

Some others still fail. OpenInExplorer.lua errors with:

0.765140 LUA ERROR : /home/clu/.config/ansel/lua/contrib/OpenInExplorer.lua:203: field "image" not found for type dt_lua_singleton_lib

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.

3 participants