darktable-org / darktable-org/lua-scripts

"disable scripts" in script manager needs update for 5.6

オープン
#701 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Lua
スター
219
フォーク
142
PR マージ指標
30日以内にマージされた PR はありません

説明

Description
The disable scripts button in the scripts module renames <config_dir>/luarc to luarc.disabled (the disable_scripts button callback in tools/script_manager.lua). This worked before the scripts were bundled, when darktable used <config_dir>/luarc as the Lua entry point.

Since 5.6, darktable loads the bundled luarc, which calls require "tools/script_manager" regardless of config_dir/luarc existing or not. Renaming config_dir/luarc no longer disables the scripts. It only prevents the user's own config_dir/luarc from being re-run. The bundled scripts still load and start.

Steps to reproduce

use darktable 5.6 with bundled scripts.
scripts module / action: install/update scripts / enable "disable scripts" button / click disable scripts.
observe luarc being renamed in the config dir

Restart darktable.

Expected: the Lua scripts are disabled.
Observed: bundled scripts still load and run.

Possible fixes
The current way to disable the scripts is the disable Lua scripts preference.
a) have the button toggle the disable_scripts preference (with the checkbox as the re-enable path)
b) remove the button in favour of the preference

I'd favour the latter - then enabling/disabling lua scripts is reduced to the preferences.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

tools/script_manager.lua の disable_scripts ボタンのコールバックから始め、次に Lua スクリプトを無効化する設定と、darktable 5.6 における同梱 luarc の読み込み経路を調べます。同梱スクリプトを有効にした状態で挙動を再現し、ボタンを削除すべきか、設定を切り替えるものにすべきかを判断します。スクリプトモジュールからスクリプトを無効化すると同梱スクリプトの読み込みが実際に防止され、再有効化する経路も明確なままであることが完了条件です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。