-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Detect script changes deeper in the extensions folder #3491
Comments
Hmm, indeed currently the extension folders are not watched recursively. Only the extensions folder itself, direct sub-folders and all directly loaded modules (so not modules loaded from modules) are watched for changes. Maybe there is a way for Tiled to know which other files a script module loads, so it can watch it for changes. Or maybe it should indeed just watch the extensions folder recursively (potentially filtering on script files). |
I'm having a similar issue here : files in |
While it would be good to watch icons and such, I'd rather miss icon changes than have scripts reload every time a script writes a temp or config file xP |
If watched recursively, what is the base case? |
I agree with @eishiya that it could get messy if not filtered. Personally, I have not felt much of a need for detecting icon changes even though I have changed the icon perhaps a dozen times by now. And, yet, purely from a technical point of view, I would have to agree that a RAD tool is not complete until all things that can be reasonably automated, have been automated... so it's a fair point to bring up. Regardless, I would file this as an optional stretch goal for whoever chooses to do the work, because the scripts are the primary focus of this RAD tool by at least 100:1. I would hate to see a feature delayed because of scope creep into nice-to-haves (that the Qt QML module may not be willing to provide easy hooks for). Note that images have had a good RAD tool since the first paint program appeared. (But, yes, I have changed the icons at least once because they did not look good in the menus. But executing a manual reload for this minor use case is not oppressive either... unless I'm missing the use case.) As for other supporting files... hmm, a bit tougher to get a read on that. I'm building a tool that uses dozens of PNG and TSX files, which are still evolving as well, and I have yet to feel changes in them should be picked up quicker, like how I feel about the code (or, maybe those ones are auto-reloading because of Tiled's TSX watchlist, and I just don't remember right now since my project has been on pause for several months [scheduled to resume in a week or so]). I was originally building with a fleet of TMX files too but dumped that idea quickly in favor of just coding all the automapping. In other words... Describe the use case for watching other supporting files so that we may understand it more. BTW, I didn't mention in my OP that my current workaround to this issue is that I keep an empty Regardless of our responses, thanks for piping in and for your vote of support for some sort of solution here. |
Is your feature request related to a problem? Please describe.
Changes to
.mjs
files inextensions\foo\modules
, for example, are not detected and do not reinstantiate the script engine.I have
main.mjs
inextensions\foo
. It and its import modules inextensions\foo\modules
load fine. However, only changes tomain.mjs
trigger a reload. Changes to any deeper module do not. If I movemain.mjs
down a level, changes to it never trigger (and everything actually unloads completely). If I move everything up a level toextensions\foo
they all trigger a reload on change. But that's a bit messy.Describe the solution you'd like
Please detect scripts and script changes at least one level deeper. Or, at least do this when a
.mjs
file is found at the upper level.The text was updated successfully, but these errors were encountered: