dxatscale / sfpowerscripts

A build system for modular development in Salesforce
https://dxatscale.io
MIT License
213 stars 98 forks source link

[Question] Aliased Packages are choosing the first directory when main/default is used as source path #1374

Closed jhawk-4 closed 1 year ago

jhawk-4 commented 1 year ago

Describe the question We have a directory structure in our aliased source packages that is similar to the following.

packageName
|__org1
    |__main/default
        (source folders/files)
|__org2
    |__main/default
        (source folders/files)

There is no default aliased directory, so I would expect this to fail with the error that no default directory exists when a deployment happens to org3, but instead it is picking the org1 source files and attempting to deploy those. It appears because the aliased packages are using main/default in their folder structure that it is getting matched as "default" in the InstallPackage.ts class (line 147)

I think what we need to do is change our folder structure to the following

packageName
|__main
    |__default
        (source folders/files)
    |__org1
        (source folders/files)
    |__org2
        (source folders/files)

Just looking for confirmation that the issue is in our folder structure and not a bug.

azlam-abdulsalam commented 1 year ago

@jhawk-4 The second option is the right one. Spot on!