0
votes

After having to update Indy to version 10.6.2 in Delphi XE5, it is returning the error below in some of our projects, where we have not found solutions for it.

F2051 Unit IPPeerClient was compiled with a different version of IdTCPConnection.TIdTCPConnection <

This error occurs when I use the TDSRestConnection component.

Detail, the unit cannot be deleted. If I try to delete it from uses, Delphi adds it again, returning the error.

We have tried in several ways to solve the problem, but from all attempts we run into the error in the compilation of TDSRestConnection, apparently it is not supporting this version of Indy.

1
The IPPeerClient unit is part of Embarcadero technologies, including DataSnap, which internally use a private copy of Indy. Upgrading the public version of Indy is not supposed to affect those techs. Sounds like a bug on Embarcadero's end if upgrading Indy is breaking TDSRestConnection. You should report this to Embarcadero. Though XE5 is quite old, so they are not going to do anything with this unless it also affects modern versions. Unless it has already been fixed. Is upgrading beyond XE5 an option for you?Remy Lebeau

1 Answers

0
votes

You are right, @Remy Lebeau.

I got in touch with the people at the Embarcadero and they suggested the following: The most direct, if possible, would be to bring the project to 10.4.x.

Alternatively:

  1. understand that the REST Framework is "just" a facilitator for REST calls. As you well noted, the one who executes the call at the end is Indy's infrastructure. That said, you can build any call directly with Indy, see the post below. Yes, it's a little bit more work:

https://github.com/zekiguven/Delphi-REST-Client-1-of-2

  1. use another REST framework (several open source for easy migration / refactoring):

https://github.com/fabriciocolombo/delphi-rest-client-api

https://github.com/viniciussanchez/RESTRequest4Delphi

https://github.com/andrea-magni/MARS (it has both server-side and client-side)