Discussion:
[fpc-devel] Test changes in e.g. a package
Bart
2018-07-18 11:11:35 UTC
Permalink
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
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc
Michael Van Canneyt
2018-07-18 11:39:07 UTC
Permalink
Post by 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?
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.
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/f
Bart
2018-07-18 21:36:17 UTC
Permalink
On Wed, Jul 18, 2018 at 1:39 PM, Michael Van Canneyt
Post by Michael Van Canneyt
In general: no.
OK
I pity the compiler devels, especially in the past with slower hardware.
Post by Michael Van Canneyt
* 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)
Post by Michael Van Canneyt
* 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
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/f
Sven Barth via fpc-devel
2018-07-19 05:48:57 UTC
Permalink
Post by Bart
On Wed, Jul 18, 2018 at 1:39 PM, Michael Van Canneyt
Post by Michael Van Canneyt
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. :)
Post by Bart
Post by Michael Van Canneyt
* 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
Michael Van Canneyt
2018-07-19 05:59:21 UTC
Permalink
Post by Bart
On Wed, Jul 18, 2018 at 1:39 PM, Michael Van Canneyt
Post by Michael Van Canneyt
In general: no.
OK
I pity the compiler devels, especially in the past with slower hardware.
Yes, it can be time-consuming.
Post by Bart
Post by Michael Van Canneyt
* 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.
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/li
Joost van der Sluis
2018-07-23 12:32:39 UTC
Permalink
Post by Michael Van Canneyt
Post by 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/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.
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailma

Loading...