Files not deploying on save

Issue #534 resolved
Alex Jung created an issue

Updated to the latest version (1.7.8.0) and experienced some issues.

Upon restarting, it said my module was configured incorrectly. Clicking around, I noticed that my connection reset the login URL (to login.salesforce.com vs my custom one).

Once I changed that back, I am able to connect, but it appears that I'm unable to deploy files automatically upon save. At first I thought it was limited to Aura bundles, but i think it's any file (since I just tested an apex class).

See attachment for "Validation and Deployment" tab settings for the connection.

Comments (17)

  1. Scott Wells repo owner

    Hi, Alex. Sorry for the issues. I've been trying to make the upgrade experience as seamless as possible, but some configs may have drifted in a way that doesn't upgrade smoothly. I'm glad to hear that the module validator helped to get you back into a decent state.

    As for the deploy-on-save behavior, can you check the Override Save All Action option? It may prompt you to copy the default keymap, so just allow it to do that. That should provide an optimal deploy-on-save behavior. Please let me know if that doesn't correct the issue for you, and of course let me know if there are other issues from the update as well.

  2. Alex Jung reporter

    Thanks, that appears to have made it so that it deploys (all modified files) on save.

    I do have a question, though... What changed? I think i preferred the previous behavior of deploying single files at a time on save (e.g. if I'm working on a file and left it incomplete b/c of a dependency in another file). Is there a way to get that back? If not, then this is infinitely better than not deploying anything on save, but I remember turning it off pretty quickly when this feature was released b/c it kept error-ing out.

  3. Scott Wells repo owner

    Honestly, I'm not sure. It's possible that I introduced a bug in the deploy-on-save behavior when that option isn't checked. Because most users (myself included) keep that option checked I didn't test with it disabled much. Let me do a little investigation to see if I did introduce a regression there. Assuming I did, I'll make sure to fix it in a near-term patch. I'll keep this issue open to track that work.

  4. Scott Wells repo owner

    Alex, I just tried deploy-on-save with Override Save All Action disabled and it's working for me. I certainly understand that it's not working for you, though. Would you mind changing back to your preferred configuration temporarily and capturing some debug logs for me? To enable debug logging in the right place, please add the following under Help>Debug Log Settings:

    #com.illuminatedcloud.intellij.builder.ForceComBuilder
    #com.illuminatedcloud.intellij.builder.ForceComToolingApiDeployer
    #com.illuminatedcloud.intellij.builder.ForceComMetadataApiDeployer
    

    After you reproduce the issue, please grab your idea.log using Help>Show log in Explorer/Finder and send that to me...minimally the portion associated with the attempted deployment. Hopefully that'll shed some light on why this is happening.

  5. Alex Jung reporter

    Hey Scott,

    I had the debug log settings still in there from the last issue :). Unfortunately, I don't think they'll be of assistance. I see a block of statements related to a deploy I made prior to the settings change.

    However, after I turn off override save all action, I added line breaks and saved. No deployments and after each time, I do not see anything add'l in the debug log (other than a Server License validation check which i think showed up when i made the settings change). will attach shortly...

  6. Scott Wells repo owner

    That's bizarre. So here's what I see in my log when I type Ctrl+S when configured the way you want:

    2017-02-08 13:45:46,388 [1114569]  DEBUG - .IlluminatedCloudSaveAllAction - Checking to see if the overridden Save All action is active. 
    2017-02-08 13:45:46,389 [1114570]  DEBUG - .IlluminatedCloudSaveAllAction - The overridden Save All action is not active. 
    2017-02-08 13:45:46,389 [1114570]  DEBUG - tellij.builder.ForceComBuilder - Asked to build the following files for buildEventType=SAVE, bulkDeploy=false, forceDeploy=false: {file://C:/Users/Scott/dev/projects/IlluminatedCloudTestProjects/df16/src/classes/ShoppingListControllerTestUtil.cls}. 
    ...
    

    If you want to see the results of the first two lines, you can add the following class for debug logging as well:

    #com.illuminatedcloud.intellij.builder.IlluminatedCloudSaveAllAction
    

    The only thing that comes between "The overridden Save All action is not active" and "Asked to build the following files..." is the actual IDE event handler that's called when file contents are changed. That's not currently instrumented for debug logging because so little happens there, but I think to understand what's happening to you, I may need to add a little additional logging there.

    Let me do that and I'll post a build here that's exactly what I released this morning plus that debug logging and hopefully after you install it we'll see what's happening (or not happening!) in that area. What's odd is that nothing in that area changed as far as I can tell...

  7. Scott Wells repo owner

    Alex, please install this build using Settings>Plugins>Install plugin from disk and generate a new debug log. Hopefully it'll give us more info about what's going on.

  8. Alex Jung reporter

    interesting?

    2017-02-08 15:13:12,153 [ 201579]  DEBUG - tellij.builder.ForceComBuilder -   Illuminated Cloud is not responsible for the file or it's a package.xml file. Ignoring event. 
    

    FWIW, that was for a lightning bundle's .cmp file

    And it probably means something on my end is configured incorrectly, right... lol?

  9. Scott Wells repo owner

    Well, looking at the log, I only see events coming in for IDEA config files, never Salesforce metadata. Lots of changes for workspace.xml (which changes constantly) and then changes for a handful of other XML files. Do you mind making a more substantial change to one of your source files such as a comment and save to see if an event shows up for that change? It's almost like your save action isn't firing.

  10. Scott Wells repo owner

    Wait, I just saw your other comment. So you found an entry for a .cmp file and it still doesn't think it's responsible for it?

  11. Alex Jung reporter

    2 things...

    1) sorry for the confusion, I just meant that I believe those "save events" were all for the same file I was currently editing, which was a .cmp file.

    2) I do not know what changed, but things appear to be working now? The only thing i did was look at the module configuration to make sure that a src & resource folder was defined. I verified that they appeared in the right hand side, and i even clicked on each folder to make sure the appropriate buttons were marked as selected (I did not click on any buttons however).

    However, after I did that things started working again?

  12. Scott Wells repo owner

    Hah! It's magic...we both wanted it to work so badly...it just worked! No, on a serious note, my guess is that after the upgrade, something ended up misconfigured. You already mentioned that was the case and you used the module validator to put things back into a semi-proper state. My guess is that even when that was done, something was still off. By tweaking settings and then tweaking back, I'm pretty sure it put things right. Checking the module config makes sense because that check for whether IC is responsible looks at the way the module source roots are configured. I believe just letting the normal settings save that state "fixed" it.

    Sorry for the disruption, Alex. Please let me know if you find any other issues. Hopefully you'll find the things I added/enhanced in this update more than make up for the temporary annoyance!

  13. Log in to comment