[Bro-Dev] script loading changes

Robin Sommer robin at icir.org
Wed Jul 13 09:36:23 PDT 2011

On Wed, Jul 13, 2011 at 10:19 -0500, you wrote:

> We could do that, but I think in the shipped scripts should use one
> form consistently

Yes, definitly; and I'd also use the the dotted form for that. It just
seems to make things more consistent (in particular with the relative
paths) if we also allow the slashes. 

> And actually I think the search orders listed above should be reversed
> to make the common case faster.

Isn't the dotted-case the common one if that's what the default
scripts will be using?

> If 'x' contains @loads, they get loaded immediately during the scan of 'x'
> and set some flag to indicate we should go back to iterating from the
> beginning of the current pool of @adds-to-evaluate to re-check dependencies.

> If 'x' contains @adds, then those are added to the end of the pool of
> @adds-to-evaluate (we should be somewhere in the middle of iterating over
> the pool at this point).

Sounds good. I can see some quite hard to comprehend dependenices
showing up, like globals defined in one script and tests for with
@ifdef in another. But I think that's fine, the advantages here weigh
more than the opportunity for someone to shoot himself into the foot. :)

> And there's only an "@load z", creating a dependency chain.  To resolve
> those cases, we can take the same approach I describe above and reset

Sounds good as well.

Let's just make sure to document this all very well. :-)


Robin Sommer * Phone +1 (510) 722-6541 * robin at icir.org
ICSI/LBNL    * Fax   +1 (510) 666-2956 *   www.icir.org

More information about the bro-dev mailing list