Pushing class changes to another connection while using package folders
Data IC build nr: 20181105213935
IntelliJ IDEA 2018.1.3 (Community Edition) Build #IC-181.4892.42, built on May 8, 2018 JRE: 1.8.0_152-release-1136-b38 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0
Bug description When using packages to organize our classes, we can deploy and pull to the current connection. When we try to pull from another connection (like the production org) it will also work just fine.
But when we try to push a change to production (the order connection) we get the error
...\src\classes\incommingapi\ApiCoupon.cls Error:(1, 1) File name mismatch with class name: ApiCoupon
We have around 500 classes, including test classes, and these virtual folders are a great help to keeping things organized and we hope that this bug can be fixed.
Comments (8)
-
repo owner -
reporter This is a traditional project.
-
repo owner Okay, thanks. Can you please explain how the project is organized based on the statement "When using packages to organize our classes"? In particular, can you specify the configured content root(s) and source root(s), and also how your metadata subscription is configured for the project?
-
reporter Here you can see me trying to put a bit of organization into our classes with the packages, grouping classes together in a package.
All the configurations you ask for are left as default. It is a project with a single connection to our sandbox and also only the source of the sandbox. The meta-data files are located in the same directory as the class file.
Every class file in SF is synced locally and is subscribed to according to my package.xml<types> <members>*</members> <name>ApexClass</name> </types>
We push to production by adding a new connection to the production org, once that is done we select it in the deploy dialog (ctrl + alt + shift + F10).
This is when we receive the error.To clarify:
I am not sure if I understand your terms correctly
I assume the source root is my src folder with everything in it but i am not sure what the difference is with a content root
I am also not sure if I understand the metadata subscriptions fully as you ask -
repo owner Ah, I see. So you're trying to use a more flexible foldering scheme in a non-SFDX project. At this point there are no plans to support that since SFDX itself supports it (though there are admittedly bugs in IC that I'll be addressing soon for SFDX). It's something I considered early on in IC, but it hasn't been on my radar for quite a while for a few reasons, the main one being that the Salesforce APIs don't support that type of organization. You can organize your project into multiple modules, each with its own
classes
folder, including segregation of product classes and test classes into production and test source roots. You can read more about projects and modules here:http://www.illuminatedcloud.com/support/faq#ProjectVsModule
and content roots/source roots here:
https://www.jetbrains.com/help/idea/creating-and-managing-modules.html
IC will properly handle deployment and retrieval of files in the same project/module across multiple content/source roots, so this may be another option for how your can organize your metadata more discreetly.
-
reporter That is an interesting approach, I will be looking into it.
Thank you for your help Scott
-
reporter - changed status to resolved
-
repo owner - changed component to Metadata Deployment/Retrieval/Removal
- Log in to comment
Nils, I'm happy to help but I'm not sure I understand the problem completely. To help my understanding, let me start by asking whether this is a Salesforce DX project or a traditional project. I will then have other questions based on the answer to that one. Thanks!