Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) It does not compile changed files (Read 9016 times)
HCS
Junior Member
**
Offline


Posts: 32
Joined: Nov 14th, 2015
It does not compile changed files
Nov 14th, 2015 at 8:59pm
Print Post  
I have the following project structure:

Project - MainFile.ino
           - Class1.h
           - Class1.cpp
           - Class2.h
           - Class2.cpp

After the update to version 1511.12 it does not compile Class1 or Class2 when I make changes in on of them.

It only works when I set "Compare date and time" to false, but then it takes a really long time to compile.

It copies Class1.cpp to ...\AppData\Local\V.Micro\Arduino\Builds\... but Class1.cpp.d and Class1.cpp.o do not change.

When I change MainFile.ino everything works fine.

Any idea, what I could do?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: It does not compile changed files
Reply #1 - Nov 15th, 2015 at 6:04pm
Print Post  
Thanks for the info.

Please switch on "Visual Micro>verbose messages" and confirm the following:-

1)
If you change the contents of class1.cpp does class1.cpp get recompiled? 
If not then do you see the message "Using previously compiled class1.o"?

2)
Please switch on "tools>options>visual micro>compiler>show build properties" so that you can see the link to the build folder. Then zip and email the contents of the build folder to "info[at]visualmicro.com

3)
If you click one of the "Rebuild" options on the Build menu, does that detect changes correctly?

Thanks
  
Back to top
WWW  
IP Logged
 
HCS
Junior Member
**
Offline


Posts: 32
Joined: Nov 14th, 2015
Re: It does not compile changed files
Reply #2 - Nov 15th, 2015 at 7:30pm
Print Post  
Thank you for helping.

1) it does not show "Using previously compiled file" for the cpp that I have changed, but for all other files.

2) I have sent the mail

3) Rebuild does it correctly

It only happens with the cpp files that are located in the project directory. The main .ino works.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: It does not compile changed files
Reply #3 - Nov 15th, 2015 at 7:44pm
Print Post  
Thanks for all the good info.

It looks like visual micro has determined the file needs to be recompiled but then doesn't do it. I will have to look at why that could happen.

I will look over the next few days. It's working for me so I will try with esp8266 and add some diagnostic messages.
  
Back to top
WWW  
IP Logged
 
John21
Junior Member
**
Offline


Posts: 13
Joined: Nov 11th, 2013
Re: It does not compile changed files
Reply #4 - Nov 16th, 2015 at 1:53am
Print Post  
I'm running into the same problem since I upgraded today. This is for an ESP8266 project. Is there a work around other than doing a rebuild each time?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: It does not compile changed files
Reply #5 - Nov 16th, 2015 at 7:53pm
Print Post  
Hi,

I am having problem replicating the problem.

One change I can make is to allow the "older" library cache to work when you switch of "compare date times". This will help because libraries won't be recompiled unless they change. BUT I would like to find the issue with the new system because the older system always compiled every local sketch file. This is especially slow for esp8266 (which is good but  slow to compile) and also affects larger projects with many source files.

Can you please send me an email with the url to the esp8266 boards you have installed and also zip your sketch + any libraries you have installed (mydocuments\arduino\libraries)

Email to info[at]visualmicro.com

Thanks
  
Back to top
WWW  
IP Logged
 
John21
Junior Member
**
Offline


Posts: 13
Joined: Nov 11th, 2013
Re: It does not compile changed files
Reply #6 - Nov 17th, 2015 at 4:31pm
Print Post  
Tim@Visual Micro wrote on Nov 16th, 2015 at 7:53pm:
Hi,

One change I can make is to allow the "older" library cache to work when you switch of "compare date times".

Can you please send me an email with the url to the esp8266 boards you have installed and also zip your sketch + any libraries you have installed (mydocuments\arduino\libraries)


I set compare date times to false and now it's working the way it did before. It's faster than a full rebuild, and it's building my changes.

Here is the URL I have for optional boards:

http://arduino.esp8266.com/stable/package_esp8266com_index.json,https://dl.dropb...;

It looks like I have them all installed. The target I'm using is this one:

"NodeMCU 1.0 (ESP-12E Module)"

And I'm using Arduinio.cc version 1.6.4. Finally, the changes that were not being rebuilt were in CPP files, not the main INO file.

I'd prefer not to send the sketch, so I'm hoping this will be enough to reproduce the issue. If it's not, let me know and I'll send the sketch to the email address you provided.

  
Back to top
 
IP Logged
 
HCS
Junior Member
**
Offline


Posts: 32
Joined: Nov 14th, 2015
Re: It does not compile changed files
Reply #7 - Nov 20th, 2015 at 1:16pm
Print Post  
When  I set set compare date times to false it also works for me but it is much slower than the previous versions. With two or three changed files it took between two or three seconds, with compare date times = false it now takes at least 8 seconds.

If you have a large project with many files, this is not the right way.

If it's hard to find out, why this problem exists, it perhaps could make sense to make two steps, first enable the old way and then try to find out, why this happens and how to get the new way working.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: It does not compile changed files
Reply #8 - Nov 20th, 2015 at 4:51pm
Print Post  
HCS,

Yes I will be fixing this weekend. 

+ When "compare" is off library caching is not happening at the moment so this is why it takes longer. This will also be fixed.

I think I can use your original compiler example to build a working project so I can use that for testing however it shouldn't be a difficult issue to fix. I stupidly installed the VS Update 1 RC this week which killed my Vs2015 build system. 

It's back up and running again so hopefully the weekend will be productive.

I'll post an update here with the result.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: It does not compile changed files
Reply #9 - Nov 22nd, 2015 at 2:29am
Print Post  
Please try the latest release. hopefully compile works correctly but switch of "compare date/times" should be the same speed as it used to be (sketch code gets fully compiled each build but not libs)

If it's still a problem with the compare turned on please confirm which ide you are using? vs2015?

Thanks
  
Back to top
WWW  
IP Logged
 
John21
Junior Member
**
Offline


Posts: 13
Joined: Nov 11th, 2013
Re: It does not compile changed files
Reply #10 - Nov 23rd, 2015 at 1:02am
Print Post  
Tim@Visual Micro wrote on Nov 22nd, 2015 at 2:29am:
Please try the latest release.


The latest version fixed the problem--thank you! (I edited this message a few times because I didn't test it enough before sending the reply.) I'm using Visual Studio 2013.
« Last Edit: Nov 23rd, 2015 at 1:06am by John21 »  
Back to top
 
IP Logged
 
HCS
Junior Member
**
Offline


Posts: 32
Joined: Nov 14th, 2015
Re: It does not compile changed files
Reply #11 - Nov 24th, 2015 at 12:34am
Print Post  
Thanks for the new version. The problem ist fixed. Switched compare date/times on and it still compiles the changed files. Time is also OK, takes arround two seconds to compile with one or two changed files. Visual Studio is 2013 professional.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: It does not compile changed files
Reply #12 - Nov 24th, 2015 at 12:50am
Print Post  
Great. Thanks for the update
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint