Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-09

changes to include file do not trigger recompilation of unit

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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.

Reply by email

Graeme Geldenhuys
to David Emerson
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

Reply by email

David Emerson
to Graeme Geldenhuys
Graeme Geldenhuys wrote 12 lines
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.

Reply by email

Brian
to David Emerson: a couple days ago I filed this: http://mantis.freepascal.org/view.php?id=30569 In a…

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 by email

fredvs
to Brian

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 ;-)

Reply by email