View Issue Details

IDProjectCategoryView StatusLast Update
0035281FPCFCLpublic2019-03-27 15:50
ReporterBart BroersmaAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Platformi386OSWindowsOS Version10
Product Version3.3.1Product Buildr41788 
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.

Reasons:
1.
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.

2.
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.

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

4.
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: http://lists.freepascal.org/pipermail/fpc-devel/2019-February/040319.html
TagsNo tags attached.
Fixed in Revision41797
FPCOldBugId
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2019-03-26 22:26

administrator   ~0115067

Did as you suggested.

Issue History

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