Next | Query returned 17 messages, browsing 11 to 20 | previous

History of commit frequency

CVS Commit History:


   2021-11-09 15:46:28 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.5.1

2.5.1 (20 October 2021)

* Restores support for namespaces that are not hashable. For example
  namespaces that override the hash method with a different arity as shown
  in #188.

2.5.0 (20 October 2021)

Breaking changes

* Requires Ruby 2.5.
* Deletes the long time deprecated preload API. Instead of:

	loader.preload("app/models/user.rb")

  just reference the constant on setup:

	loader.on_setup { User }

  If you want to eager load a namespace, use the constants API:

	loader.on_setup do
	  Admin.constants(false).each { |cname| Admin.const_get(cname) }
	end

Bug fixes

* Fixes a bug in which a certain valid combination of overlapping trees
  managed by different loaders and ignored directories was mistakenly
  reported as having conflicting directories.
* Detects external namespaces defined with Module#autoload. If your project
  reopens a 3rd party namespace, Zeitwerk already detected it and did not
  consider the namespace to be managed by the loader (automatically
  descends, ignored for reloads, etc.). However, the loader did not do that
  if the namespace had only an autoload in the 3rd party code yet to be
  executed. Now it does.

Callbacks

* Implements Zeitwerk::Loader#on_setup, which allows you to configure blocks
  of code to be executed on setup and on each reload. When the callback is
  fired, the loader is ready, you can refer to project constants in the
  block.
  See the documentation for further details.

* There is a new catch-all Zeitwerk::Loader#on_load that takes no argument
  and is triggered for all loaded objects:

	loader.on_load do |cpath, value, abspath|
	  # ...
	end

  Please, remember that if you want to trace the activity of a loader,
  Zeitwerk::Loader#log! logs plenty of information.
  See the documentation for further details.

* The block of the existing Zeitwerk::Loader#on_load receives also the value
  stored in the constant, and the absolute path to its corresponding file or
  directory:

	loader.on_load("Service::NotificationsGateway") do |klass, abspath|
	  # ...
	end

  Remember that blocks can be defined to take less arguments than passed. So
  this change is backwards compatible. If you had

	loader.on_load("Service::NotificationsGateway") do
	  Service::NotificationsGateway.endpoint = ...
	end

  That works.

* Implements Zeitwerk::Loader#on_unload, which allows you to configure
  blocks of code to be executed before a certain class or module gets
  unloaded:

	loader.on_unload("Country") do |klass, _abspath|
	  klass.clear_cache
	end

  These callbacks are invoked during unloading, which happens in an
  unspecified order. Therefore, they should not refer to reloadable
  constants.

  You can also be called for all unloaded objects:

	loader.on_unload do |cpath, value, abspath|
	  # ...
	end

  Please, remember that if you want to trace the activity of a loader,
  Zeitwerk::Loader#log! logs plenty of information.
  See the documentation for further details.

Assorted

* Performance improvements.
* Documentation improvements.
* The method Zeitwerk::Loader#eager_load accepts a force flag:

	loader.eager_load(force: true)

* If passed, eager load exclusions configured with do_not_eager_load are not
  honoured (but ignored files and directories are).
* This may be handy for test suites that eager load in order to ensure all
  files define the expected constant.
* Eliminates internal use of File.realpath. One visible consequence is that
  in logs root dirs are shown as configured if they contain symlinks.
* When an autoloaded file does not define the expected constant, Ruby clears
  state differently starting with Ruby 3.1. Unloading has been revised to be
  compatible with both behaviours.
* Logging prints a few new traces.
   2021-10-26 12:20:11 by Nia Alarie | Files touched by this commit (3016)
Log message:
archivers: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes

Could not be committed due to merge conflict:
devel/py-traitlets/distinfo

The following distfiles were unfetchable (note: some may be only fetched
conditionally):

./devel/pvs/distinfo pvs-3.2-solaris.tgz
./devel/eclipse/distinfo eclipse-sourceBuild-srcIncluded-3.0.1.zip
   2021-10-07 15:44:44 by Nia Alarie | Files touched by this commit (3017)
Log message:
devel: Remove SHA1 hashes for distfiles
   2021-01-11 14:33:22 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.4.2

2.4.2 (27 November 2020)

* Implements Zeitwerk::Loader#on_load, which allows you to configure
  blocks of code to be executed after a certain class or module have
  been loaded:

	# config/environments/development.rb
	loader.on_load("SomeApiClient") do
	  SomeApiClient.endpoint = "https://api.dev"

	# config/environments/production.rb
	loader.on_load("SomeApiClient") do
	  SomeApiClient.endpoint = "https://api.prod"
	end

  See the documentation for further details.

2.4.1 (29 October 2020)

* Use __send__ instead of send internally.
   2020-09-14 15:12:27 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.4.0

Update ruby-zeitwerk to 2.4.0.

2.4.0 (15 July 2020)

* Zeitwerk::Loader#push_dir supports an optional namespace keyword argument.
  Pass a class or module object if you want the given root directory to be
  associated with it instead of Object.  Said class or module object cannot
  be reloadable.

* The default inflector is even more performant.
   2020-03-23 17:06:45 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.3.0

Update ruby-zeitwerk to 2.3.0.

2.3.0 (3 March 2020)

* Adds support for collapsing directories.

  For example, if booking/actions/create.rb is meant to define
  Booking::Create because the subdirectory actions is there only for
  organizational purposes, you can tell Zeitwerk with collapse:

	loader.collapse("booking/actions")

  The method also accepts glob patterns to support standardized project
  structures:

	loader.collapse("*/actions")

  Please check the documentation for more details.

* Eager loading is idempotent, but now you can eager load again after
  reloading.
   2020-01-19 16:04:46 by Takahiro Kambe | Files touched by this commit (4)
Log message:
devel/ruby-zeitwerk: add version 2.2.2 package

Add ruby-zeitwerk version 2.2.2 package.

Zeitwerk is an efficient and thread-safe code loader for Ruby.

Given a conventional file structure, Zeitwerk is able to load your project's
classes and modules on demand (autoloading), or upfront (eager loading).  You
don't need to write `require` calls for your own files, rather, you can
streamline your programming knowing that your classes and modules are
available everywhere.  This feature is efficient, thread-safe, and matches
Ruby's semantics for constants.

Zeitwerk is also able to reload code, which may be handy while developing web
applications.  Coordination is needed to reload in a thread-safe manner. The
documentation below explains how to do this.

Next | Query returned 17 messages, browsing 11 to 20 | previous