Skip to content

If we are building with Lua support and it's not possible, the build should fail, not disable Lua#20695

Merged
TurboGit merged 1 commit intodarktable-org:masterfrom
victoryforce:no-silent-lua-disabling
Apr 1, 2026
Merged

If we are building with Lua support and it's not possible, the build should fail, not disable Lua#20695
TurboGit merged 1 commit intodarktable-org:masterfrom
victoryforce:no-silent-lua-disabling

Conversation

@victoryforce
Copy link
Copy Markdown
Collaborator

Instead of disabling the Lua support because a required library and permission to use the in-tree copy are missing, the build should fail. This behavior helps maintainers of distro packages. For them, automatically disabling functionality if the build environment doesn't meet the build requirements is the worst option, as they have to carefully study the build logs to avoid losing functionality. Failing the build in this case is much better.

Fixes #20680.

Replaces PR #20691 as it is very important to be able to build without Lua for debugging purposes.

Instead of disabling the feature because a required library and permission
to use the in-tree copy are missing, the build should fail.
@wpferguson
Copy link
Copy Markdown
Member

as it is very important to be able to build without Lua for debugging purposes

Why do we need to debug without Lua? The windows hang is a case in point. Lua exposes the race condition at startup when changing views.

For 5.6 the scripts are going to be built in to the release. The scripts provide bug fixes for darktable issues. So, to me, it seems that Lua should be required, not optional.

If Lua is optional, then packagers can decide to just --disable-lua if they don't want to "deal" with the different Lua versions.

@victoryforce
Copy link
Copy Markdown
Collaborator Author

as it is very important to be able to build without Lua for debugging purposes

Why do we need to debug without Lua?

For the same reason we debug or ask users to test whether the problem is reproducible with OpenCL disabled - different/additional execution paths.

The scripts provide bug fixes for darktable issues. So, to me, it seems that Lua should be required, not optional.

I also believe that Lua should be integrated in official builds (whether ours or those in distributions). The problem is not that packagers refuse to make official packages with Lua support. I have not seen any such case. The problem is only that with our current build configuration logic, a regression is possible that will go unnoticed (due to auto-disabling Lua support instead of a failed build).

If Lua is optional, then packagers can decide to just --disable-lua if they don't want to "deal" with the different Lua versions.

I'll tell you one secret. I've been a package maintainer (several hundred packages, so it's no walk in the park) on two distributions for far more years than I've been a darktable contributor (started in the last millennium :) ). And trust me, I guarantee you that if a maintainer decides they know better how to build a package on their distribution, they'll patch it.

If a packager decides something, it'll be done regardless of whether it's just --disable-lua or whether it needs to be patched (there are plenty of such patches in the distro's package repos).

@wpferguson
Copy link
Copy Markdown
Member

Now I know more about packaging 😄

@victoryforce
Copy link
Copy Markdown
Collaborator Author

Oh, there are many dark secrets there. 😄 For example, maintainers often (too often) make patches to fix real problems/bugs in upstream apps but are too lazy to push them upstream.

Copy link
Copy Markdown
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TurboGit TurboGit added this to the 5.6 milestone Apr 1, 2026
@TurboGit TurboGit added the lua label Apr 1, 2026
@TurboGit TurboGit merged commit 3715c97 into darktable-org:master Apr 1, 2026
5 checks passed
@victoryforce victoryforce deleted the no-silent-lua-disabling branch April 1, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LUA scripts missing after upgrade to 2:5.4.1-2.2 (CachyOS)

3 participants