More efficient offline symbol table management for code

Issue #2275 new
Mark Mindenhall created an issue

On our team we have devs that are frequently working only on code changes, usually across multiple DX packages. For example, we have a dev-common package that contains shared code/utils, and a bunch of more specialized packages (event consumers, event publishers, functionality built around 3rd party apps, etc). So a common need would be for someone to do some work in a lower level package (such as dev-common), then reference those changes from a higher level package/module that depends on dev-common. For this to all work correctly (i.e., no red code in the IDE), the developer would need to:

  1. Make the changes in dev-common, and push them to the current scratch org Connection
  2. Regenerate the offline symbol table from that scratch org.
  3. Now when working in the higher level package (which shares the Connection), the code changes made in dev-common are visible.

In this workflow, a “Full” offline symbol table re-generation is required in step 2. However, the only “out of date” items in the offline symbol table are the code changes made in dev-common. Therefore, I’m wondering if it would be possible to update the offline symbol table in a more efficient way. Some possibilities that come to mind:

  • If possible, add an option to refresh the offline symbol table for Apex code only (i.e., add a button for “Apex” alongside “Full” and “SObjects” after selecting Tools → Illuminated Cloud → Generate Offline Symbol Table…).
  • Beyond that, it would be awesome if there was a way to detect code changes that were pushed to the scratch org and automatically refresh them into the existing offline symbol table.
  • And the ultimate way to do this would be that if I make code changes in a package that has a Connection, my changes result in the offline symbol table being modified locally. For example, when I change code in dev-common, the offline symbol table for the Connection will be updated. I can then switch to the higher level package/module that shares the same Connection, and immediately see my changes reflected.

Comments (2)

  1. Mark Mindenhall reporter

    With regard to this bullet point:

    And the ultimate way to do this would be that if I make code changes in a package that has a Connection, my changes result in the offline symbol table being modified locally. For example, when I change code in dev-common, the offline symbol table for the Connection will be updated. I can then switch to the higher level package/module that shares the same Connection, and immediately see my changes reflected.

    I should have mentioned that all of the source/metadata for our org is in a single github monorepo. We have folders at the top level that are DX projects, each with a single DX package. We create a single IC2 project for this repo, and the DX project/package folders are IC2 modules. So all of our code is in this single github repo, which means that it would be possible to build the symbol table by walking through the local modules rather than pulling everything from the current Connection.

  2. Log in to comment