<div dir="ltr">Thanks for all the feedback on the API.<div><br></div><div>Before going into detail I wanted to put the accent on the Weld 3.0.Alpha16 release post[1] which give a good explanation regarding this API. Its the best starting point to discover this new API IMO. Thanks Martin, Tomas and Matej for this release.</div><div><br><div>@John. The debate Configurator vs Builder is still open. At the moment we focused on configurator since they are easier to limit to a given container lifecycle, but having builders to reuse the configuration could make sense as well. AnnotatedType is a special case since it could make sense to use it at runtime (to ease creation of an InjectionTarget for instance, so perhaps it will require a Builder.</div><div>If we keep the API in this spirit for the release, it should be better to talk about Configurator API vs Builder API to avoid confusion for missing build() methods ;)</div><div><br></div><div>@Antonin the enhancement you propose is very interesting but as Martin said we could imagine a solution to load an existing bean after decision on the API (a mute(Bean) method in ABD perhaps).</div><div><br></div><div>For me the goal is to decide if we are on the right path and avoid decision that will prevent future enhancement. I think having this API perfect and complete in one PR is almost impossible. So we should validate something to move on missing features or enhancements.</div><div><br></div><div>Antoine</div><div><br></div><div>[1] <a href="http://weld.cdi-spec.org/news/2016/04/28/weld-300Alpha16/">http://weld.cdi-spec.org/news/2016/04/28/weld-300Alpha16/</a></div><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">Le jeu. 28 avr. 2016 à 10:43, Martin Kouba <<a href="mailto:mkouba@redhat.com" target="_blank">mkouba@redhat.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
we've just released Weld 3.0.0.Alpha16. So anyone can start playing with<br>
the API, discover possibilities and find potential issues:<br>
<br>
<a href="http://weld.cdi-spec.org/news/2016/04/28/weld-300Alpha16/" rel="noreferrer" target="_blank">http://weld.cdi-spec.org/news/2016/04/28/weld-300Alpha16/</a><br>
<br>
Any feedback is appreciated!<br>
<br>
Martin<br>
<br>
Dne 25.4.2016 v 09:30 Martin Kouba napsal(a):<br>
> Hi all,<br>
><br>
> me and Matej, we've already tried to explain some points in cdi/pull/287<br>
> discussion. Anyway, we're going to release Weld 3.0.0.Alpha16 (base on<br>
> 2.0.Alpha4) later this week so that everyone can start playing with the<br>
> new API. And we'd like to prepare some simple examples to help people<br>
> get started as well.<br>
><br>
> Martin<br>
><br>
><br>
> Dne 23.4.2016 v 12:56 John D. Ament napsal(a):<br>
>> Hey guys<br>
>><br>
>> Based on the last f2f I was in, I took an action item to look at how<br>
>> applications can leverage the new builder methods/classes from this PR:<br>
>> <a href="https://github.com/cdi-spec/cdi/pull/287" rel="noreferrer" target="_blank">https://github.com/cdi-spec/cdi/pull/287</a><br>
>><br>
>> To do this, I took some existing OSS CDI extensions and converted parts<br>
>> to use the new APIs instead of the old ones.<br>
>><br>
>> The results were iffy to be honest. Here's some of the key issues I<br>
>> noticed:<br>
>><br>
>> - AfterBeanDiscovery#addBean - vs AfterBeanDiscovery.addBean(Bean<?> bean)<br>
>> In the latter, it's clearer to a developer which attributes are required<br>
>> vs optional. Builders typically use sensible defaults. Maybe that was<br>
>> the intention here, but I couldn't really get that sense when converting<br>
>> over. It also wasn't clear what to do when done. I suspect I just<br>
>> leave it, but without some kind of closing "build()" or "done()" method,<br>
>> it becomes ambiguous.<br>
>><br>
>> - Annotated*Configurator<br>
>> TBH, I have no idea what I was configuring in this one at the first<br>
>> pass. I started with a method. I wanted to replace the method's<br>
>> annotations. It seemed like I could set that up using the configurator,<br>
>> but I ended up having to do setAnnotated at the end anyways, so I'm not<br>
>> sure what the configurator bought me.<br>
>><br>
>> The one nice thing I saw was the simpler to use lambda functions. Being<br>
>> able to stream through things like annotated method made the code much<br>
>> cleaner.<br>
>><br>
>> For the open source code, I'll try to get some gists together that show<br>
>> the changes. Maybe there's something I'm missing, so wouldn't mind a<br>
>> second set of eyes on the changes to see.<br>
>><br>
>> John<br>
>><br>
>><br>
>> _______________________________________________<br>
>> cdi-dev mailing list<br>
>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
>><br>
>> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
>><br>
><br>
<br>
--<br>
Martin Kouba<br>
Software Engineer<br>
Red Hat, Czech Republic<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
<br>
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
</blockquote></div></div></div></div>