“Deploy all modified files” checkbox doesn’t work as expected

Issue #1506 resolved
Ilija Pavlic created an issue

With “Override Save All action” checked and “Deploy all modified files” unchecked, all files are still deployed (SFDX). This makes it impossible to develop in parallel.

Comments (7)

  1. Scott Wells repo owner

    When you say SFDX, do you mean against scratch orgs or against a non-scratch org using an SFDX-based OAuth connection? If the former, Deploy all modified files isn't relevant. When you save/deploy, IC uses the CLI's force:source:push which brings the scratch org up-to-date relative to the local project source.

    If you are talking about non-scratch org development, though, I'd need to see a debug log of this occurring. Let me know if that's the case and I'll provide instructions about how to get the desired info.

  2. Ilija Pavlic reporter

    It’s a scratch org. Visual studio code apparently can deploy single files, which is also what the help text on the option promises.

  3. Scott Wells repo owner

    I'll investigate how VS Code deploys single files to scratch orgs since I'm pretty certain it just uses force:source:push as well. If it's using some other command, I can certainly implement the same thing.

    I'll update the tooltip text and user guide description to clarify which options do not apply to development against scratch orgs.

  4. Ilija Pavlic reporter

    It’s possible that you are right. In that case, VS Code doesn’t autosave files that are open, whereas WebStorm autosaves all files before starting force:source:push. This then causes errors even for files that are not manually saved.

  5. Scott Wells repo owner

    That's correct. It's pretty standard in the JetBrains IDEs for Save All to be mapped to the standard Save keyboard shortcut vs. just Save in most tools. Similarly by default when the IDE frame loses focus, all files are saved from the IDE to disk. In fact, there are times when it performs a Save All when you wouldn't necessary expect it to do so, e.g., when a file no longer has changes relative to version control. Unfortunately I don't see removing a Save All before performing an SFDX Push changing because it's so intrinsic to the behavior of the base IDE. Even if you remapped it to save just the current file, there are too many situations in which local changes would be committed to the filesystem that it would be (nearly?) impossible to end up with a behavior where you (the user) strictly control exactly which files are committed to local disk and when.

    It's funny...I guess from using JetBrains IDEs for so long (>15 years), to me this is just how things work. However, based on this discussion I did a bit of searching and now see that JetBrains' behavior isn't necessarily to everyone's taste, e.g.:

    I really apologize that it doesn't meet your expectations/preferences, but unfortunately I can't see changing this core behavior.

  6. Scott Wells repo owner

    Resolving as this is working as expected. The behavior can be changed by remapping Ctrl+S/Cmd+S to Save instead of Save All if desired.

  7. Log in to comment