Invalidate cache generated by different Ruby/JSDuck version.
Marshal dump format can change between Ruby versions and although the Marshal has its own version numbers, I get an encoding error when reading the Ruby 1.8 Marshal dump with Ruby 1.9. The parsed source code data structure can also change between versions of JSDuck. To eliminate these problems, a .cache/manifest.txt file is created with the contents like: Ruby: 1.9.3, JSDuck: 5.2.0 The file is then checked to match the current version of Ruby and JSDuck. If the versions don't match, the whole cache is invalidated (all files removed from it). Refs #446
Loading
Please register or sign in to comment