[Mono-dev] Announce: Mono.Fuse (+ Required Mono.Posix Changes)

Jonathan Pryor jonpryor at vt.edu
Thu Aug 31 21:14:51 EDT 2006

On Thu, 2006-08-31 at 17:36 -0400, Miguel de Icaza wrote:
> > 4. Wait for Mono.Fuse.  (Actually, you'd be waiting for the Mono.Fuse
> > dependencies within Mono.Posix to be committed, then either use svn-HEAD
> > or wait for 1.1.18 to use a separate Mono.Fuse tarball.  Furthermore, I
> > have no idea when the Mono.Posix dependencies will get committed; it
> > depends on when I get approval, which may require changes...)
> Am wondering how much of the stuff in Mono.Posix is actually needed.
> Am wondering if we would not be just a whole lot better by having a
> private libMonoFuseHelper.so that only contains the code that needs to
> be OS-specific, and not try to force Mono.Posix into larger uses.

I'm big on Single Points Of Truth. :-)

MonoPosixHelper *already* contains code to convert `struct stat' and
`struct statvfs' into a Mono.Unix.Native.Stat & Mono.Unix.Native.Statvfs
(and code for several other structures).  `struct statvfs' in particular
has lots of code to deal with Linux & Mac OS X/*BSD (which use a `struct
statfs' for the same purpose -- so much for portability!).

So removing a dependency on the Mono.Posix changes would require copying
this existing code, introducing *two* "points of truth," which I dislike
(the "bad taste in my mouth" design opinion).

In short, I'd prefer to avoid copy & pasting code unless it can't be
avoided, and this most certainly *can* be avoided.  (Plus, as lupus
mentioned earlier, if the conversion functions are not added to
Mono.Posix then it "is useless for all but the trivial cases," and I'm
trying to *improve* its usefulness, not keep it useless for all but the
currently support cases.)

(Recall why I started this: I wondered why Sulf didn't use Mono.Posix,
and came to the conclusion that it *couldn't* use Mono.Posix because
Mono.Posix didn't offer the required functionality.)

 - Jon

More information about the Mono-devel-list mailing list