IndySockets / Indy

Indy - Internet Direct
https://www.indyproject.org
455 stars 155 forks source link

Remove used unit WebBroker from IdHTTPWebBrokerBridge.pas #434

Closed uros-ahacic closed 2 years ago

uros-ahacic commented 2 years ago

IdHTTPWebBrokerBridge.pas uses unit WebBroker. It seems to compile just fine without it if I comment it out.

The problem is, that Web.WebBroker.pas (part of Delphi RTL) is compiled with the {$DENYPACKAGEUNIT} compiler directive, meaning IdHTTPWebBrokerBridge cannot be used in a package, just because of the used WebBroker unit.

Is there a reason for this? Can the unit WebBroker be removed from the uses section?

rlebeau commented 2 years ago

I don't know, as I didn't originally write this unit. If it compiles fine without WebBroker in the uses clause, then great. But that would have to be tested in older IDEs to make sure it still works (or at least to find which is the 1st version that it can be removed from) before committing this change.

uros-ahacic commented 2 years ago

I actually tested this in Delphi 7 with Indy that came with it, the unit WebBroker is already in the uses clause of IdHTTPWebBrokerBridge.pas and it still compiles if I comment it out. I can also confirm, that it compiles without the unit since (and including) Delphi 10.2 for sure. Between 7 and 10.2 I cannot say, but it seems like the unit was never really needed. What do you think?

rlebeau commented 2 years ago

Sounds good to me. I've made the change.