Remote.rodl file stopped generating intf file

Hi

Delphi Berlin up1 with RO here.
I’ve been developing with RO for a while now and ever since I generate interface file at client by:

  1. Creating remote function or structure at server like this:

    const
     __ServiceName ='Control';
    type
    
    
    TRoErro = class( TRoComplexType )
    private
      FAcao: string;
      FErro: string;
      FCodErro: integer;
    published
      //constructor Create( erro : TErro ); overload;
      property CodErro : integer read FCodErro write FCodErro;
      property Erro: string read FErro write FErro;
      property Acao: string read  FAcao write FAcao;
    end;
    
    TRoErroLista = class(TROArray<TRoErro>)
     //constructor Create( erroLista: TErroLista ); overload;
    end;
    
  2. Building the server.

  3. Run server at some address like 127.0.0.1:8091

  4. Right-clicking remote RODL file at client (which points to 127.0.0.1:8091) and clicking at “Update interface file”.

  5. Using the interface at client to run a remote function or use a server structure.

The problem is that after an update (other developer has changed server creating some function and generated client, etc) it simply refuses to update the interface file (without showing any message) at client when I do the steps above.

Should I missed something here? Is there other files or maybe what is inside server file could change generation process? I’ve already checked million times .RODL remote file and it points to right server.

Thanks

Using CodeFirst type server

I’ve might have discovered what happened: does the generation process verifies if the type (TRoErro in the example) is being used in some function parameter or result in order to generate it at client? If It is not being used, it does not generate at client?

BTW, is there a way to force generation of a type that is not used directly by any service? For instance, I return a collection:

  TRoEmpresaColecao = class(TROArray<TRoEmpresa>)
  end;

But the TRoEmpresa is not generated at interface as it is not used at server (only in client).

if some types aren’t used, they are excluded by compiler during compilation and linking.
so they won’t be detected via RTTI in run-time.

Also only used types in parameters or result [and their descendants] are included into RODL.

as I already said, these types (TRoEmpresa & TRoEmpresaColecao) can be excluded by compiler as non-used types.

why you can’t declare this type on client-side if it isn’t used on server-side?

Thanks for the answers. Now that I know this, I could figure out a solution but it was very painful to discover that.

as you could see, we have added empty RegisterCodeFirstService methods with similar purpose - say compiler that CodeFirst service is used otherwise compiler thought that service wasn’t used and removed it during compilation/linking.