[Nitro] Fwd: [Facets] Lay me out 2.0

TRANS transfire at gmail.com
Sun Sep 9 14:33:37 EDT 2007

---------- Forwarded message ----------
From: Trans <transfire at gmail.com>
Date: Sep 9, 2007 6:57 AM
Subject: [Facets] Lay me out 2.0
To: facets-universal at rubyforge.org

I'm just about ready to release version 2.0. I have only one last
major decision to make, and it is an important one. So I thought it a
good idea to put it out to the community.

As you know, Facets 1.8+ is laid out between facets/core/ and facets/
more/ subdirectories. There is also a facet/ shortcut directory that
simply contains files that redirect back to the first two. The idea
being that the extension method libs were in core/, the other libs in
more/, and facet/ was for convenience.

With Facets 2.0 there are two points that make things different:

1) A goal of 2.0 was to make all the libs directly available via
facets/, without the need for core/ or more/ or redirection.

2) The extensions are no longer stored one-file-per-method, but are
instead bundled with other closely related methods. However, Facets
will still provide per-method requires via redirection files.

So those two points change things a bit. To take them into account,
the current 2.0 layout looks like this:

  lib/facets/  <-- all libs
  lib/facet/  <-- method redirects

Unfortunately this layout almost completely breaks backward-
compatibility with 1.8.

Is there a remedy? I could offer backward compatibility if I did this

  lib/facets/core/  <-- method redirects
  lib/facets/more/ <-- additional libs
  lib/facets/xore/  <-- extension libs

Yes, the xore/ is a bit weird (do you have a better name?), but it
keeps with the flow. With this layout I can use RubyGems' libpath
specification parameter to add more/ and xore/ to the load path and
achieve my first goal while remaining backward compatible with 1.8.

The problem though, is that _manual_ installs have no means of
automatically adding to the load path. So those will need a special
file that would either have to be loaded at the start of ones app or
added to the RUBYOPT environment variable.

Is that extra hassle worth it?

And, with regard to require statements, how important is backward
compatibility to you?


facets-universal mailing list
facets-universal at rubyforge.org

O  trans
^^ transfire at gmail.com

If there's one thing I learned from watching sitcoms it's this:
whenever someone abruptly says "don't be silly", by all means be

More information about the Nitro-general mailing list