Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] multiple depends in one line

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: seth AT swoolley.homeip.net
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] multiple depends in one line
  • Date: Fri, 18 Aug 2006 09:43:49 -0700

On Fri, Aug 18, 2006 at 08:51:50AM -0700, Andrew wrote:
> On Fri, Aug 18, 2006 at 09:17:07AM +0300, Juuso Alasuutari wrote:
> > On Friday 18 August 2006 09:17, Paul Mahon wrote:
> > > It is not documented to work like that and isn't supposed to. It's more
> > > than likely a bug cause by something not being quoted as it should,
> > > which means that you'll get inconsistent results... ie the depends
> > > information could say it depends on a spell called "glibc gcc" while
> > > cast may turn that into two spells, cleanse may not which would cause
> > > all sorts of weirdness.
> >
> > I'll test to see what happens in those cases. A bug or not, it's
> > nevertheless
> > something I think we should support.
>
> No, its not something we support or intended. The documentation says "spell
> or provider name". "name" is singular. Spell names are not allowed to
> have spaces, doing so will give you undefined behavior. That it resembles
> something you might want in some cases is purely coincidence, it very
> well could have just run rm -rf / instead.
>
> So, it is not an undocumented feature, and I dont see why we should so
> hastily assume its something sorcery should support. This could easily be
> done with a wrapper function. In fact, if it was something we add in
> sorcery, in order to use it, you'd have to add a wrapper in libcompat
> for users of stable sorcery. Seth also brings up a good point, which is
> that the policy of what this means isn't quite clear.
>
> Philosophically speaking, I think that its better to keep the interface
> to sorcery simple rather than overload it with all sorts of extra
> convenience and policy setting interfaces. If theres something that
> *can't* be done outside of sorcery, then it should go inside, but if
> it can just as easily be done with an existing api, then I really don't
> see a point. In the end I think it works out better for both of us.

I agree with this, and Robert Figura's suggestion of making it a wrapper
function.

(To Robert: it's meant to be code, not a fixed format, although we have
code style guidelines for common things to make it readable.)

I wouldn't be opposed to a bug making spaces checked for. Spells are
not supposed to have spaces, so it's a violation of our existing policy,
but we also go to some effort in other places to check for sanity to
many functions. Here wouldn't be such a bad place to check and error
fatally since its intended behavior is not actually determined.




Archive powered by MHonArc 2.6.24.

Top of Page