Carl opened a TIP (
https://openacs.org/forums/message-view?message_id=147125) complaining about the inability to see, if the reload of file failed, when it is watched.
This brought me to think, that the whole idea of watching files is really not such a good thing as it is implemented now (have you ever watched the logfiles, with all the debug messages of reloaded files, that you do not really need, but can't turn off, as we are in debugging mode while developing.....).
Now, how about this approach (food for thought). We store the file system date of each file in the RP. Once per minute, the RP checks for all watched files if their date has changed. If it has, reload automatically (if this is the current behaviour, please ignore my ignorance. I do assume it just reloads all the files on a regular basis). If it breaks, deliver a page to *all* request (or, if this is too hard, all request to site-nodes that have an instance of the package installed), stating that the reloading of file xyz has failed and a developer should look at it. Along with a link to try reloading the file.
Basic idea behind this:
- I want to get the number of logfile messages down.
- If we break something, it will be immediatly shown. No way for an inconsistent system.
- You should never develop on a production site. Having a general "Your site is broken" might encourage people to not do this or fix it *really* quickly.
I know of enough developers that restart the server instead of watching files, as this feature is not working to the best advantage. Maybe everyone could raise their opinion here as well, stating what the feature *should* be able to do. We could tackle this issue in one of the OpenACS festivals coming up.