Allow package from same namespace to be added to the OST

Issue #1933 new
Davin Casey created an issue

In 2GP, we can have multiple packages that share the same namespace. There is the possibility to share Apex between these packages using the @NamespaceAccessible annotation.

This works great, except in the scenario where we have our base & extension packages in different repos / projects. When I generate the OST for my extension package, it obviously cannot see the shared apex methods & properties from it’s base package as that codebase is in a different project.

It would be great if we could ‘import’ a secondary codebase (base package) & have any @NamespaceAccessible methods & properties added to the OST of the current project (extension package).

One option is to house both packages in a single repo / project which SFDX & 2GP does support, but there are reasons why some people won’t want to do this. For example, we may want to share access to our extension package repo while keeping our base package private as it contains as core IP.

Comments (1)

  1. Attila Hajdrik

    We are in the same situation, to speed up dev time I’ve 1 repo with all the package sources in different folders pkg1, pkg2, pkg3 so it makes it easy to work with source based development, but obviously it is hard to scale to more devs, but so far works, but it would be nice to figure out a way on how this could work either with plain SFDX or with IC2’s help…

    We use a helper script that we do before release that copies from this single repo to the multiple local repos all the changes, pkg1 → ../../real-pkg1 and then we can create a PR with the changes in a “clean” way.

  2. Log in to comment