Discussion:
Test changes in e.g. a package
(too old to reply)
Bart
2018-07-18 11:11:35 UTC
Permalink
Raw Message
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
Raw Message
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/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
Raw Message
On Wed, Jul 18, 2018 at 1:39 PM, Michael Van Canneyt
<***@freepascal.org> wrote:

> In general: no.

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

>
> 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
_______________________________________________
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
Raw Message
Bart <***@gmail.com> schrieb am Mi., 18. Juli 2018, 23:36:

> On Wed, Jul 18, 2018 at 1:39 PM, Michael Van Canneyt
> <***@freepascal.org> 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. :)


> >
> > 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
Michael Van Canneyt
2018-07-19 05:59:21 UTC
Permalink
Raw Message
On Wed, 18 Jul 2018, Bart wrote:

> On Wed, Jul 18, 2018 at 1:39 PM, Michael Van Canneyt
> <***@freepascal.org> wrote:
>
>> In general: no.
>
> OK
> I pity the compiler devels, especially in the past with slower hardware.

Yes, it can be time-consuming.

>> 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.
_______________________________________________
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
Raw Message
Op 18-07-18 om 13:39 schreef Michael Van Canneyt:
>
>
> 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.
_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailma
Loading...