[fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Graeme Geldenhuys
Hi, Many years ago when I still used Delphi, it was common in our development team to create our own patches for various components we used. We then placed those fixed units in a new path and add that path to the Delphi IDE (can't remember if the new path at to be on the top or bottom of the

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: [ Charset UTF-8 unsupported, converting... ] Hi, Many years ago when I still used Delphi, it was common in our development team to create our own patches for various components we used. We then placed those fixed units in a new path and add

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Graeme Geldenhuys
Op 2010-06-17 10:39, Marco van de Voort het geskryf: IIRC delphi has a equivalent of -Ur ({$IMPLICITBUILD OFF}). Were the _original_ components compiled with that? It's been over 7 years, so the details are a bit fuzzy. If I remember correctly, Delphi used to like dumping all installed

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: Op 2010-06-17 10:39, Marco van de Voort het geskryf: IIRC delphi has a equivalent of -Ur ({$IMPLICITBUILD OFF}). Were the _original_ components compiled with that? It's been over 7 years, so the details are a bit fuzzy. If I remember

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Mattias Gaertner
On Thu, 17 Jun 2010 10:51:46 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: In our previous episode, Graeme Geldenhuys said: Op 2010-06-17 10:39, Marco van de Voort het geskryf: IIRC delphi has a equivalent of -Ur ({$IMPLICITBUILD OFF}). Were the _original_ components

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Graeme Geldenhuys
Op 2010-06-17 10:51, Marco van de Voort het geskryf: Well, it is hard to implement fuzzy details :-) :-) I was simply asking if somebody tried that with Free Pascal - it wasn't meant as a feature request. Were it third party or components that come with Delphi that you replaced? I believe

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Graeme Geldenhuys
Op 2010-06-17 11:13, Mattias Gaertner het geskryf: If only the unit implementation changes, and you don't use inlines and you compile the unit with the same compiler flags, can this ppu be used instead of the original? Yes, that's the point I'm trying to make. When we did this years ago in

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Graeme Geldenhuys
Op 2010-06-17 11:13, Mattias Gaertner het geskryf: If only the unit implementation changes, and you don't use inlines and you compile the unit with the same compiler flags, can this ppu be used instead of the original? It worked! For implementation sections bug fixes at least. :-) Below

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Marco van de Voort
In our previous episode, Mattias Gaertner said: If your project then included a new *.pas files with earlier unit search path pointing to that new *.pas, it would recompile it and its *.dcu will be generated inside your project's output path, thus used instead of the original one in

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Graeme Geldenhuys
Op 2010-06-17 11:13, Mattias Gaertner het geskryf: If only the unit implementation changes, and you don't use inlines and you compile the unit with the same compiler flags, can this ppu be used instead of the original? So far so good. I managed to successfully replace ibconnection.pas which

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: If only the unit implementation changes, and you don't use inlines and you compile the unit with the same compiler flags, can this ppu be used instead of the original? So far so good. I managed to successfully replace ibconnection.pas

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Graeme Geldenhuys
Op 2010-06-17 12:01, Marco van de Voort het geskryf: Of a snapshot or of a release? FPC 2.4.1 fixes branch from repository. Compiled two weeks ago with the following script. --- #!/bin/bash COMPILER=/opt/fpc_2.4.1/x86_64-linux/bin/ppcx64 cd src make all PP=$COMPILER

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Žilvinas Ledas
On 2010-06-17 12:14, Graeme Geldenhuys wrote: Op 2010-06-17 10:51, Marco van de Voort het geskryf: Well, it is hard to implement fuzzy details :-) :-) I was simply asking if somebody tried that with Free Pascal - it wasn't meant as a feature request. Were it third party or

Re: [fpc-pascal] A patched unit overriding the default - like Delphi supports

2010-06-17 Thread Felipe Monteiro de Carvalho
The solution that I use is to rename the unit slightly, like I am improving OpenSSL.pas, so I renamed it to MyOpenSSL.pas to avoid conflicts. Once the changes are merged and released I will rename my uses clauses back to OpenSSL. Can be very annoying if the problem involves lot's of units, but