Re: GSoC - Patch (Schema Difference Sync+ Visualization)

Lists: pgadmin-hackers
From: adeel khan <ak1733(at)gmail(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Cc: Dave Page <dpage(at)pgadmin(dot)org>
Subject: GSoC - Patch (Schema Difference Sync+ Visualization)
Date: 2010-08-16 17:15:31
Message-ID: AANLkTimh5LKiAgKWmboZZhgxrKCORm5k6YMdCd9qQYsV@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

Hi Everyone!
Hope you are fine. Well here it is what i can say some what the final
version of my two and half month coding activity. I have managed to complete
almost all of my use cases except just one and that also do not require a
lot of work as i have the base code there but unfortunately not the time.
Any how here is my work , i would like you to please check it and give me
your feedback, what value additions could be made or else. I have tried to
manage sync possibilities i can think of for tables and views and tested it
, but now please do check it and let me know about it with the example
script that is causing the error.
I must admit here that there are still a lot of issues i can think about
which need fixing , specially of optimization, some code that could surely
be written in a better way and UI thing (specially the sizer) .

BTW i have tested it for windows , sorry for the linux/mac people

Other than that happy synchronizing/visualizing :-)

take care!
adeel

Attachment Content-Type Size
Patch_Final_160801_v2.patch application/octet-stream 551.0 KB

From: adeel khan <ak1733(at)gmail(dot)com>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: GSoC - Patch (Schema Difference Sync+ Visualization)
Date: 2010-08-16 17:34:35
Message-ID: AANLkTim7+8Nq5_7vk5g9NfacmUpX7Q-Lg_Y4CmsTKn2h@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

One thing i forgot to mention, the patch is against svn , extremely sorry
for this as i have issues with git and could'nt find time to think about it.

thanks!
adeel

On Mon, Aug 16, 2010 at 10:15 PM, adeel khan <ak1733(at)gmail(dot)com> wrote:

> Hi Everyone!
> Hope you are fine. Well here it is what i can say some what the final
> version of my two and half month coding activity. I have managed to complete
> almost all of my use cases except just one and that also do not require a
> lot of work as i have the base code there but unfortunately not the time.
> Any how here is my work , i would like you to please check it and give me
> your feedback, what value additions could be made or else. I have tried to
> manage sync possibilities i can think of for tables and views and tested it
> , but now please do check it and let me know about it with the example
> script that is causing the error.
> I must admit here that there are still a lot of issues i can think about
> which need fixing , specially of optimization, some code that could surely
> be written in a better way and UI thing (specially the sizer) .
>
> BTW i have tested it for windows , sorry for the linux/mac people
>
>
>
> Other than that happy synchronizing/visualizing :-)
>
> take care!
> adeel
>


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: adeel khan <ak1733(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: GSoC - Patch (Schema Difference Sync+ Visualization)
Date: 2010-08-16 20:13:39
Message-ID: 4C699BF3.9050202@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

Le 16/08/2010 19:34, adeel khan a écrit :
> One thing i forgot to mention, the patch is against svn , extremely sorry
> for this as i have issues with git and could'nt find time to think about it.
>

AFAICT, it applies cleanly.

>> Hi Everyone!
>> Hope you are fine. Well here it is what i can say some what the final
>> version of my two and half month coding activity. I have managed to complete
>> almost all of my use cases except just one and that also do not require a
>> lot of work as i have the base code there but unfortunately not the time.
>> Any how here is my work , i would like you to please check it and give me
>> your feedback, what value additions could be made or else. I have tried to
>> manage sync possibilities i can think of for tables and views and tested it
>> , but now please do check it and let me know about it with the example
>> script that is causing the error.
>> I must admit here that there are still a lot of issues i can think about
>> which need fixing , specially of optimization, some code that could surely
>> be written in a better way and UI thing (specially the sizer) .
>>
>> BTW i have tested it for windows , sorry for the linux/mac people
>>

The real issue is here, with the gcc compiler. Well, it's more your code
than gcc. There are loads and loads of errors and warnings. I already
fixed a few ones :

* for the xpm files, "static char*" should be "static const char*"
* #endif should not have a semicolon at the end
* #include"" doesn't work, you need a space between the #include
keyword and the file path
* there's no pgadmin3.h, it should be replaced with pgAdmin3.h (notice
the upper A)
* svFkDiff.h is not the same thing than svFKDiff.h (notice the upper K)

I don't need to continue, I think you got my point. Even with all these
fixes, I still get tons of warnings and errors. Seems there are a lot of
work still to do.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: adeel khan <ak1733(at)gmail(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: GSoC - Patch (Schema Difference Sync+ Visualization)
Date: 2010-08-16 21:13:39
Message-ID: 4C69AA03.7050904@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

Le 16/08/2010 23:06, adeel khan a écrit :
> Hi,
>
>> The real issue is here, with the gcc compiler. Well, it's more your code
>> than gcc. There are loads and loads of errors and warnings. I already
>> fixed a few ones :
>>
>> * for the xpm files, "static char*" should be "static const char*"
>> * #endif should not have a semicolon at the end
>> * #include"" doesn't work, you need a space between the #include
>> keyword and the file path
>> * there's no pgadmin3.h, it should be replaced with pgAdmin3.h (notice
>> the upper A)
>> * svFkDiff.h is not the same thing than svFKDiff.h (notice the upper K)
>>
>> I don't need to continue, I think you got my point. Even with all these
>> fixes, I still get tons of warnings and errors. Seems there are a lot of
>> work still to do.
>>
>
> thanks , hm..it seems gcc is too much strict about names or about access
> modifiers. Well i have tested it only for windows, using VC 2008 (ver 9)
> You are compiling it on windows using gcc?
>

No, it isn't "too much" strict. It's just more strict, more precise than
VC++.

I'm compiling on Linux. I'm not sure I would get the same warning with
gcc on Windows (for example, the insensitive case name issue shouldn't
apply).

Anyway, next time, make sure you try with gcc. It helps find stuff that
VC++ doesn't care about.

I'm gonna wait that we find a way to work together before working again
on your patch. The same applies to Luis. I don't want to lose time
and/or work. We first need to agree on how we work concurrently on those
projects.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com


From: Dave Page <dpage(at)pgadmin(dot)org>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: adeel khan <ak1733(at)gmail(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: GSoC - Patch (Schema Difference Sync+ Visualization)
Date: 2010-08-17 14:27:50
Message-ID: AANLkTi=RSWV6+gvO0R8D03+poNkyD7xt5GmYumQx848Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

Hi Adeel,

On Mon, Aug 16, 2010 at 10:13 PM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info> wrote:
> No, it isn't "too much" strict. It's just more strict, more precise than
> VC++.

Yeah, just a bit :-). The main issue though, is that VC++ is setup to
use precompiled headers which GCC isn't (I never got it to work
properly). This means that GCC will need #include statements to
include headers wherever needed, but VC++ doesn't.

Anyway, I started trying to build on Mac, but then ran out of time
unfortunately. I got as far as can be seen in the attached patch (this
is against the head of the GIT master branch).

A few further notes, most of which I've mentioned before and I know
were due to be fixed during final cleanup of the patch:

- The brace formatting is still not per project standards in some places.
- There are some filename casing issues as Guillaume noticed - eg.
pgadmin3.h vs. pgAdmin3.h (partly fixed in the patch)
- Missing const decoration in the XPM files (fixed in the patch)
- You cannot assume that the default schema is "public" when
generating SQL scripts. See pgDatabase::GetDefaultSchema()
- There are missing spaces all over the place. Use them to separate
things like #include and a filename as Guillaume spotted, and also
between braces, brackets and operators etc. for readability, eg:

void iSetAllowConnections(bool newVal){allowConnections=newVal;}

should be

void iSetAllowConnections(bool newVal) { allowConnections = newVal; }

- If there is code in a header that uses an external class, you need
to include the appropriate header - you can't just declare the class
name.
- At least the following files are missing from your latest patch:
svAddTable.cpp, svAddSchema.cpp and svConstraintDiff.cpp.

As Guillaume has suggested, now that the GSoC timeline pressures are
off, it seems like it would be a good idea to setup a repo on github
and host the project there until it's ready to commit. I don't think
it's *that* far off - most of the issues getting a basic build on
Linux/Mac could be resolved in a couple of hours - and most of the
rest is cosmetic.

Anyway, congratulations on reaching the end of the GSoC phase of your
project - I do hope you decide to keep at it in your spare time so we
can polish off the patch and get it into 1.12. For those that are
wondering, I have built and run previous patches on Windows, and the
tool looks pretty nice.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company


From: Dave Page <dpage(at)pgadmin(dot)org>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: adeel khan <ak1733(at)gmail(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: GSoC - Patch (Schema Difference Sync+ Visualization)
Date: 2010-08-17 14:28:18
Message-ID: AANLkTiny_JgU+qoqbHPb67a7tNtDh8ucCX1kh34OT6Au@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-hackers

This time attaching the patch...

On Tue, Aug 17, 2010 at 3:27 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> Hi Adeel,
>
> On Mon, Aug 16, 2010 at 10:13 PM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
>> No, it isn't "too much" strict. It's just more strict, more precise than
>> VC++.
>
> Yeah, just a bit :-). The main issue though, is that VC++ is setup to
> use precompiled headers which GCC isn't (I never got it to work
> properly). This means that GCC will need #include statements to
> include headers wherever needed, but VC++ doesn't.
>
> Anyway, I started trying to build on Mac, but then ran out of time
> unfortunately. I got as far as can be seen in the attached patch (this
> is against the head of the GIT master branch).
>
> A few further notes, most of which I've mentioned before and I know
> were due to be fixed during final cleanup of the patch:
>
> - The brace formatting is still not per project standards in some places.
> - There are some filename casing issues as Guillaume noticed - eg.
> pgadmin3.h vs. pgAdmin3.h (partly fixed in the patch)
> - Missing const decoration in the XPM files (fixed in the patch)
> - You cannot assume that the default schema is "public" when
> generating SQL scripts. See pgDatabase::GetDefaultSchema()
> - There are missing spaces all over the place. Use them to separate
> things like #include and a filename as Guillaume spotted, and also
> between braces, brackets and operators etc. for readability, eg:
>
> void iSetAllowConnections(bool newVal){allowConnections=newVal;}
>
> should be
>
> void iSetAllowConnections(bool newVal) { allowConnections = newVal; }
>
> - If there is code in a header that uses an external class, you need
> to include the appropriate header - you can't just declare the class
> name.
> - At least the following files are missing from your latest patch:
> svAddTable.cpp, svAddSchema.cpp and svConstraintDiff.cpp.
>
> As Guillaume has suggested, now that the GSoC timeline pressures are
> off, it seems like it would be a good idea to setup a repo on github
> and host the project there until it's ready to commit. I don't think
> it's *that* far off - most of the issues getting a basic build on
> Linux/Mac could be resolved in a couple of hours - and most of the
> rest is cosmetic.
>
> Anyway, congratulations on reaching the end of the GSoC phase of your
> project - I do hope you decide to keep at it in your spare time so we
> can polish off the patch and get it into 1.12. For those that are
> wondering, I have built and run previous patches on Windows, and the
> tool looks pretty nice.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise Postgres Company
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company

Attachment Content-Type Size
Patch_Final_160801_v2-Dave.patch application/octet-stream 447.0 KB