resolving namespace conflicts via project ? [Re: alternative aliases [Re: [fpc-devel] Re: [fpc-pascal] Re: Ideas for namespace implementation]]

Martin fpc at
Tue Jul 27 13:42:06 CEST 2010

Reffering to

 From previous mails, a further issue has shown up.

If 2 packages come with the same default namespace (e.g "zip") and 
should both be used within the same project, then the user must rename 
one of the 2 namespaces.

That however would mean that within this project, the user uses a 
different namespace to refer to one of the 2 units.
If the user attempts to compile the project on a different PC (or 
publishes it), then the same namespace changes would have to be expected.

It may therefore be desirable to find a way to remap this namespace from 
within the project (rather than changing the config of the package.

The problem is to find a way for the project to identify each of the 2 
conflicting packages in a safe and unique way, without referring to the 
location/install-path of the package (the install path is local to a PC, 
and different on others)


Due to the missing concept of one "package unit", that stores settings 
for all units in that directory, there is also a question where to store 
such settings.
Currently one way would be to replicate them to each and every unit in 
the directory => a real bad idea, because nothing gurantees that the 
setting will be equal for the whole package....

If there was one "package unit", that could be used to store setting for 
all units, a unit could have a UUID in addition to a namespace => Then 
the project could map a new alias to such a UUID.


More information about the fpc-devel mailing list