Bug 445839

Summary: Changes in contents of main script file are not seen by KWin until KWin reload
Product: [Plasma] kwin Reporter: Mikhail Zolotukhin <mail>
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: mglb, natalie_clarius
Priority: NOR    
Version: 5.23.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mikhail Zolotukhin 2021-11-20 19:36:47 UTC
SUMMARY

I'm developing a script and when I change something in the code - I build and install it. When the installation is finished, the new version of the files becomes available in the installation location. However, when I turn the script off and on - KWin still uses the old version of the script. If I restart KWin the new version is used, but that's inconvenient and is not possible on Wayland session.

STEPS TO REPRODUCE
1. Install some script and run it.
2. Change the script source, so that it outputs some new line to the console
3. Turn the script off and on.

OBSERVED RESULT
No new line is printed

EXPECTED RESULT
New line is printed in the console
Comment 1 Mariusz Glebocki 2023-08-20 20:46:33 UTC
This makes QML-based script development on wayland impossible (AFAIK), at least as long as "main" KWin is used for testing.

I guess https://doc.qt.io/qt-6/qqmlengine.html#trimComponentCache in right place would fix the problem.