--- - branch: MAIN date: Tue Nov 9 14:46:28 UTC 2021 files: - new: '1.5' old: '1.4' path: pkgsrc/devel/ruby-zeitwerk/Makefile pathrev: pkgsrc/devel/ruby-zeitwerk/Makefile@1.5 type: modified - new: '1.2' old: '1.1' path: pkgsrc/devel/ruby-zeitwerk/PLIST pathrev: pkgsrc/devel/ruby-zeitwerk/PLIST@1.2 type: modified - new: '1.7' old: '1.6' path: pkgsrc/devel/ruby-zeitwerk/distinfo pathrev: pkgsrc/devel/ruby-zeitwerk/distinfo@1.7 type: modified id: 20211109T144628Z.6551c38ceab5716b87f4b1e3d069661b5340ed51 log: "devel/ruby-zeitwerk: update to 2.5.1\n\n2.5.1 (20 October 2021)\n\n* Restores support for namespaces that are not hashable. For example\n namespaces that override the hash method with a different arity as shown\n in #188.\n\n2.5.0 (20 October 2021)\n\nBreaking changes\n\n* Requires Ruby 2.5.\n* Deletes the long time deprecated preload API. Instead of:\n\n\tloader.preload(\"app/models/user.rb\")\n\n just reference the constant on setup:\n\n\tloader.on_setup { User }\n\n If you want to eager load a namespace, use the constants API:\n\n\tloader.on_setup do\n\t \ Admin.constants(false).each { |cname| Admin.const_get(cname) }\n\tend\n\nBug fixes\n\n* Fixes a bug in which a certain valid combination of overlapping trees\n \ managed by different loaders and ignored directories was mistakenly\n reported as having conflicting directories.\n* Detects external namespaces defined with Module#autoload. If your project\n reopens a 3rd party namespace, Zeitwerk already detected it and did not\n consider the namespace to be managed by the loader (automatically\n descends, ignored for reloads, etc.). However, the loader did not do that\n if the namespace had only an autoload in the 3rd party code yet to be\n executed. Now it does.\n\nCallbacks\n\n* Implements Zeitwerk::Loader#on_setup, which allows you to configure blocks\n of code to be executed on setup and on each reload. When the callback is\n fired, the loader is ready, you can refer to project constants in the\n block.\n See the documentation for further details.\n\n* There is a new catch-all Zeitwerk::Loader#on_load that takes no argument\n and is triggered for all loaded objects:\n\n\tloader.on_load do |cpath, value, abspath|\n\t \ # ...\n\tend\n\n Please, remember that if you want to trace the activity of a loader,\n Zeitwerk::Loader#log! logs plenty of information.\n See the documentation for further details.\n\n* The block of the existing Zeitwerk::Loader#on_load receives also the value\n stored in the constant, and the absolute path to its corresponding file or\n directory:\n\n\tloader.on_load(\"Service::NotificationsGateway\") do |klass, abspath|\n\t # ...\n\tend\n\n Remember that blocks can be defined to take less arguments than passed. So\n this change is backwards compatible. If you had\n\n\tloader.on_load(\"Service::NotificationsGateway\") do\n\t Service::NotificationsGateway.endpoint = ...\n\tend\n\n That works.\n\n* Implements Zeitwerk::Loader#on_unload, which allows you to configure\n blocks of code to be executed before a certain class or module gets\n unloaded:\n\n\tloader.on_unload(\"Country\") do |klass, _abspath|\n\t \ klass.clear_cache\n\tend\n\n These callbacks are invoked during unloading, which happens in an\n unspecified order. Therefore, they should not refer to reloadable\n constants.\n\n You can also be called for all unloaded objects:\n\n\tloader.on_unload do |cpath, value, abspath|\n\t # ...\n\tend\n\n Please, remember that if you want to trace the activity of a loader,\n Zeitwerk::Loader#log! logs plenty of information.\n See the documentation for further details.\n\nAssorted\n\n* Performance improvements.\n* Documentation improvements.\n* The method Zeitwerk::Loader#eager_load accepts a force flag:\n\n\tloader.eager_load(force: true)\n\n* If passed, eager load exclusions configured with do_not_eager_load are not\n honoured (but ignored files and directories are).\n* This may be handy for test suites that eager load in order to ensure all\n files define the expected constant.\n* Eliminates internal use of File.realpath. One visible consequence is that\n in logs root dirs are shown as configured if they contain symlinks.\n* When an autoloaded file does not define the expected constant, Ruby clears\n state differently starting with Ruby 3.1. Unloading has been revised to be\n compatible with both behaviours.\n* Logging prints a few new traces.\n" module: pkgsrc subject: 'CVS commit: pkgsrc/devel/ruby-zeitwerk' unixtime: '1636469188' user: taca