changes to include file do not trigger recompilation of unit

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

changes to include file do not trigger recompilation of unit

David Emerson
Hi all,

a couple days ago I filed this:
http://mantis.freepascal.org/view.php?id=30569

In a particular situation (common in my project), making changes to an
include file does not trigger recompilation of the unit(s) where it is
included.

I'm wondering if anyone else has run into it, and if there might be a
workaround.

Also wondering how likely it is to be fixed in time for the upcoming
3.0.2 release. It's a bit of a nuisance.

Thanks!
~David.


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: changes to include file do not trigger recompilation of unit

Graeme Geldenhuys-6
On 2016-09-08 22:57, David Emerson wrote:
> I'm wondering if anyone else has run into it, and if there might be a
> workaround.

Yes, it has been happening here for years. No workaround that I know of,
except to do a Build All after you make changes to include files. But
that's up to the developer to remember than.


> Also wondering how likely it is to be fixed in time for the upcoming
> 3.0.2 release. It's a bit of a nuisance.

I doubt. Like I said, that issue has been around for years.


Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: changes to include file do not trigger recompilation of unit

David Emerson
On 09/09/2016 01:03 AM, Graeme Geldenhuys wrote:

> On 2016-09-08 22:57, David Emerson wrote:
>> I'm wondering if anyone else has run into it, and if there might be a
>> workaround.
>
> Yes, it has been happening here for years. No workaround that I know of,
> except to do a Build All after you make changes to include files. But
> that's up to the developer to remember than.
>
>> Also wondering how likely it is to be fixed in time for the upcoming
>> 3.0.2 release. It's a bit of a nuisance.
>
> I doubt. Like I said, that issue has been around for years.

Thanks!
I'm astonished that I never tracked it down before.

~David.



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: changes to include file do not trigger recompilation of unit

Brian
In reply to this post by David Emerson
Yes. Version 2.6.4 which I have been using has this problem.

Two work arounds :

1) Attempt to compile the include file which will fail , but the compiler appears to then recognize the file has changed when the main program / unit is later compiled.

2) save the file after the change , the recompile whatever you are working on.

Brian
Reply | Threaded
Open this post in threaded view
|

Re: changes to include file do not trigger recompilation of unit

fredvs
Brian wrote
Yes. Version 2.6.4 which I have been using has this problem.
Huh, version 3.0.0 and 3.1.1 too. ;-(

It is sad because I love to use {$I define.inc} in the units. (define.inc --> with all the custom defines --> one unique file for all the units).

But if I forget to re-build all, the changes are not updated.

Fre;D
Many thanks ;-)