PCT: compiling programs when CRC of an index has changed

We are using PCT in our CI/CD pipeline and it can compile only necessary programs when the CRC of a table changes. I just noticed that changing an index does not force PCT to recompile programs using that index. A change to an index (e.g. adding a field) changes the CRC of that index but not the CRC of the table and PCT seems to check only table CRC changes.

 

Is there already a workaround for this? I wanted to check this before I start to create one of my own.


  • Gilles Querret (Riverside Software)

    That was requested a couple months ago by another company, but that's currently not handled by PCT. I didn't take time to get into the details of the impact, but that should be easy to implement.

    Selected as Best
  • BTW, it seems that this documentation is not up-to-date: https://docs.progress.com/bundle/openedge-abl-manage-applications-128/page/CRC-calculation.html

     

    According to that document, changes to an index change also table CRC (which is not the case). Index CRC is not mentioned there at all.

     

    There is a KB article that explains that table CRC calculation was changed in version 9: https://community.progress.com/s/article/20245

     

    Extract from that article:

    ...

    Progress versions earlier than 9.x:

    • Include indices in the CRC calculation. 
    • Indexes of a table do not have their own CRCs, a change to an index is considered a change to the table.
    • Index changes affect the the table CRC.
    • Applications that use the modified table do not run without recompiling, even if the index is not used

    Since Progress 9.x

    • Table and index CRCs are separate. Indexes have their own CRCs. 
    • Indexes can be added/dropped/modified without modifying the table CRC.
    • Only applications that use a changed index must be recompiled.

    ...

  • Gilles Querret (Riverside Software)

    That was requested a couple months ago by another company, but that's currently not handled by PCT. I didn't take time to get into the details of the impact, but that should be easy to implement.

    Selected as Best
  • Thanks, @Gilles Querret (Riverside Software)​. Indeed, it seems to be quite easy to implement. In fact, I already implemented the change (using also AI) so that temp-table CRCList includes both table and index CRCs and indices used in a program are extracted from the XREF file. Changed files are pct/compile.p and pct/pctCRC.p.

     

    The only thing I am wondering if I should change also pct/pctCRCExport.p or not. I wasn't sure what the purpose of that procedure is and if something gets broken if it exports also index CRCs.