./devel/ruby-zeitwerk, Efficient and thread-safe constant autoloader

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.6.18, Package name: ruby32-zeitwerk-2.6.18, Maintainer: pkgsrc-users

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.


Required to run:
[lang/ruby26-base]

Required to build:
[pkgtools/cwrappers]

Master sites:

Filesize: 39.5 KB

Version history: (Expand)


CVS history: (Expand)


   2024-09-18 17:29:31 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.6.18

2.6.17 (2024-07-29)

* Fix log message when eager loading a directory ends.

2.6.18 (2024-09-02)

* Fixes a bug in which projects reopening the main namespace of a gem
  dependency managed by its own Zeitwerk loader could not reload the
  constants they added to that external namespace.
   2024-06-15 17:52:04 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.6.16

2.6.16 (2024-06-15)

* Logging prints a message when a directory that was not ignored is skipped
  anyway because it contains no Ruby files.

* Internal refactors.
   2024-05-26 17:29:50 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.6.15

2.6.14 (2024-05-14)

* Implements Zeitwerk::Loader#all_expected_cpaths, which returns a hash that
  maps the absolute paths of the files and directories managed by the
  receiver to their expected constant paths.

* Please, check its documentation for further details.

2.6.15 (2024-05-26)

* Internal improvements.
   2024-02-06 16:05:38 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.6.13

2.6.13 (2024-02-06)

* There is a new experimental null inflector that simply returns its input
  unchanged:

    loader.inflector = Zeitwerk::NullInflector.new

  Projects using this inflector are expected to define their constants in
  files and directories with names exactly matching them:

    User.rb       -> User
    HTMLParser.rb -> HTMLParser
    Admin/Role.rb -> Admin::Role

  Please see its documentation for further details.

* Documentation improvements.
   2023-11-11 13:34:05 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.6.12

2.6.12 (2023-09-25)

* Maintenance release with some internal polishing.
   2023-08-05 10:57:31 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.6.11

2.6.10 (2023-07-30)

* Improve validation of the values returned by the inflector's camelize.

2.6.11 (2023-08-02)

* Let on_load callbacks for implicit namespaces autoload other implicit
  namespaces.
   2023-07-30 06:09:01 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.6.9

2.6.9 (2023-07-25)

* Given a path as a string or Pathname object,
  Zeitwerk::Loader#cpath_expected_at returns a string with the corresponding
  expected constant path.

  Some examples, assuming that app/models is a root directory:

    loader.cpath_expected_at("app/models")                  # => \ 
"Object"
    loader.cpath_expected_at("app/models/user.rb")          # => \ 
"User"
    loader.cpath_expected_at("app/models/hotel")            # => \ 
"Hotel"
    loader.cpath_expected_at("app/models/hotel/billing.rb") # => \ 
"Hotel::Billing"

  This method returns nil for some input like ignored files, and may raise
  errors too.  Please check its documentation for further details.

* Zeitwerk::Loader#load_file raises with a more informative error if given a
  hidden file or directory.

* Zeitwerk::Loader#eager_load_dir does nothing if the argument is a hidden
  file or directory.  This is coherent with its existing behavior for eager
  load exclusions and ignored paths.  Before, that kind of argument would
  result in a non-deliberate NameError.

* Documentation improvements.
   2023-04-29 15:41:52 by Takahiro Kambe | Files touched by this commit (2) | Package updated
Log message:
devel/ruby-zeitwerk: update to 2.6.8

2.6.8 (2023-04-28)

* The new Zeitwerk::Loader.for_gem_extension gives you a loader configured
  according to the conventions of a gem extension.

* Please check its documentation for further details.