View Issue Details

IDProjectCategoryView StatusLast Update
0035281FPCFCLpublic2019-03-27 14:50
ReporterBart Broersma Assigned ToMichael Van Canneyt  
Status closedResolutionfixed 
Product Version3.3.1 
Target Version3.2.0Fixed in Version3.3.1 
Summary0035281: Request: deprecate the XMLREG implementation of TReg(istry)IniFile (and add platform hint directive)
DescriptionI propose to deprecate the XMLREG (basically the Non-Windows) implementation of both TRegIniFile and TRegistryIniFile.

These classes were introduced to ease porting TIniFile code to the new Windows(95+?) TRegistry implementation. People have had > 10 years time to learn how to use TRegistry now.

Both TRegIniFile and TRegistryIniFile are basically broken since at least r22654 (now over 6 years ago).
The fact that we have not received any bugreports on that IMO proofs that no freepascal user ever used these classes outside a Windows environment.

There seem to be no volunteers to maintain the XMLREG implementation of these classes.

As such maintaining TReg(istry)IniFile becomes a nightmare.

I propose to change the (end of the) declaration of both types into something like this:

end {$ifdef XMLREG}deprecated 'Use TRegistry instead. Will be removed in 4.0'{$endif} platform;

I used the XMLREG define and not {$ifndef Windows}, because it is possible to build the registry unit (when building fpc) using XMLREG implementation.
Steps To ReproduceTry to read/write any key/value pair using TReg(istry)IniFile on a non-Windows platform. It will either return nothing or crash.
Additional InformationThis was also discussed (in a broader contex) on the fpc-devel ML in this thread:
TagsNo tags attached.
Fixed in Revision41797
Attached Files


Michael Van Canneyt

2019-03-26 21:26

administrator   ~0115067

Did as you suggested.

Issue History

Date Modified Username Field Change
2019-03-26 11:00 Bart Broersma New Issue
2019-03-26 21:26 Michael Van Canneyt Fixed in Revision => 41797
2019-03-26 21:26 Michael Van Canneyt Note Added: 0115067
2019-03-26 21:26 Michael Van Canneyt Status new => resolved
2019-03-26 21:26 Michael Van Canneyt Fixed in Version => 3.3.1
2019-03-26 21:26 Michael Van Canneyt Resolution open => fixed
2019-03-26 21:26 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-03-26 21:26 Michael Van Canneyt Target Version => 3.2.0
2019-03-27 14:50 Bart Broersma Status resolved => closed