Sign in Join

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

Mailing lists / lazarus / 2010-08

autocomplete without sources

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Bernd Kreuss

Another stupid question from me:

I did just set up an environment for compiling Lazarus from SVN on windows and I got it all working without problmes but there is one little thing I noticed:

I initially installed the 2.4.0 binary installer of the compiler and made sure that the path to the i386-win32 folder is set correctly so I can call the bundled make.exe directly from the command line.

I then checked out the Lazarus sources from the svn and "make bigide" built everything without any problems, I ended up with a Lazarus that would start and compile the empty default Application, although it complained about missing fpc sources during startup.

After a cup of coffee while downloading the fpc sources zip i tried to invoke the autocomplete (ctrl+space), still with fpc sources directory not set and it complained about unit classes not found. This problem went away after pointing Lazarus to the correct FPC sources directory, now everything works.

But this has now left a question mark in my head: is it not possible to distribute units without source code without completely breaking the autocomplete (on any identifier) in the whole unit that uses this closed source unit? I haven't explicitly tried to replicate this with a unit of my own yet but this is what I conclude must be happening: The classes unit is there, otherwise it could not compile the project, only its source is missing, and this will completely break *any* attempt to autocomplete *anything*, even locally declared identifiers. Is this only the case with rtl units because they are somehow 'special'(?) or does this happen with any unit for which there is no source?

Bernd

Reply by email

Razvan Adrian Bogdan
to Bernd Kreuss
Bernd Kreuss wrote 5 lines
But this has now left a question mark in my head: is it not possible to distribute units without source code without completely breaking the autocomplete (on any identifier) in the whole unit that uses this closed source unit?

Last time i checked you needed the sources, Lazarus expects to have the sources not just the compiled units.
Distributing compiled units would also be a problem because the units are processor dependent while the sources might be compiled for multiple platforms and CPUs.
If i remember correctly the Delphi developers also have a plan to make the compiled units independent of the processor but i'm not sure how soon this would happen for FreePascal. Because FPC and Lazarus are OpenSource projects it is probably reasonable to require the sources for every package or component.

Razvan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100809/01f6e2cd/attachment.html>

Reply by email

Bernd Kreuss
to Razvan Adrian Bogdan: Last time i checked you needed the sources, Lazarus expects to have the sources not just…
Razvan Adrian Bogdan wrote
Distributing compiled units would also be a problem because the units are processor dependent

This is of course true. But it is also true for all kinds of closed source software in general.

IIRC I saw some units in the codetools whose names suggested the ability to parse ppu files, so without looking closer into it I simply assumed working with ppu without sources would be an intended feature. Maybe it is planned already and simply not yet fully completed.

Bernd

Reply by email

Mattias Gärtner
to Bernd Kreuss

Zitat von Bernd Kreuss :

Show quoted text 11 lines
On 09.08.2010 15:17, Razvan Adrian Bogdan wrote: > Distributing compiled units would also be a problem because the units are > processor dependent This is of course true. But it is also true for all kinds of closed source software in general. IIRC I saw some units in the codetools whose names suggested the ability to parse ppu files, so without looking closer into it I simply assumed working with ppu without sources would be an intended feature. Maybe it is planned already and simply not yet fully completed.

It is barely started.

Some closed packages do this:
They provide the ppu, the sources without the implementation and set the package compile to manually. This is pretty easy. You can even provide some source help this way.

Mattias

Reply by email

Hans-Peter Diettrich
to Bernd Kreuss: This is of course true. But it is also true for all kinds of closed source software in…
IIRC I saw some units in the codetools whose names suggested the ability to parse ppu files, so without looking closer into it I simply assumed working with ppu without sources would be an intended feature. Maybe it is planned already and simply not yet fully completed.

AFAIK the code resides in the .o files, and the description (interface section items) in the .ppu files.

DoDi

Reply by email