Rake v10.0.0 Release Notes

  • "Jim, when will Rake reach version 1.0?"

    Over the past several years I've been asked that question at conferences, panels and over twitter. Due to historical reasons (or maybe just plain laziness) Rake has (incorrectly) been treating the πŸš€ second digit of the version as the major release number. So in my head Rake was already at version 9.

    Well, it's time to fix things. This next version of Rake drops old, crufty, backwards compatibility hacks such as top level constants, DSL methods defined in Object and numerous other features that are just no longer desired. It's also time to drop the leading zero from the πŸ”– version number as well and call this new version of rake what it really is: Version 10.

    So, welcome to Rake 10.0!

    βœ… Rake 10 is actually feature identical to the latest version of Rake 9 (that would be the version spelled 0.9.3), except that Rake 10 drops πŸ—„ all the sundry deprecated features that have accumulated over the years.

    If your Rakefile is up to date and current with all the new features of Rake 10, you are ready to go. If your Rakefile still uses a few πŸ—„ deprecated feeatures, feel free to use Rake 9 (0.9.3) with the same πŸ”‹ feature set. Just be aware that future features will be in Rake 10 family line.

    ==== πŸ”„ Changes in 10.0

    As mentioned above, there are no new features in Rake 10. However, there are a number of features missing:

    • Classic namespaces are now gone. Rake is no longer able to reflect the options settings in the global variables ($rakefile, $show_tasks, $show_prereqs, $trace, $dryrun and $silent). The --classic-namespace option is no longer supported.

    • πŸ‘ Global constants are no longer supported. This includes Task, FileTask, FileCreationTask and RakeApp). The constant missing hook to warn about using global rake constants has been removed.

    • The Rake DSL methods (task, file, directory, etc) are in their own module (Rake::DSL). The stub versions of these methods (that printed warnings) in Object have been removed. However, the DSL methods are added to the top-level main object. Since main is not in the inheritance tree, the presence of the DSL methods in main should be low impact on other libraries.

    If you want to use the Rake DSL commands from your own code, just include Rake::DSL into your own classes and modules.

    • πŸ—„ The deprecated syntax for task arguments (the one using :needs) has been removed.

    • 🚚 The --reduce-compat flag has been removed (it's not needed anymore).

    • 🚚 The deprecated rake/sys.rb library has been removed.

    • 🚚 The deprecated rake/rdoctask.rb library has been removed. RDoc supplies its own rake task now.

    • πŸ“¦ The deprecated rake/gempackagetask.rb library has been removed. Gem supplies its own package task now.

    There is one small behavioral change:

    • Non-file tasks now always report the current time as their time stamp. This is different from the previous behavior where non-file tasks reported current time only if there were no prerequisites, and the max prerequisite timestamp otherwise. This lead to inconsistent and surprising behavior when adding prerequisites to tasks that in turn were prequisites to file tasks. The new behavior is more consistent and predictable.

    ==== πŸ”„ Changes (from 0.9.3)

    Since Rake 10 includes the changes from the last version of Rake 9, we'll repeat the changes for version 0.9.3 here.

    ===== πŸ†• New Features

    • Multitask tasks now use a thread pool. Use -j to limit the number of available threads.

    • πŸ‘‰ Use -m to turn regular tasks into multitasks (use at your own risk).

    • You can now do "Rake.add_rakelib 'dir'" in your Rakefile to programatically add rake task libraries.

    • πŸ‘€ You can specific backtrace suppression patterns (see --suppress-backtrace)

    • Directory tasks can now take prerequisites and actions

    • πŸ‘‰ Use --backtrace to request a full backtrace without the task trace.

    • You can say "--backtrace=stdout" and "--trace=stdout" to route trace output to standard output rather than standard error.

    • Optional 'phony' target (enable with 'require 'rake/phony'") for special purpose builds.

    • Task#clear now clears task comments as well as actions and prerequisites. Task#clear_comment will specifically target comments.

    • The --all option will force -T and -D to consider all the tasks, with and without descriptions.

    ===== πŸ› Bug Fixes

    • 🏁 Semi-colons in windows rakefile paths now work.

    • πŸ‘Œ Improved Control-C support when invoking multiple test suites.

    • πŸ‘ egrep method now reads files in text mode (better support for Windows)

    • πŸ‘ Better deprecation line number reporting.

    • The -W option now works with all tasks, whether they have a description or not.

    • File globs in rake should not be sorted alphabetically, independent of file system and platform.

    • Numerous internal improvements.

    • πŸ“š Documentation typos and fixes.

    ==== Thanks

    As usual, it was input from users that drove a lot of these changes. The following people contributed patches, made suggestions or made otherwise helpful comments. Thanks to ...

    • Aaron Patterson
    • Dylan Smith
    • Jo Liss
    • Jonas Pfenniger
    • Kazuki Tsujimoto
    • Michael Bishop
    • Michael Elufimov
    • NAKAMURA Usaku
    • Ryan Davis
    • Sam GrΓΆnblom
    • Sam Phippen
    • Sergio Wong
    • Tay Ray Chuan
    • grosser
    • quix

    πŸš€ Also, many thanks to Eric Hodel for assisting with getting this release out the door.

    -- Jim Weirich