More graceful handling of old SFDX versions causing IC2 issues

Issue #2097 resolved
Rob Galanakis created an issue

I maintain a number of Salesforce projects but the vast majority are using non-DX structures. I do no work with SFDX directly at all, just through IC. I tried to deploy a DX-enabled one today and got a very obscure error (sourcedeploycommand invalidflagnumericboundserror)- eventually I realized that IC2 is using a system SFDX binary and it is probably out of date. I updated sfdx and the problem went away.

Anyway, this is not really a problem with SFDX, but I’m wondering if 1) it would make sense to bundle an sfdx with IC2, and/or 2) warn if the sfdx version is too old. Maybe these aren’t worth the effort but I did want to mention it since I suspect it’s a rare, but very frustrating, UX, and it looks like IC2 is the problem.

Relatedly- once I figured it was an SFDX problem, or at least that I should try to repro by trying directly in SFDX as per this issue https://bitbucket.org/RoseSilverSoftware/illuminatedcloud/issues/2028/sfdx-error-on-deploying-changes-related-to I was hoping to get the literal sfdx CLI command so I could run it myself. Is there a way to get that? I figured if I could enable DEBUG logging but it isn’t clear what loggers I need to enable it for. Could be a nice thing to add somewhere in the docs (I could not find it, if it’s there).

In any case, thanks!

Comments (3)

  1. Scott Wells repo owner

    Hi. I don't plan to bundle the CLI with IC2 for a number of reasons, the primary one being that the CLI distribution these days is huge, easily 3-4x the size of IC2 itself, though also because there are users who prefer to stay on a specific build of the CLI, either historical or beta.

    You can have IC2 log all CLI command-line invocations in the Messages tool window by enabling the following option:

    Issue_2097.png

    which will output something like the following:

    Issue_2097_2.png

    If you wish to see even more details, you can always enable the respective features for debug logging and review the idea.log file.

    Overall I recommend that all users stay up-to-date on the underlying JetBrains IDE, the IC2 plugin, and the Salesforce CLI, though support is provided for a limited window of older IDE versions (currently 2021.1-2022.1). If issues are found in IC2 proper and/or the CLI, the first thing I request is that the user move to the absolute latest before further troubleshooting.

  2. Scott Wells repo owner

    I think that should resolve the request, but certainly let me know if there was some aspect that I missed.

  3. Rob Galanakis reporter

    Thanks- I tried the CLI logging but looked in the wrong window, doh! (I have been using IntelliJ products since 2008, I think this is the first time I ever opened the Messages window). This all makes perfect sense, thanks for the explanations!

  4. Log in to comment