after updating Hydra I ran our build script and the build failed.
Unit ‘uHYCrossPlatformInterfaces’ not found.
I then opened the Delphi IDE to investigate further. When opening the IDE I had a bunch of errors, such as:
We use TFS for Version Control. Files are read-only and must be checked out for editing.
I checked out one of the many files it was complaining about and restarted the IDE.
I then understood what was hapenning. The Hydra units have been renamed, and I guess when a project is loaded or file is opened in the IDE you will try to automatically replace any old Hydra Unit names with the new names.
uHYModuleManager → Hydra.VCL.ModuleManager
uHYIntf → Hydra.VCL.Interfaces
uHYCLRWrappers → Hydra.Managed.Wrappers
Can you please provide a listing of the old/new unit names?
Is there a way to deactivate the automatic unit name replacement? If not, you should check if the file is read-only.
Pls check Breaking Changes page.
By other hand, this list is provided in Hydra for Delphi\Source\IDE\uHYIDERenamer.pas also.
it checks uHY in uses section and replaces detected units according to list.
if uHY isn’t found - it just ignores file.
however, you can update Hydra for Delphi\Source\IDE\uHYIDERenamer.pas as
procedure RenameUses(Project: IOTAProject);
begin
exit; // added
end;
after this, launch C:\Program Files (x86)\RemObjects Software\Build\install_HY.cmd and package will be recreated.
it is a good idea.
by the way, we have C:\Program Files (x86)\RemObjects Software\Hydra (Common)\Bin\HYConvert.exe that does renaming to similar to IDE wizard. you can use it.
@EvgenyK
thanks for all the help.
The HYConvert tool was a life saver. I was now able to compile using Hydra 6.4
BTW, I think it works better if the unit renaming functionality is executed on demand rather than automatically whenever a project is opened. Our project is very big and it will probably take at least a couple of sesconds to scan all units for old hydra unit names. But this only needs to be done once.
Therefore having a command you can execute on demand in the IDE works much better, the more complex the project.
I think, it is possible to create persistent settings in Hydra via Hydra_user.inc as it was done in RO/DA.
as a result, you can set up renaming feature once and it will be valid for all future versions of Hydra.
this feature works for Remoting SDK for Delphi/Data Abstract for Delphi only.
I’m thinking about adding this feature to Hydra.
setup will create this file if it isn’t present and it will be never touched by setup again.
as a result, content of this file will be kept between [re]installations and this file can contain {$DEFINE} and {$UNDEF} directives.
this file will be included into Hydra.inc as last line so it can override some default directives