Enhancement: Allow adding of additional OST for namespaced SFDX packages..

Issue #1534 resolved
Justin Julicher created an issue

I don’t think SF retrieves all information about namespaced 2GP classes so when you have say @TestVisible methods then IC doesn’t pick it up in OST generation.

So it would be good if we could add the OST from those projects for additional lookups that would be great.

Comments (12)

  1. Scott Wells repo owner

    Justin, are you specifically talking about 2GP unlocked packages with namespaces or 2GB managed packages? If the latter, I don't think that those @TestVisible symbols are accessible, are they? Only global visibility symbols should be accessible in managed packages...

  2. Justin Julicher reporter

    Actually my bad. I had this the wrong way round. I should remember not to post things like this at the end of a long day!

    It’s actually for classes which are in a non-namespaced package which I haven’t downloaded. I don’t include these in my main repository (as they are are a separate one).

    So Dev console resolves this but IC doesn’t. e.g.

    TRIGGERS_THAT_HAVE_RUN is a private map that is @TestVisible but not in the local source. IC will resolve all other public/global variables/methods but not @TestVisible ones.

  3. Scott Wells repo owner

    Gotcha. That's actually much easier assuming it's just conveying @TestVisible symbols from installed, no-namespace unlocked packages into the OST. Probably won't happen in the next few weeks, but I'll keep it on my relatively near-term backlog.

  4. Justin Julicher reporter

    Just a quick question - is there anyway to exclude unlocked package metadata from the metadata retrieval dialog?

  5. Scott Wells repo owner

    Not explicitly. The expectation is that typically that dialog is filtered to show subscribed metadata, but I guess if you're wildcarding ApexClass it might be an issue. If that's something you'd like to see, please log a separate enhancement request and I can take a look at it as well.

  6. Scott Wells repo owner

    Justin, here's a build that should convey annotations into the OST stubs and respect the @TestVisible annotation for purposes of accessibility/visibility. Do you mind installing it, regenerating your OST, and letting me know if it provides what you need (without introducing other issues)? I'd like to get a bit of feedback before I lump it in with another small set of changes that I have ready for release. Thanks!

  7. Scott Wells repo owner

    Okay, great! Thanks for verifying. I'll test it a bit more but will plan to include it in the next build.

  8. Scott Wells repo owner

    Delivered in 2.1.0.6. Justin, it's worth updating for other fixes. Feel free to regenerate your OST again if you'd like as there were a few other fixes in OST regen in this release aside from conveying the annotations.

  9. Log in to comment