So, we're trying to convert out metadata into packages and namespaces, and it's proving to be difficult.
Right now we have 2 different domains and we've created a namespace for each of those domains (gui_tkt, and gui_fin) respectively. Both are isolated pieces of development, and thus both might have their own respective triggers on the same objects, etc. Although one trigger per object is sometimes considered best practise here, we're getting into spaghetti code here, and it's now difficult to manage.
In addition to the above, we have a lot of existing configuration with data. Ideally we would namespace these objects/fields too, however that would then require a data migration since we'd have duplicate fields, etc. Our solution up until now is to have a package without a namespace for these fields.
The issue we've seen is that we can make a namespaced package with a dependency on non namespaced package, however we get deployment errors when deploying the namespaced package to a sandbox org. When developing, we develop in a namespaced SFDX org, and after deploying the "Base" non namespaced package above, all fields/objects are recreated (from the base), however it looks like they're created in the namespace of the dx org too.
When deploying the non namespaced package to an org, all config gets created as expected, however when deploying the namespaced package that depends on the non namespaced, we start getting errors that the fields don't exist (which they do). Anyone have any thoughts on this?