darktable-org / darktable-org/lua-scripts
"disable scripts" in script manager needs update for 5.6
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Lua
- Star
- 219
- Fork
- 142
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu trong tools/script_manager.lua, tại callback của nút disable_scripts, sau đó kiểm tra tùy chọn tắt các script Lua và đường dẫn tải luarc đi kèm trong darktable 5.6. Tái hiện hành vi khi các script đi kèm được bật và xác định xem nên xóa nút hay để nút chuyển đổi tùy chọn. Hoàn thành khi việc tắt script thông qua mô-đun scripts thực sự ngăn các script đi kèm được tải, đồng thời đường dẫn để bật lại vẫn rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- lua
- Lĩnh vực
- tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 52/100