Re: Discussion: make duplicate contributions to services with ordered configurations an error

Rafael Bugajewski <[email protected]>
Newsgroups gmane.comp.java.tapestry.user
Message-ID <15f619e4438.27be.35816ac88ee3d728d02d2c42123c95b0@juicycocktail.com>
In both cases I would expect a hard exception instead of a soft warning. 
There’s already enough magic going on in the background.

Best,
Rafael




On October 27, 2017 3:57:59 PM Dmitry Gusev <[email protected]> wrote:

> Hi Thiago,
>
> I would expect this to throw an exception on application start.
>
> I would also expected that `configuration.override` would fix this,
> although it's not that clear what should happen if you're overriding a
> contribution twice, say, in different modules.
>
> Can we order the overrides somehow?
>
> If so I'd expected the last override would win if ordered, if override
> isn't ordered anyhow -- should fail with an error due to ambiguity. Not
> sure if that's doable at the moment, so just theorising.
>
> On Fri, Oct 27, 2017 at 4:40 PM, Thiago H. de Paula Figueiredo <
> [email protected]> wrote:
>
>> Hello!
>>
>> I've just stumbled again at https://issues.apache.org/
>> jira/browse/TAP5-1305,
>> which boiled down to Tapestry-IoC dropping a contribution to an ordered
>> configuration if there's another contribution with the same id. I fixed it
>> specifically for service decorators. For service configurations, it
>> remained the same: the contribution is dropped with a warning in the log,
>> but I think this is easy to overlook and can cause errors which are
>> difficult to spot since you consider that all contributions.
>>
>> What do you think of making contributing two different values to an ordered
>> configuration with the same id a show-stopping error?
>>
>> --
>> Thiago
>>
>
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.