This repository has been archived by the owner on Dec 14, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IOC-168.xml
72 lines (69 loc) · 3.98 KB
/
IOC-168.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0" encoding="utf-8"?>
<issues>
<issue>
<field name="Priority">
<value>Major</value>
</field>
<field name="Type">
<value>Bug</value>
</field>
<field name="State">
<value>Fixed</value>
</field>
<field name="Assignee" />
<field name="Subsystem">
<value>No subsystem</value>
</field>
<field name="Fix versions">
<value>Future</value>
</field>
<field name="Affected versions">
<value>2.0 RTM</value>
</field>
<field name="Fixed in build" />
<field name="numberInProject">
<value>168</value>
</field>
<field name="summary">
<value>When there are multiple greediest .ctors behavior is undefined</value>
</field>
<field name="description">
<value>Take a look at this SO question.
http://stackoverflow.com/questions/1746387/castle-windsor-problem-with-multiple-constructors/1747477
Basically when resolving a component that has multiple .ctors with the same number of parameters, Windsor/MK just picks any of them, even in case when it has waiting dependencies for this .ctor it picked, and for another one it has all the elements.
What it should do instead, is to eliminate all the .ctors it can't satisfy, and out of remaining ones do (not sure which)
- when there's one just use it, end of story.
- throw when there are more than one.
- when there's more than one just pick any just like you'd do now (plus the filtering step).</value>
</field>
<field name="created">
<value>1258457176000</value>
</field>
<field name="updated">
<value>1283220838916</value>
</field>
<field name="reporterName">
<value>xtoff</value>
</field>
<field name="updaterName">
<value>xtoff</value>
</field>
<field name="resolved">
<value>1270802280000</value>
</field>
<field name="permittedGroup">
<value>All Users</value>
</field>
<comment author="mausch" text="Here's a patch, please somebody review it: http://github.com/mausch/Castle.InversionOfControl/tree/IoC-168" created="1258486565000" />
<comment author="xtoff" text="I only had a quick glance, but the patch looks good.

I see you chosen the path - "when there's more than one just pick any just like you'd do now (plus the filtering step)."

I guess that's OK, although I'd prefer to have a rule that would not rely on undefined behavior...
Not sure we can come up with one other than something stupid like sorting by ctor parameter names though..." created="1258501616000" />
<comment author="xtoff" text="fixed in r6551" created="1262338606000" />
<comment author="xtoff" text="This is actually still not entirely fixed.

When at the time of registration of the handler, none of the constructors can be satisfied undefined one gets picked.

Later on as we register more components some other constructor may become satisfiable, but we still will try to use the one returned which will not be satisfiable." created="1269101178000" />
<comment author="xtoff" text="This was fixed by German's patch for issue 198" created="1270802341000" />
<comment author="xtoff" text="* '''Status''' changed from ''Reopened'' to ''Resolved''.
" created="1270802280000" />
<comment author="xtoff" text="* '''Status''' changed from ''Resolved'' to ''Closed''.
" created="1270802340000" />
<comment author="xtoff" text="* '''Status''' changed from ''Open'' to ''Work Started''.
" created="1262336700000" />
<comment author="xtoff" text="* '''Resolution''' set to ''Fixed''.
* '''Version Fixed''' set to ''Future''.
* '''Status''' changed from ''Work Started'' to ''Resolved''.
" created="1262338560000" />
<comment author="xtoff" text="* '''Status''' changed from ''Resolved'' to ''Closed''.
" created="1262338560000" />
<comment author="xtoff" text="* '''Status''' changed from ''Closed'' to ''Reopened''.
" created="1269101160000" />
</issue>
</issues>