Re: [Kicad-developers] Auto-generated backup files: are they useful?

2020-06-29 Thread Adam Wolf
I have found them more confusing than valuable, both when working on
projects and when teaching folks and they're curious about each of the new
files.

I guess we can be glad that the state of user backup/VCS is better now than
a decade ago!  I tend to have little hope for things like that, but hey!

On Mon, Jun 29, 2020, 2:33 PM Jon Evans  wrote:

> That save process change is what I was referring to in (2)
>
> The old save process (in 5.1 and earlier) is:
>
> 1) Move (not copy) filename.ext to filename.ext-bak
> 2) Write the save to filename.ext (a new file at this point)
>
> Our current save process (in nightlies) is:
>
> 1) Copy filename.ext to filename.ext-bak
> 2) Write to .filename.ext$ (a temporary file)
> 3) If everything worked, move .filename.ext$ to filename.ext
> (overwrites the old file)
>
> There is no need to delete anything: if the save works, the move
> option effectively deletes the temporary file.  If the save doesn't
> work, the old file is untouched.
>
> On Mon, Jun 29, 2020 at 3:27 PM Andrew Zonenberg
>  wrote:
> >
> > I find them annoying and have to add them to my gitignore's etc
> constantly.
> >
> > They're of no value to me because I tend to save every 30 seconds or so
> > while working.
> >
> > The *one* thing they might be useful for is guarding against kicad
> > segfaulting or other failures (disk full, NFS connection lost, etc)
> > during the save process itself. To do this, I'd suggest:
> >
> > * Move old file to file.bak
> > * Write new file
> > * Delete old file if everything worked. If something goes wrong before
> > reaching this point, you can restore from the bak.
> >
> > On 6/29/20 12:23 PM, Jon Evans wrote:
> > > Currently, KiCad automatically creates backups of schematic and PCB
> > > files when you save a file.
> > >
> > > The logic for these backups is basically: if a file already exists
> > > with the same name as what we are saving, copy that file to a new file
> > > and give it the "-bak" suffix on the file extension.
> > >
> > > These backups are stored next to the original file in the current
> > > KiCad codebase.  This understandably creates clutter that some people
> > > don't like (myself included) so in the project-settings branch that is
> > > about ready to be merged, I changed this behavior to place all these
> > > backups in a special backups folder for the project.
> > >
> > > This proved to have some complications around the handling of files
> > > outside the project path (which it's possible to have with
> > > hierarchical schematic sheets) so I need to do something else.
> > >
> > > After some thought, I am pretty convinced that the right thing to do
> > > is just *remove this backup feature entirely*.  Here's why:
> > >
> > > 1) It's not a very good backup:  It just stores the state from the
> > > last time you hit "save".  If you hit save again, your backup is blown
> > > up.  So, it's really like a "undo" function, but on disk, and with
> > > only one level of undo.
> > >
> > > 2) Recently I changed how we save schematic and board files to fix
> > > some unrelated issues people were seeing with cloud backup services.
> > > Before this change, if KiCad crashed or had some other serious error
> > > while saving a file, the file would be lost (because we used to delete
> > > the old file and then write a new one in its place).  After this
> > > change, we write the new file to a temporary location, and only if
> > > that write succeeds do we copy it on top of the old file.  I think
> > > this vulnerability to generating corrupt files if we crash was one of
> > > the reasons for this backup file system, and that reason is now gone.
> > >
> > > 3) Because it's not a very good backup, I worry that the fact that
> > > "bak" files exist might cause some users to have a false sense of
> > > security and not use a true backup system (like a version control
> > > system, or some other mechanism that actually backs up files
> > > periodically).  I want to remove this false sense of security so that
> > > it is more clear that users should back up their files in some way if
> > > they care about the work.
> > >
> > > In other words, I don't think this feature actually gives enough value
> > > to make it worth the clutter in the project folder and/or the
> > > development effort to make it work well with less clutter.
> > >
> > > So, I'd like to hear from others on this: anyone disagree?
> > >
> > > Thanks,
> > > Jon
> > >
> > > ___
> > > Mailing list: https://launchpad.net/~kicad-developers
> > > Post to : kicad-developers@lists.launchpad.net
> > > Unsubscribe : https://launchpad.net/~kicad-developers
> > > More help   : https://help.launchpad.net/ListHelp
> > >
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : 

Re: [Kicad-developers] Auto-generated backup files: are they useful?

2020-06-29 Thread Wayne Stambaugh
Autosave is independent of the back up file.

On 6/29/2020 6:22 PM, Jeff Young wrote:
> How does the current backup file strategy interact with the autosave feature? 
>  If autosave works without it, that might address a lot of these concerns.
> 
> 
> 
>> On 29 Jun 2020, at 23:13, hauptmech  wrote:
>>
>>
>> While I agree that it is not KiCad's job to do archival backups or version 
>> control, I do think that KiCad should preserve the integrity of users data 
>> through a crash. Even better if the work between the last save and the crash 
>> is also preserved and recovered on restart.
>>
>> I have had to use the backup files to recover data in the past. I have no 
>> idea if that recovery was related to something that is now no longer a 
>> possible issue.
>>
>>
>> -Hauptmech
>>
>>
>> On 6/30/2020 7:23 AM, Jon Evans wrote:
>>> Currently, KiCad automatically creates backups of schematic and PCB
>>> files when you save a file.
>>>
>>> The logic for these backups is basically: if a file already exists
>>> with the same name as what we are saving, copy that file to a new file
>>> and give it the "-bak" suffix on the file extension.
>>>
>>> These backups are stored next to the original file in the current
>>> KiCad codebase.  This understandably creates clutter that some people
>>> don't like (myself included) so in the project-settings branch that is
>>> about ready to be merged, I changed this behavior to place all these
>>> backups in a special backups folder for the project.
>>>
>>> This proved to have some complications around the handling of files
>>> outside the project path (which it's possible to have with
>>> hierarchical schematic sheets) so I need to do something else.
>>>
>>> After some thought, I am pretty convinced that the right thing to do
>>> is just *remove this backup feature entirely*.  Here's why:
>>>
>>> 1) It's not a very good backup:  It just stores the state from the
>>> last time you hit "save".  If you hit save again, your backup is blown
>>> up.  So, it's really like a "undo" function, but on disk, and with
>>> only one level of undo.
>>>
>>> 2) Recently I changed how we save schematic and board files to fix
>>> some unrelated issues people were seeing with cloud backup services.
>>> Before this change, if KiCad crashed or had some other serious error
>>> while saving a file, the file would be lost (because we used to delete
>>> the old file and then write a new one in its place).  After this
>>> change, we write the new file to a temporary location, and only if
>>> that write succeeds do we copy it on top of the old file.  I think
>>> this vulnerability to generating corrupt files if we crash was one of
>>> the reasons for this backup file system, and that reason is now gone.
>>>
>>> 3) Because it's not a very good backup, I worry that the fact that
>>> "bak" files exist might cause some users to have a false sense of
>>> security and not use a true backup system (like a version control
>>> system, or some other mechanism that actually backs up files
>>> periodically).  I want to remove this false sense of security so that
>>> it is more clear that users should back up their files in some way if
>>> they care about the work.
>>>
>>> In other words, I don't think this feature actually gives enough value
>>> to make it worth the clutter in the project folder and/or the
>>> development effort to make it work well with less clutter.
>>>
>>> So, I'd like to hear from others on this: anyone disagree?
>>>
>>> Thanks,
>>> Jon
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Auto-generated backup files: are they useful?

2020-06-29 Thread Jeff Young
How does the current backup file strategy interact with the autosave feature?  
If autosave works without it, that might address a lot of these concerns.



> On 29 Jun 2020, at 23:13, hauptmech  wrote:
> 
> 
> While I agree that it is not KiCad's job to do archival backups or version 
> control, I do think that KiCad should preserve the integrity of users data 
> through a crash. Even better if the work between the last save and the crash 
> is also preserved and recovered on restart.
> 
> I have had to use the backup files to recover data in the past. I have no 
> idea if that recovery was related to something that is now no longer a 
> possible issue.
> 
> 
> -Hauptmech
> 
> 
> On 6/30/2020 7:23 AM, Jon Evans wrote:
>> Currently, KiCad automatically creates backups of schematic and PCB
>> files when you save a file.
>> 
>> The logic for these backups is basically: if a file already exists
>> with the same name as what we are saving, copy that file to a new file
>> and give it the "-bak" suffix on the file extension.
>> 
>> These backups are stored next to the original file in the current
>> KiCad codebase.  This understandably creates clutter that some people
>> don't like (myself included) so in the project-settings branch that is
>> about ready to be merged, I changed this behavior to place all these
>> backups in a special backups folder for the project.
>> 
>> This proved to have some complications around the handling of files
>> outside the project path (which it's possible to have with
>> hierarchical schematic sheets) so I need to do something else.
>> 
>> After some thought, I am pretty convinced that the right thing to do
>> is just *remove this backup feature entirely*.  Here's why:
>> 
>> 1) It's not a very good backup:  It just stores the state from the
>> last time you hit "save".  If you hit save again, your backup is blown
>> up.  So, it's really like a "undo" function, but on disk, and with
>> only one level of undo.
>> 
>> 2) Recently I changed how we save schematic and board files to fix
>> some unrelated issues people were seeing with cloud backup services.
>> Before this change, if KiCad crashed or had some other serious error
>> while saving a file, the file would be lost (because we used to delete
>> the old file and then write a new one in its place).  After this
>> change, we write the new file to a temporary location, and only if
>> that write succeeds do we copy it on top of the old file.  I think
>> this vulnerability to generating corrupt files if we crash was one of
>> the reasons for this backup file system, and that reason is now gone.
>> 
>> 3) Because it's not a very good backup, I worry that the fact that
>> "bak" files exist might cause some users to have a false sense of
>> security and not use a true backup system (like a version control
>> system, or some other mechanism that actually backs up files
>> periodically).  I want to remove this false sense of security so that
>> it is more clear that users should back up their files in some way if
>> they care about the work.
>> 
>> In other words, I don't think this feature actually gives enough value
>> to make it worth the clutter in the project folder and/or the
>> development effort to make it work well with less clutter.
>> 
>> So, I'd like to hear from others on this: anyone disagree?
>> 
>> Thanks,
>> Jon
>> 
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Auto-generated backup files: are they useful?

2020-06-29 Thread hauptmech



While I agree that it is not KiCad's job to do archival backups or 
version control, I do think that KiCad should preserve the integrity of 
users data through a crash. Even better if the work between the last 
save and the crash is also preserved and recovered on restart.


I have had to use the backup files to recover data in the past. I have 
no idea if that recovery was related to something that is now no longer 
a possible issue.



-Hauptmech


On 6/30/2020 7:23 AM, Jon Evans wrote:

Currently, KiCad automatically creates backups of schematic and PCB
files when you save a file.

The logic for these backups is basically: if a file already exists
with the same name as what we are saving, copy that file to a new file
and give it the "-bak" suffix on the file extension.

These backups are stored next to the original file in the current
KiCad codebase.  This understandably creates clutter that some people
don't like (myself included) so in the project-settings branch that is
about ready to be merged, I changed this behavior to place all these
backups in a special backups folder for the project.

This proved to have some complications around the handling of files
outside the project path (which it's possible to have with
hierarchical schematic sheets) so I need to do something else.

After some thought, I am pretty convinced that the right thing to do
is just *remove this backup feature entirely*.  Here's why:

1) It's not a very good backup:  It just stores the state from the
last time you hit "save".  If you hit save again, your backup is blown
up.  So, it's really like a "undo" function, but on disk, and with
only one level of undo.

2) Recently I changed how we save schematic and board files to fix
some unrelated issues people were seeing with cloud backup services.
Before this change, if KiCad crashed or had some other serious error
while saving a file, the file would be lost (because we used to delete
the old file and then write a new one in its place).  After this
change, we write the new file to a temporary location, and only if
that write succeeds do we copy it on top of the old file.  I think
this vulnerability to generating corrupt files if we crash was one of
the reasons for this backup file system, and that reason is now gone.

3) Because it's not a very good backup, I worry that the fact that
"bak" files exist might cause some users to have a false sense of
security and not use a true backup system (like a version control
system, or some other mechanism that actually backs up files
periodically).  I want to remove this false sense of security so that
it is more clear that users should back up their files in some way if
they care about the work.

In other words, I don't think this feature actually gives enough value
to make it worth the clutter in the project folder and/or the
development effort to make it work well with less clutter.

So, I'd like to hear from others on this: anyone disagree?

Thanks,
Jon

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp




___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Auto-generated backup files: are they useful?

2020-06-29 Thread Ian McInerney
I'm +1 on removing the backup files completely. I can see how they might
have been useful in the past given the save behavior, but I think the
recent changes to that have made them obsolete. I am also someone who puts
all my projects into a git repo, so I have always found them annoying and
never even used them.

Also, did we ever even have anything like an auto-recover mechanism for
them (where if the main file failed loading it would fallback to the
backup)? I can't recall... (which probably means I never used it if we have
one).

-Ian

On Mon, Jun 29, 2020 at 8:24 PM Jon Evans  wrote:

> Currently, KiCad automatically creates backups of schematic and PCB
> files when you save a file.
>
> The logic for these backups is basically: if a file already exists
> with the same name as what we are saving, copy that file to a new file
> and give it the "-bak" suffix on the file extension.
>
> These backups are stored next to the original file in the current
> KiCad codebase.  This understandably creates clutter that some people
> don't like (myself included) so in the project-settings branch that is
> about ready to be merged, I changed this behavior to place all these
> backups in a special backups folder for the project.
>
> This proved to have some complications around the handling of files
> outside the project path (which it's possible to have with
> hierarchical schematic sheets) so I need to do something else.
>
> After some thought, I am pretty convinced that the right thing to do
> is just *remove this backup feature entirely*.  Here's why:
>
> 1) It's not a very good backup:  It just stores the state from the
> last time you hit "save".  If you hit save again, your backup is blown
> up.  So, it's really like a "undo" function, but on disk, and with
> only one level of undo.
>
> 2) Recently I changed how we save schematic and board files to fix
> some unrelated issues people were seeing with cloud backup services.
> Before this change, if KiCad crashed or had some other serious error
> while saving a file, the file would be lost (because we used to delete
> the old file and then write a new one in its place).  After this
> change, we write the new file to a temporary location, and only if
> that write succeeds do we copy it on top of the old file.  I think
> this vulnerability to generating corrupt files if we crash was one of
> the reasons for this backup file system, and that reason is now gone.
>
> 3) Because it's not a very good backup, I worry that the fact that
> "bak" files exist might cause some users to have a false sense of
> security and not use a true backup system (like a version control
> system, or some other mechanism that actually backs up files
> periodically).  I want to remove this false sense of security so that
> it is more clear that users should back up their files in some way if
> they care about the work.
>
> In other words, I don't think this feature actually gives enough value
> to make it worth the clutter in the project folder and/or the
> development effort to make it work well with less clutter.
>
> So, I'd like to hear from others on this: anyone disagree?
>
> Thanks,
> Jon
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Auto-generated backup files: are they useful?

2020-06-29 Thread Jon Evans
That save process change is what I was referring to in (2)

The old save process (in 5.1 and earlier) is:

1) Move (not copy) filename.ext to filename.ext-bak
2) Write the save to filename.ext (a new file at this point)

Our current save process (in nightlies) is:

1) Copy filename.ext to filename.ext-bak
2) Write to .filename.ext$ (a temporary file)
3) If everything worked, move .filename.ext$ to filename.ext
(overwrites the old file)

There is no need to delete anything: if the save works, the move
option effectively deletes the temporary file.  If the save doesn't
work, the old file is untouched.

On Mon, Jun 29, 2020 at 3:27 PM Andrew Zonenberg
 wrote:
>
> I find them annoying and have to add them to my gitignore's etc constantly.
>
> They're of no value to me because I tend to save every 30 seconds or so
> while working.
>
> The *one* thing they might be useful for is guarding against kicad
> segfaulting or other failures (disk full, NFS connection lost, etc)
> during the save process itself. To do this, I'd suggest:
>
> * Move old file to file.bak
> * Write new file
> * Delete old file if everything worked. If something goes wrong before
> reaching this point, you can restore from the bak.
>
> On 6/29/20 12:23 PM, Jon Evans wrote:
> > Currently, KiCad automatically creates backups of schematic and PCB
> > files when you save a file.
> >
> > The logic for these backups is basically: if a file already exists
> > with the same name as what we are saving, copy that file to a new file
> > and give it the "-bak" suffix on the file extension.
> >
> > These backups are stored next to the original file in the current
> > KiCad codebase.  This understandably creates clutter that some people
> > don't like (myself included) so in the project-settings branch that is
> > about ready to be merged, I changed this behavior to place all these
> > backups in a special backups folder for the project.
> >
> > This proved to have some complications around the handling of files
> > outside the project path (which it's possible to have with
> > hierarchical schematic sheets) so I need to do something else.
> >
> > After some thought, I am pretty convinced that the right thing to do
> > is just *remove this backup feature entirely*.  Here's why:
> >
> > 1) It's not a very good backup:  It just stores the state from the
> > last time you hit "save".  If you hit save again, your backup is blown
> > up.  So, it's really like a "undo" function, but on disk, and with
> > only one level of undo.
> >
> > 2) Recently I changed how we save schematic and board files to fix
> > some unrelated issues people were seeing with cloud backup services.
> > Before this change, if KiCad crashed or had some other serious error
> > while saving a file, the file would be lost (because we used to delete
> > the old file and then write a new one in its place).  After this
> > change, we write the new file to a temporary location, and only if
> > that write succeeds do we copy it on top of the old file.  I think
> > this vulnerability to generating corrupt files if we crash was one of
> > the reasons for this backup file system, and that reason is now gone.
> >
> > 3) Because it's not a very good backup, I worry that the fact that
> > "bak" files exist might cause some users to have a false sense of
> > security and not use a true backup system (like a version control
> > system, or some other mechanism that actually backs up files
> > periodically).  I want to remove this false sense of security so that
> > it is more clear that users should back up their files in some way if
> > they care about the work.
> >
> > In other words, I don't think this feature actually gives enough value
> > to make it worth the clutter in the project folder and/or the
> > development effort to make it work well with less clutter.
> >
> > So, I'd like to hear from others on this: anyone disagree?
> >
> > Thanks,
> > Jon
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Auto-generated backup files: are they useful?

2020-06-29 Thread Andy Peters

> On Jun 29, 2020, at 12:23 PM, Jon Evans  wrote:
> 
> Currently, KiCad automatically creates backups of schematic and PCB
> files when you save a file.
> 
[snip]
> 
> In other words, I don't think this feature actually gives enough value
> to make it worth the clutter in the project folder and/or the
> development effort to make it work well with less clutter.
> 
> So, I'd like to hear from others on this: anyone disagree?

One user’s perspective (mine):

Keeping designs in a proper source-code control system eliminates the need for 
such backups.

What, you say, some people don’t use SCC? Oy.

-a
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Auto-generated backup files: are they useful?

2020-06-29 Thread Andrew Zonenberg
I find them annoying and have to add them to my gitignore's etc constantly.

They're of no value to me because I tend to save every 30 seconds or so
while working.

The *one* thing they might be useful for is guarding against kicad
segfaulting or other failures (disk full, NFS connection lost, etc)
during the save process itself. To do this, I'd suggest:

* Move old file to file.bak
* Write new file
* Delete old file if everything worked. If something goes wrong before
reaching this point, you can restore from the bak.

On 6/29/20 12:23 PM, Jon Evans wrote:
> Currently, KiCad automatically creates backups of schematic and PCB
> files when you save a file.
> 
> The logic for these backups is basically: if a file already exists
> with the same name as what we are saving, copy that file to a new file
> and give it the "-bak" suffix on the file extension.
> 
> These backups are stored next to the original file in the current
> KiCad codebase.  This understandably creates clutter that some people
> don't like (myself included) so in the project-settings branch that is
> about ready to be merged, I changed this behavior to place all these
> backups in a special backups folder for the project.
> 
> This proved to have some complications around the handling of files
> outside the project path (which it's possible to have with
> hierarchical schematic sheets) so I need to do something else.
> 
> After some thought, I am pretty convinced that the right thing to do
> is just *remove this backup feature entirely*.  Here's why:
> 
> 1) It's not a very good backup:  It just stores the state from the
> last time you hit "save".  If you hit save again, your backup is blown
> up.  So, it's really like a "undo" function, but on disk, and with
> only one level of undo.
> 
> 2) Recently I changed how we save schematic and board files to fix
> some unrelated issues people were seeing with cloud backup services.
> Before this change, if KiCad crashed or had some other serious error
> while saving a file, the file would be lost (because we used to delete
> the old file and then write a new one in its place).  After this
> change, we write the new file to a temporary location, and only if
> that write succeeds do we copy it on top of the old file.  I think
> this vulnerability to generating corrupt files if we crash was one of
> the reasons for this backup file system, and that reason is now gone.
> 
> 3) Because it's not a very good backup, I worry that the fact that
> "bak" files exist might cause some users to have a false sense of
> security and not use a true backup system (like a version control
> system, or some other mechanism that actually backs up files
> periodically).  I want to remove this false sense of security so that
> it is more clear that users should back up their files in some way if
> they care about the work.
> 
> In other words, I don't think this feature actually gives enough value
> to make it worth the clutter in the project folder and/or the
> development effort to make it work well with less clutter.
> 
> So, I'd like to hear from others on this: anyone disagree?
> 
> Thanks,
> Jon
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] Auto-generated backup files: are they useful?

2020-06-29 Thread Jon Evans
Currently, KiCad automatically creates backups of schematic and PCB
files when you save a file.

The logic for these backups is basically: if a file already exists
with the same name as what we are saving, copy that file to a new file
and give it the "-bak" suffix on the file extension.

These backups are stored next to the original file in the current
KiCad codebase.  This understandably creates clutter that some people
don't like (myself included) so in the project-settings branch that is
about ready to be merged, I changed this behavior to place all these
backups in a special backups folder for the project.

This proved to have some complications around the handling of files
outside the project path (which it's possible to have with
hierarchical schematic sheets) so I need to do something else.

After some thought, I am pretty convinced that the right thing to do
is just *remove this backup feature entirely*.  Here's why:

1) It's not a very good backup:  It just stores the state from the
last time you hit "save".  If you hit save again, your backup is blown
up.  So, it's really like a "undo" function, but on disk, and with
only one level of undo.

2) Recently I changed how we save schematic and board files to fix
some unrelated issues people were seeing with cloud backup services.
Before this change, if KiCad crashed or had some other serious error
while saving a file, the file would be lost (because we used to delete
the old file and then write a new one in its place).  After this
change, we write the new file to a temporary location, and only if
that write succeeds do we copy it on top of the old file.  I think
this vulnerability to generating corrupt files if we crash was one of
the reasons for this backup file system, and that reason is now gone.

3) Because it's not a very good backup, I worry that the fact that
"bak" files exist might cause some users to have a false sense of
security and not use a true backup system (like a version control
system, or some other mechanism that actually backs up files
periodically).  I want to remove this false sense of security so that
it is more clear that users should back up their files in some way if
they care about the work.

In other words, I don't think this feature actually gives enough value
to make it worth the clutter in the project folder and/or the
development effort to make it work well with less clutter.

So, I'd like to hear from others on this: anyone disagree?

Thanks,
Jon

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp