Sign in Join

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

Mailing lists / fpc-devel / 2018-07

Test changes in e.g. a package

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Bart

Hi,

Sorry if this is a RTFM question.

Whenever I make some changes to the sourcecode of e.g. a package or an RTL-file, in order to test these changes I do a make clean/make install in the root directory.
(e.g. I change one line in packages/flc-registry/src/regini.inc) This takes several minutes (which especially sucks if I made a typo which leads to a syntax error).

Is there a faster way to do this?

Bart

Reply by email

Michael Van Canneyt
to Bart
Bart wrote 12 lines
Hi, Sorry if this is a RTFM question. Whenever I make some changes to the sourcecode of e.g. a package or an RTL-file, in order to test these changes I do a make clean/make install in the root directory. (e.g. I change one line in packages/flc-registry/src/regini.inc) This takes several minutes (which especially sucks if I made a typo which leads to a syntax error). Is there a faster way to do this?

In general: no.

But:
* if the package does not have dependencies, you can just recompile that package. cd packages/fcl-registry
make clean allOPT=-gl && sudo make install

* For units that can be tested directly, copy the unit to the directory where your test program is, recompile&test till OK.

When possible, I do the latter.

Michael.

Reply by email

Bart
to Michael Van Canneyt
Michael Van Canneyt wrote
In general: no.

OK
I pity the compiler devels, especially in the past with slower hardware.

Show quoted text 6 lines
But: * if the package does not have dependencies, you can just recompile that package. cd packages/fcl-registry make clean allOPT=-gl && sudo make install

That failed with incompatible ppu version (make calls fpc 3.0.4)

* For units that can be tested directly, copy the unit to the directory where your test program is, recompile&test till OK.

Thanks for the explanation.

Bart

Reply by email

Sven Barth
to Bart

Bart schrieb am Mi., 18. Juli 2018, 23:36:

Show quoted text 8 lines
On Wed, Jul 18, 2018 at 1:39 PM, Michael Van Canneyt wrote: > In general: no. OK I pity the compiler devels, especially in the past with slower hardware.

The compiler devels more often than not only work with the compiler and RTL directories and there a "make cycle" in the compiler directory is sufficient. :)

Show quoted text 9 lines
> > But: > * if the package does not have dependencies, you can just recompile that > package. > cd packages/fcl-registry > make clean allOPT=-gl && sudo make install That failed with incompatible ppu version (make calls fpc 3.0.4)

You're trying to compile a trunk package not a 3.0.4 package? Then maybe it helps to pass the trunk compiler binary with FPC=/path/to/binary

Regards,
Sven

Reply by email

Michael Van Canneyt
to Bart: On Wed, Jul 18, 2018 at 1:39 PM, Michael Van Canneyt OK I pity the compiler devels,…
Bart wrote 7 lines
On Wed, Jul 18, 2018 at 1:39 PM, Michael Van Canneyt wrote: > In general: no. OK I pity the compiler devels, especially in the past with slower hardware.

Yes, it can be time-consuming.

Show quoted text 7 lines
> But: > * if the package does not have dependencies, you can just recompile that > package. > cd packages/fcl-registry > make clean allOPT=-gl && sudo make install That failed with incompatible ppu version (make calls fpc 3.0.4)

If you try this after having done a 'make all' then that is normal, since the system is set up to use the units in the source tree, not the installed ones.

And the ones in the source tree were then compiled with the trunk compiler...

So you should then specify the trunk compiler:
make clean all OPT=-gl PP=/path/to/trunk/compiler
(or install it on the PATH)

Michael.

Reply by email

Joost van der Sluis
to Michael Van Canneyt: In general: no. But: * if the package does not have dependencies, you can just recompile…

Op 18-07-18 om 13:39 schreef Michael Van Canneyt:

Show quoted text 18 lines
On Wed, 18 Jul 2018, Bart wrote: > Hi, > > Sorry if this is a RTFM question. > > Whenever I make some changes to the sourcecode of e.g. a package or an > RTL-file, in order to test these changes I do a make clean/make > install in the root directory. > (e.g. I change one line in packages/fcl-registry/src/regini.inc) > This takes several minutes (which especially sucks if I made a typo > which leads to a syntax error). > > Is there a faster way to do this? In general: no.

No?

cd packages/fcl-registry
fppkg install

That's it. It will also re-compile and install all packages that depend on fcl-registry.

Use 'fppkg install -o -gl' when you need debug-info.

Your fppkg configuration has to be correct, though. Which is the case when you used the fpc-installer.

If it does not work, use 'fppkg listsettings' and check the results.

Regards,

Joost.

Reply by email