This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 255563

Summary: Sass recompiling on branch switch
Product: web Reporter: adam_felix_fps
Component: CSS Preprocessors (SASS, LESS, ...)Assignee: Tomas Mysik <tmysik>
Status: NEW ---    
Severity: normal CC: gajdusek, ovrabec, tmysik
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description adam_felix_fps 2015-09-25 11:04:06 UTC
I have my project set up to recompile on save which works fine when I save :)  Unfortunately there is a side effect that a recompile is also being triggered on git branch switch.  This means every time I switch branch I have to do a git checkout -f to remove the newly compiled files before I start working on the branch.  I would have thought that compile on save would only do that - compile when I have explicitly clicked save as opposed to when files have changed outside the IDE...  Is there any way to avoid this?  It has become annoying to the point that I have turned off compile on save for now.  I saw other bugs which asked for a manual compile function too.  While this could be useful it would be nice if compile on save could work as advertised thus avoiding the need for that.

Cheers

Adam
Comment 1 Tomas Mysik 2015-09-25 11:40:56 UTC
Taking over. Well, it works as designed so the file is recompiled whenever it changes. Imagine that you do a git pull - do you expect files to be recompiled or not? Anyway, adding Ondra to CC, perhaps we could somehow improve the behavior for scenario you described.

BTW, in NB 8.1, there is a button for all files recompilation (in Project Properties dialog) so it could be helpful for you.

Thanks for reporting.
Comment 2 adam_felix_fps 2015-09-25 13:58:22 UTC
I can see your point regarding a pull.  I think the confusion comes about because the feature is called compile on save when really it is actually compile on change... If there was someway to have the option only to compile on save I think that might be good.  As for the recompile all that doesn't work in my case as there is actually only one stylesheet and everything else is a partial so I need it to recompile the main stylesheet whenever a partial is altered.