Switch between dev org and scratch org without deleting sfdx-project.json
Currently IC seems to operate in either traditional mode or DX mode, and the only way to switch to traditional mode is to delete your sfdx-project.json file. This does not work out so well, because we often need to use the same project to look at scratch orgs and dev orgs. It is not always one or the other. It would be simpler if you could switch modes based on the org you are connecting to. If a scratch org, use sfdx force:source, else use sfdx force:mdapi.
Comments (6)
-
repo owner -
reporter Hey Scott. I guess the assumption here is that the tool itself handles the nitty gritty of converting to the right code format for the target org. It is unfortunate that you cannot today use sfdx force:source:push to a dev org. If you could, that would make things much simpler. But that aside, the way I envision this working is rather simple: if I am connecting to a traditional dev org and I am using the newer sfdx file format, convert it to the mdapi format transparently.
I realize this is really more of an sfdx problem to solve than an IC problem to solve. Again, they really should just focus on allowing one to use the new file format on dev org, rather than only working on scratch orgs. That is a pretty significant limitation. When I've asked here, if memory serves the answer is kind of a Not Yet Supported, so I need to ask again more directly to see if it is on the roadmap.
-
repo owner Okay, good. Just wanted to verify that I wasn't missing something. I've been in informal discussions about supporting the new metadata format and source sync API against other org types. I don't know where that is on the backlog. My suspicion is also that it's not close. Assuming that's the case then I agree that having the IDE bridge between the two org types seamlessly is a solid goal. I'll follow up with some of the SFDX team members and see whether/where this is slotted in. Assuming it's not, I'll keep this enhancement in place for the work required to make IC support this itself. Thanks for clarifying!
-
reporter Sweet. Thanks as always Scott.
-
repo owner - changed status to resolved
Issue tracker grooming. If this is still an issue, please feel free to reopen, ideally with a concrete reproduction scenario.
-
repo owner - changed component to Metadata Deployment/Retrieval/Removal
- Log in to comment
Hi, Michael. Nice to hear from you again. I'm curious about how you'd see this working. The metadata format/layout for SFDX is quite different from the traditional metadata format/layout. AFAIK (and please correct me if I'm wrong) you can't deploy SFDX source-form metadata to a non-scratch org without first converting it to metadata-form, and vice-versa.
I do plan to add features to IC to facilitate bidirectional conversion between these two forms at some point and would also allow you to perform deploy/retrieve operations against non-scratch orgs from SFDX projects where IC would be responsible for the intermediate conversion, but that's not the same as having a project that's both an SFDX project and a traditional project. If that's not the general use case you're thinking about, can you describe how you'd like to see this work?