Request: deprecate the XMLREG implementation of TReg(istry)IniFile (and add platform hint directive)
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
I 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 reproduce:
Try to read/write any key/value pair using TReg(istry)IniFile on a non-Windows platform. It will either return nothing or crash.
Additional information:
This 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
Mantis conversion info:
- Mantis ID: 35281
- OS: Windows
- OS Build: 10
- Build: r41788
- Platform: i386
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 41797 (#efd77fdc)
- Target version: 3.2.0