ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 53550] [PATCH] extensionOf settings applied when task is discarded because of previous declaration
Date Mon, 16 Jul 2012 02:39:47 GMT

--- Comment #5 from Tim Pokorny <> ---
Created attachment 29067
[PATCH] More complete solution with prefix resolution

Another patch file, but, please take a careful look at it first.

The previous patch just provides a one line solution that will work for
imported build files. All good. But really I wanted to include files, not
import them. When importing with a prefix, it seems that targets only use that
prefix if their names clash with a target that already exists. Sounds sane and
one of the fundamental import/include differences.

I wanted all targets to have the prefixed name, however, switching to use
include broke the build with a different error: the extension point from the
master build file couldn't be found because it was looking it up under the
prefixed name. So, this patch also fixes the core problem of this bug, but it
goes further and adds some additional checks that make it work for imports as

Basically, it passes the prefix name (if there is one) into the extension point
info stack as a fourth element in the array. When the parser resolves the
extension points name, if a fourth element is present, it knows that the target
must have come from an include file and will first look up the point being
extended on by its full, prefixed name, and then fall back to its non-prefixed
version. This means that it'll resolve to an extension point in the local file
in the first instance, and then out to one from the master if there isn't a
local one.

It's a little distasteful as it adds an extra element to the extension info
array that is or isn't present depending on whether the file is or isn't
brought in as an include, but it works. I provide for you guys to
hack/ignore/laugh at, whatever floats your boat :)

You are receiving this mail because:
You are the assignee for the bug.

View raw message