[Gambas-user] Gambas2 to gambas3 conversion - some problems
Benoît Minisini
gambas at ...1...
Mon Sep 5 03:00:46 CEST 2011
> Hi Benoît and everyone,
>
> I have some misgivings about how gambas3 is converting or "porting"
> gambas2 projects. I'm talking about the way it is renaming the old
> project and creating a new project with the same name. This can have a
> result of breaking stable "production" gambas2 applications at worst and
> annoying one or more developers at least.
>
> From least to worst, the following scenarios arise:
>
> 1) the converter leaves the backup project ("MyProject~") in a locked
> state. When the developer goes to open the backup project in gambas2
> they receive the "This project seems to be already opened" message.
> Colin Confused, the developer, who has multiple instances of gambas2
> running is annoyed because he has to make a decision as to whether it
> really is open somewhere (maybe even by another developer on another
> machine) or whether they should take the risk and open it anyway. I was
> going to raise a bug about this one, but some more thinking and testing
> led to the following. Analysis - "annoying".
>
> 2) the converter ignores the existence of the .lock file in the gambas2
> project and converts it anyway, thus if the project is open in gambas2
> somewhere the following could occur. Steve Stable, the support
> programmer for gambas2 has MyProject open in gambas2 and has spent
> several hours finding and fixing an obscure issue and is just about to
> compile and test. Fanny Frantic, the new junior programmer, opens
> MyProject in gambas3 and says yes to the convert question. Gambas3 then
> renames (I presume) MyProject to MyProject~ and copies and converts the
> code. Steve Stable then presses F5 whereupon gambas2 crashes and all
> his work is lost (because the file system has been altered and his
> project now points to the wrong place). Analysis - could result in Steve
> causing serious physical harm to Fanny, therefore "dangerous".
>
> 3) converting existing gambas2 components will break the gambas2 user
> projects that use them. Bruce Ballistic (senior programmer, head chef
> and dog washer) who is normally very careful to copy his gambas2
> projects to a new gambas3 directory structure, accidentally opens the
> wrong project. He then makes major changes to the component and
> recompiles it. The existing ("production") gambas2 applications will
> now fail as the symbolic links in .local/lib and .local/share point to
> the gambas3 component. Analysis - could result in Bruce muttering "If I
> ever get my hands on that Minisini character, ...", therefore "extremely
> dangerous".
>
> 4) I think (I haven't tested this) that there could be issues
> with .config/gambas as well???
>
> In my opinion the converter should insist on the user entering a new
> name for the gambas3 project and leave the gambas2 structures alone, but
> at the very least it should be alerting the user in the strongest
> possible way as to which project it is going to convert and observe any
> existing .lock files.
>
> Please consider.
>
> regards
> Bruce "where's my shotgun" Ballistic
> Steve "don't call me" Stable,
> Fanny "why are you hitting me Steve" Frantic, and
> Colin "??????" Confused
>
Here are the changes I made in revision #4088:
- When converting a Gambas 2 project, the IDE now checks that it is not opened
somewhere else, and then locks it in the Gambas 2 way.
- When the backup is made, it is unlocked.
But I won't change the name of the project at the moment. The converted
project keeps the same name, and the old project gets a "~" added to the end
of its name. I will see if I can do what you suggest without too much work.
Regards,
--
Benoît Minisini
More information about the User
mailing list