[Lazarus] Do I really need to use Build to get all recent changes included?

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

[Lazarus] Do I really need to use Build to get all recent changes included?

Free Pascal - Lazarus mailing list
I am using Lazarus 2.0.8 / Fpc 3.0.4 on a RaspberryPi4
I am writing a program intended to be run as a systemd service on Linux, so no
GUI components.

While debugging code on this I have noted a strange Lazarus behaviour:
- Edit the source in order to for example add a debug log line
- Use Run/Compile to get a new binary
- Use strip -s to reduce the executable size
- scp the executable to the target system (8400 km away)
- Run the executable on the target system

Now when I run a cycle on the target through the newly created binary the log
line does *not* appear!

So back to the dev system and use Run/Build instead
Then repeat the strip-scp-run sequence

And NOW the log line appears in the target system log!

Question:
---------
Should not Run/Compile create the binary based on *all* the latest sources?
If I use Run/Build I am going to increment the build number all the time while
debugging, which I would rather avoid.

Is there some Lazarus setting I am unaware of, which will force Compile to
actually compile based on all the modified sources since last compile?

Or does Lazarus only consider changed files which are marked in the IDE as
unsaved?
If so then my use of AutoSave is the problem??? It saves changed sources every 5
seconds.


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Do I really need to use Build to get all recent changes included?

Free Pascal - Lazarus mailing list
On Sat, 27 Mar 2021 10:15:55 +0100
Bo Berglund via lazarus <[hidden email]> wrote:

>[...]
> Question:
> ---------
> Should not Run/Compile create the binary based on *all* the latest
> sources? If I use Run/Build I am going to increment the build number
> all the time while debugging, which I would rather avoid.

Maybe you modified a file of a package, that is not listed in the
package? Lazarus only checks files listed in the package.

 
> Is there some Lazarus setting I am unaware of, which will force
> Compile to actually compile based on all the modified sources since
> last compile?
>
> Or does Lazarus only consider changed files which are marked in the
> IDE as unsaved?

No.

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Do I really need to use Build to get all recent changes included?

Free Pascal - Lazarus mailing list
On Sat, 27 Mar 2021 10:29:29 +0100, Mattias Gaertner via lazarus
<[hidden email]> wrote:

>On Sat, 27 Mar 2021 10:15:55 +0100
>Bo Berglund via lazarus <[hidden email]> wrote:
>
>>[...]
>> Question:
>> ---------
>> Should not Run/Compile create the binary based on *all* the latest
>> sources? If I use Run/Build I am going to increment the build number
>> all the time while debugging, which I would rather avoid.
>
>Maybe you modified a file of a package, that is not listed in the
>package? Lazarus only checks files listed in the package.

No, I added a better exit from a threaded function in my main code plus a log
line right there.
No logging appeared, that is why I started looking for the cause.
 
After I used build and re-ran the test it worked as it should.


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus