Closed AndrewM- closed 8 years ago
That sounds problematic. Are you on the latest release, and did you shut down Access, or did Rubberduck crash it? If you shut it down, we can't guarantee anything--we need to be allowed to finish exporting the modules for the repo. I think I can optimize this for creating a new repository, instead of unloading and reloading all the components, but when RD is in the middle of unloading/loading components, you should leave it alone so it doesn't leave some not loaded into the project.
I crashed ms-access. Maybe it is a case of reporting progress so that the user knows that the process has not hung. I use another method of source control (VCS for ms-access on github) and it works without risk of loosing modules as far as I can tell so I was expecting RubberDuck to be similar. What I did see was that the same sequence of window names kept running over and over again in the title bar, so I assumed the RD process had crashed. Exporting all code with VCS takes about one minute and VCS also exports form definitions as well as the code behind modules.
I will try exporting with a simpler project.
@Hosch250 sounds problematic is an epic understatement...
@AndrewM- so the code could he recovered by reimporting the modules manually then?
@Hosch250 we need to handle the possibility where an exception is thrown while the modules are no longer in the project, and do everything we can to recover gracefully.
I have a large number of small modules so I did not bother. It was easier to copy a backup accdb file into the folder. No damage was done to me but I could easily imagine someone working on code for a few hours and loosing the new code due to this issue. If I had worked on anything, then I would have probably cut and pasted the new code back into the project.
@AndrewM- did you know you can import multiple modules at once using the Code Explorer's context menu? The plan is to hijack the VBE's import functionality for this, too.
Hi Mathieu
I do use that sometimes. The issue is knowing which code is new and getting all the dependencies and I am still getting to grip with that. Without a full cover of unit testing, I can’t trust automated processes to recover from crashes.
Even though I have refactored all my code for testing, still only 20% is testable as all the rest hits the filing system or database.
From: Mathieu Guindon [mailto:notifications@github.com] Sent: Fri, 24 June 2016 11:05 AM To: rubberduck-vba/Rubberduck Cc: AndrewM-; Mention Subject: Re: [rubberduck-vba/Rubberduck] When source control is creating a new repository, modules are deleted if process is crashed. (#1908)
@AndrewM- https://github.com/AndrewM- did you know you can import multiple modules at once using the Code Explorer's context menu? The plan is to hijack the VBE's import functionality for this, too.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rubberduck-vba/Rubberduck/issues/1908#issuecomment-228230044 , or mute the thread https://github.com/notifications/unsubscribe/AE04xcz5Z7tIerdgjhHnyCRmloHGhNfqks5qOy09gaJpZM4I9Ti2 . https://github.com/notifications/beacon/AE04xeA98guntmvowBMrQiRZM7scx32yks5qOy09gaJpZM4I9Ti2.gif
We are currently removing all modules at once, then reloading them all, and if something happens during the reload, then :/ I will make this remove and reload a single module at a time, so if something happens, only that module should be missing. I'm afraid that's the best I can do for now.
I am using ms-access and have a project with 20 KLOC. All the code is VBA with only a couple of windows functions declared (open file dialog etc.). I went to make a new repository and the window frames for modules could be seen opening in the IDE as their code was processed. However after the same sequence of windows had opened about 20 times and the system was non-responsive, I crashed the application. When I reopened the application all the standalone standard and class modules were missing.
I should add that the target directory contained most or all of the exported bas files that would be expected for the creation of a new repository.
Build 2.0.2.41756