1
votes

I'm using Delphi XE2. I have a large project that has an application (EXE) that uses runtime packages, a Core.bpl custom package (used by the EXE) and several other custom Plugin.bpl packages that also use the Core.bpl package (as a runtime package).

I have noticed that I can make minor changes to the Core.bpl without recompiling the EXE or custom Plugin.bpl packages. But more significant changes (adding a lot of code or removing a lot of code from an existing method, or adding new methods) causes problems. Sometimes there are inconsistent access violations, sometimes there are errors about missing entry points in the Core.bpl package, etc.

I want to minimize the number of files that are compiled so that our users have fewer files to update with each release. However, I don't want them to see errors like I sometimes see.

Should I recompile all the modules and the EXE that uses Core.bpl each time it changes, or are there some general rules to follow so that everything only gets compiled for certain types of changes to the Core.bpl?

1
If you change the interface then you must recompile all dependend parts - Sir Rufo
@SirRufo make it an answer .. - bummi
@SirRufo - Is that to say, if you add, change or remove methods or properties, then you must recompile everything, but if you simply change the code of an existing method without changing its parameters, then nothing needs to be recompiled? - James L.
Thanks @bummi for the additional info. - James L.
Modifying private members also changes the interface. Basically any changes made above the implementation line require a rebuild of all dependent code. - afrazier

1 Answers

3
votes

Every time you change the interface section of a unit in a BPL you have to recompile the depended parts (EXE or other BPL).