From: Eric B. <er...@go...> - 2004-06-30 17:15:45
|
Andreas Leitner wrote: > IIRC, the reason currently we cannot make something like the ace file > sketched out by Till is that when we 'mount' a library it's clusters > will be put into the system object as top level clusters. Now, mind you, > there was a reason for it (not so sure if the current impl. still > reflects this): if for some reason a library gets mounted twice > (indirectly, from other libraries for example), the generated ace file > would still be valid, since the library that gets mounted twice, would > effectively be only mounted once (since it gets mounted two times at the > same position (top-level, that is)). > > Now, since the introduction of prefixes, this is a bit of a problem > anyway, since a library can be mounted two times with different > prefixes. Yes, I had to do some weird things with prefixes, but I don't remember exactly how I implemented it in the end. > And besides the idea with 'mount' was that it should only be > used for aggregation in libraries never for dependencies (thats why it > is not called 'depend') So if a library, say ePosix depends on gobo, the > ePosix library.xace file would still _not_ 'mount' any gobo library. (It > doesn't in real life, btw). So a user has to still mount the gobo > library in his system.xace file. This pays off as soon as he mounts a > second library say, esdl which too depends on gobo. I would tend to agree with you, although people find it convenient when they use say the regexp library not to have to worry about what other libraries were used to implement it. They will be automatically added to the Ace file. If we were to strictly follow your reasoning, then the <mount> element should have only been allowed in the system.ace files (and nowhere else) as direct children of <system> (and not of <library> or <cluster>). But I must say that the $GOBO/library/library.ace kind of file is convenient. > Now I can see two solutions to this problem: > > a) Flaten out the gobo 'library.xace' to include no further mounts and a > top level cluster. So instead of each sub-library having its own > 'library.xace' there would be only one global library.xace file (same > thing for the gobo_kernel one) > b) Modify gexace to not mount library clusters top level. We could still > check for redundant mounts and display an error message in such a case. I think that we should build a solution along with the suggestion of Alexander about options precedence/overriding. His idea was to be able to change some options to the clusters and classes of the library that we are mounting it. And there was an order in which the options would be taken into account when the library was mounted multiple times with different options. We could use this same policy to determine where in the cluster tree of the generated Ace file the mounted library clusters will appear. I will try to work on that (and on keeping "unless"/"if" nodes in the AST for Xace file editors) later this summer. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |