Cmd+S to save isn't working in SFDX.

Issue #731 resolved
Javier García Manzano created an issue

Hi,

After testing a lot, I found what seems like a bug. With the normal flow, saving individual files works as expected, if I press Cmd+s, the file is saved and automatically deployed to the SF server.

On the other hand, with sfdx orgs, this doesn't happen and I have to either select the Save all option in IC or explicitly click push.

I recorded a small video of the bug. Even tho it's very low quality, you may be able to appreciate what I mean. When I press Cmd+S the menu file on the top left corner highlights, but nothing happens.

As a heads up, the .forceignore is empty :)

Comments (7)

  1. Scott Wells repo owner

    Javier, there's an SFDX-specific setting that defaults to off for push-on-save (and create/delete/rename/move):

    IC_SFDX_Settings.png

    Can you verify that Save is checked? Also please verify that in the Validation and Deployment tab both Override Save All action and Deploy on save are checked.

  2. Javier García Manzano reporter

    Yeah, the four new sfdx checkboxes are checked, but I did have the Override Save All action unchecked on purpose, because I wanted to save them individually and not all. On previous versions it wasn't necessary to check it, is it now?

    Screen Shot 2017-10-05 at 22.57.04.png

    Screen Shot 2017-10-05 at 23.00.12.png

  3. Scott Wells repo owner

    You want Override Save All action checked but not Deploy all modified files. The former just ensures that it pushes/deploys every time you save even if IntelliJ doesn't think anything has changed. The latter decides which file(s) are pushed/deployed.

  4. Javier García Manzano reporter

    I tried this configuration you just mentioned, but sfdx orgs are still working differently than the old orgs. My test was the following:

    1. I edit two files in the old org, then save the first, once it's deployed, save the second, and the second gets deployed . Screen Shot 2017-10-05 at 23.10.50.png

    2. For the other test, I edit two files in the sfdx org, and when I save the first... suddenly both are deployed, not just the first. Screen Shot 2017-10-05 at 23.12.07.png

    I imagine the reason why there are 4 components pushed and not 2 is because both apex classes go with their corresponding .xml.

  5. Scott Wells repo owner

    In Salesforce DX the push operation pushes all local changes to the org. You don't get to tell it which subset to push. Same with pull. The option to deploy all modified files only applies against traditional orgs where IC is responsible for deploying and retrieving the metadata and not the Salesforce DX CLI.

  6. Scott Wells repo owner

    Oh, it's not a hassle at all, Javier. My guess is that the transition to Salesforce DX is going to be a conceptual shift for most folks. I'm going to resolve this now since it seems to be working as intended for you. Let me know if you run into anything else!

  7. Log in to comment