[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: dependency glitches



On Wed, 07 Aug 2002, Hans Breuer wrote:
> Hi Lars and Steffen,
> while trying to compile current cvs Dia I stumbled
> over two recently added 'features' 
> 
> lib/paper.c #includes ../app/
> to get on prefs
> 
> plug-ins/svg/svg-import.c
> #include "../objects/standard/create.h"
> #include "../objects/custom/shape_info.h"
> 
> the main problem here is using 
> void parse_style(xmlNodePtr node, GraphicStyle *s);
> from objects/custom
> 
> While both these cases appear to be no problem with ELF
> binaries where dependencies are resolved at run-time it
> definitely is a problem on poor os like win32 where 
> dependencies need to be resolved at compile time.

Oh, I had no idea that would be a problem for you.  My apologies.

> But wait: although it would be possible to hack around the
> platform restrictions, IMO the real problem is by no 
> means platform specific.
> If we start to throw in dependencies where ever they just
> appear to be simplest solution sooner or later (probably
> sooner) we'll have a dependency tree which looks like
> a wool-ball.

True...

> So: plug-ins should stay independent of each other. There 
> are many way to avoid this deps: move the shared functionality 
> to the core lib, merge both plug-ins into one, ...

So there's two problems:

  paper.c needs prefs.  I guess the right way is to just use dummy numbers
  in get_paper_info(), and then fill in the right stuff after
  new_diagram_data() is done.  Or else have make the new_diagram part of
  prefs a lib structure and pass than it to new_diagram_data().

  Importers need to create new objects.  I'm thinking those things should
  go into lib.  The problem is the special structures used by various
  objects to pass creation info.  While we can reasonably define such for
  the standard objects, we wouldn't be able to create any non-standard
  object that way.  Importers of, say, Visio format would be most sad to
  hear that.  Not sure what is best here.

> And making lib depend on app gives nice circular dependencies.
> Do we really need them ?

No, we really don't need them.  I felt kinda bad every time I did one.

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| Hårdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK