Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Force Rebuild button - or : Buggy cache system

  1. #1
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    4,080

    Force Rebuild button - or : Buggy cache system

    Hi Paul,

    can you add a "Force Rebuild" button to Arduino ? I know, the official Arduino team would be a better addressee, but we all know, that they ignore user-requests.
    I know Mr Banzi calls Arduino a "full IDE" but it's more a joke than IDE... instead improving it, it becomes worse.

    The caching is buggy. It does not recognize changed #defines for libraries that are built before. It's very annoying and there's no way to tell the system that it needs to rebuild all.
    It leads to baffling situations.

    Please add a "make clean". Or something similar.
    Last edited by Frank B; 09-12-2017 at 06:44 PM.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,144
    Yes, I believe they broke something starting with 1.8.2. It worked much better in Arduino 1.8.1. For now, if you're working on libraries I recommend using Arduino 1.8.1 to avoid long build times.

    You can force a rebuild all by changing any of the Tools menu settings, like CPU Speed or Optimization.

  3. #3
    Senior Member
    Join Date
    Jul 2014
    Posts
    1,379
    Quote Originally Posted by PaulStoffregen View Post
    Yes, I believe they broke something starting with 1.8.2. It worked much better in Arduino 1.8.1. For now, if you're working on libraries I recommend using Arduino 1.8.1 to avoid long build times.

    You can force a rebuild all by changing any of the Tools menu settings, like CPU Speed or Optimization.
    I second Frank.
    Paul, following your suggestions means twice full build, (twice going for a coffee) one moving away from desired configuration (say lower speed) and one to return to desired configuration (or do I misunderstand something?)

    ALL IDE's I have worked with have a rebuild all, or clear option.

  4. #4
    Senior Member defragster's Avatar
    Join Date
    Feb 2015
    Posts
    4,685
    It would be nice to have 'Rebuild All' that just assures results you have come from current code - swapping Tools values back and forth is not always quick, or assured you either did enough or set everything back before clicking build. Does swapping CPU versus other items make any effort to rescan device specific libraries on a change? { a full scan is only done on startup AFAIK }

    My system hasn't caught me recently in the few lib changes I've made they seemed to have been picked up - but maybe I do the Tools hacking at the right time. But the IDE change to stop always rebuilding all to 'perfect needed rebuild' has been fluid.

  5. #5
    Senior Member Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    4,080
    During the last days, the defective caching hit me several times. I think I really have to install an old version..
    A Rebuild-button would be the better option.. no developer can say "just use an old version".. his boss will kill him ;-)
    I hope there are plans to make it better...

  6. #6
    Senior Member KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    2,848
    Been hit with this also. Also still hit from time to time when it can not rename a file as it already exists... With both cases the other solution I do is to exit Arduino and start it up again... Yes sort of a pain, but usually works.

    While on Wish list. - I wish I could toggle Use External editor - as something like in the view menu for specific window... And/Or they would simply listen for file changes and if it happens, either ask (especially if you have outstanding changes) or automatically reload... But sorry off topic

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,144
    Quote Originally Posted by Frank B View Post
    I hope there are plans to make it better...
    I'm pretty sure this a relatively new bug in Arduino. It's almost certainly in the arduino-builder part, which is the one area I haven't ever touched. I've never used Google Go language either, so I'm *really* not prepared to dig into this myself.

    So far, this bug hasn't ever hit me. I've done quite a lot with the latest versions, but almost all on Linux. Maybe this bug only strikes on Windows or Macintosh?

    If we could find a test case, I'm sure the Arduino devs will fix it. But how? Maybe a script that repetitively runs Arduino from the command line?

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,144
    Another option I've considered from time to time is jumping off the arduino-builder ship for Teensy. That would involve a *lot* of work to put the old 1.6.5 Java-based build system back into Arduino's code. But Teensyduino already patches the Java code, so maybe this could be an option. I believe quite a bit better & faster caching could also be done, compared to what arduino-builder needs to do as a separate process.

    But if I go down that path, it means Teensy is likely to slowly diverge from Arduino's build process. It could be a long-term maintenance nightmare. Or maybe not?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •