Module save (sync vs non-sync)

Post Reply
fordpinto
Posts: 32
Joined: Wed Sep 25, 2019 4:59 pm

Module save (sync vs non-sync)

Post by fordpinto »

My work on a module wasn't saved by the built-in script editor (I did do "Save Profile"). The best I can tell this is due to the "Sync" option not being set. I did replicate this by setting and un-setting the "Sync" option. Edits of a non-Synced module aren't saved anywhere from what I can see.

I did not see it mentioned anywhere that not-"Sync" means "read only". I can't be sure whether this behaviour is a bug, or this is intended behaviour that just isn't documented. While I am hoping against all odds that it was saved, just someplace I do not know, realistically I do not expect to get back this several hours of work.

User avatar
Vadi
Posts: 4901
Joined: Sat Mar 14, 2009 3:13 pm

Re: Module save (sync vs non-sync)

Post by Vadi »

Module backups are saved in the ~/.config/mudlet/moduleBackups folder, maybe you can find it there?

~ is your user's home folder.

fordpinto
Posts: 32
Joined: Wed Sep 25, 2019 4:59 pm

Re: Module save (sync vs non-sync)

Post by fordpinto »

I did look in the moduleBackups folder, no copies of the module I was working on were saved there. It looks like the code I added was just discarded. I have tested it a few times, and removing the "Sync" flag results in the changes made to the script being silently discarded, no backups made. I guess it makes sense - why do the backup if the module file isn't allowed to be altered.

User avatar
Vadi
Posts: 4901
Joined: Sat Mar 14, 2009 3:13 pm

Re: Module save (sync vs non-sync)

Post by Vadi »

Sync is not read only though - if sync is not enabled, the module will still be saved when you save the profile.

All sync means is that it'll also be refreshed in other profiles that have it installed!

fordpinto
Posts: 32
Joined: Wed Sep 25, 2019 4:59 pm

Re: Module save (sync vs non-sync)

Post by fordpinto »

That's the way I understood the meaning of the option too. However, it's behaving in a "no-save" way I described, at least for me.

User avatar
Vadi
Posts: 4901
Joined: Sat Mar 14, 2009 3:13 pm

Re: Module save (sync vs non-sync)

Post by Vadi »

Sounds like something we should investigate - report it on https://github.com/Mudlet/Mudlet/issues/new, please.

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

Re: Module save (sync vs non-sync)

Post by Caled »

Not sure if this got put into github, but the sync check has worked like a read/write toggle for as long as I’ve been using the module manager (8 or so years maybe?)

I always assumed it was intended behaviour with odd naming.

fordpinto
Posts: 32
Joined: Wed Sep 25, 2019 4:59 pm

Re: Module save (sync vs non-sync)

Post by fordpinto »

@Caled: Thank you for confirming this behavior.

Yes, I have submitted this issue to github. After all, undocumented feature is just another name for a bug :) I am pretty sure people unwittingly losing their work is not the intended behavior, so I am guessing it will eventually get addressed. Can be as easy as clarifying the text in the dialog box and adding some documentation further explaining the intended syncing mechanics. At the moment frankly I do not quite grasp the overall concept of managing the access to the shared module codebase. Who would have write access, and who has their code copy refreshed asap on any written changes to the shared codebase are the questions I have.

Post Reply