<div dir="ltr"><div><div><div><div><div>Most of my concerns about this ware already raised by Brian (l18n, extra size of distro, inconsistencies between subsystems, ...)<br></div><br>Also on top of this, having something like that would glorify configuration of server via XML, <br>which is something we are trying to discourage  in favor of CLI / mgmt api.<br></div>Another problem is also that it relies on XSD which are not always 100% correct, which should be fixed (but that is another problem)<br><br></div>There are also ideas about implementing non xml backend for storage of our configuration. <br></div><div>type of storage for the backend shouldn&#39;t really matter as users should be interacting via API / CLI not by manually modifying the file.<br><br>--<br></div><div>tomaz<br></div></div><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 20, 2016 at 1:28 AM, Toby Crawley <span dir="ltr">&lt;<a href="mailto:tcrawley@redhat.com" target="_blank">tcrawley@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Jul 19, 2016 at 4:07 PM, Brian Stansberry<br>
&lt;<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>&gt; wrote:<br>
&gt; Comments in-line, except for something I just thought of.<br>
&gt;<br>
&gt; All exception and log messages produced will likely need to follow<br>
&gt; WildFly’s/EAP&#39;s i18n standards. Message prefixed with a code, text produced<br>
&gt; in a way in an i18n manner with a reasonable way to get localized text into<br>
&gt; the software.<br>
<br>
</span>Ah, good point. It shouldn&#39;t be difficult to add localized text to the<br>
output, the biggest cost there would be the time to translate the<br>
messages, but I&#39;m not familiar with how i18n is done in our projects.<br>
For the message code, we could print the original exception message at<br>
the bottom or top of the validation block. That would then use the<br>
same code as we provide now, and would provide the same message we use<br>
now with every error. Would that satisfy the message code requirement?<br>
<span class=""><br>
&gt;&gt;<br>
&gt;&gt; On Jul 19, 2016, at 2:38 PM, Toby Crawley &lt;<a href="mailto:tcrawley@redhat.com">tcrawley@redhat.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; On Tue, Jul 19, 2016 at 3:15 PM, Brian Stansberry<br>
&gt;&gt;&gt; &lt;<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The only big concern I have about this is that we’ll get this behavior for<br>
&gt;&gt;&gt; some failures but not all. And I don’t want to go down the path of trying to<br>
&gt;&gt;&gt; force every parser to work in a manner such that we consistently get this.<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I haven&#39;t looked at it too deeply, but it may be straightforward to<br>
&gt;&gt; alter staxmapper to allow providing an exception generator that would<br>
&gt;&gt; allow catching more of the cases that the parsers miss.<br>
&gt;&gt;<br>
&gt;<br>
&gt; I’m not sure how big of a problem staxmapper-thrown exceptions are. (I<br>
&gt; haven’t really thought.)<br>
<br>
</span>That&#39;s just the first place I saw errors from outside of ParseUtils,<br>
but I haven&#39;t yet started playing with attribute values.<br>
<span class=""><br>
&gt;<br>
&gt; What I was thinking more about when I wrote my previous post was parsers not<br>
&gt; using ParseUtils, or sometimes not using it.<br>
&gt;<br>
&gt; Also, a lot of XmlStreamException cases are generated from implementations<br>
&gt; of org.jboss.as.controller.AttributeDefinition, e.g.<br>
&gt;<br>
&gt; <a href="https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/SimpleAttributeDefinition.java#L140" rel="noreferrer" target="_blank">https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/SimpleAttributeDefinition.java#L140</a><br>
&gt;<br>
&gt; Parsers are encouraged to invoke methods on AttributeDefinition to validate<br>
&gt; attribute values. Perhaps though those are better left alone, as the<br>
&gt; validators are meant to produce useful exception messages.<br>
&gt;<br>
<br>
</span>If we let these fall back to just pointing out the error location with<br>
the original message, this may be ok (assuming by &quot;the alidators are<br>
meant to produce useful exception messages&quot; you mean the messages<br>
produced by the AttributeDefinitions).<br>
<br>
&lt;snip&gt;<br>
<span class=""><br>
&gt;&gt;&gt; A minor concern is how big the added dependencies are. (I don’t know.) We<br>
&gt;&gt;&gt; want to keep WildFly Core small in footprint.<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Right now, the only dependencies vdx (31k) has are commons-lang (which<br>
&gt;&gt; is already a module in WildFly, but not core-feature-pack),<br>
&gt;&gt; xmlschema-walker (100k), and xmlschema-core (168k). For the rest of<br>
&gt;&gt; the work, I don&#39;t currently see needing any more dependencies.<br>
&gt;&gt;<br>
&gt;<br>
&gt; Thanks. So about 583K including 284K for commons-lang. The current<br>
&gt; wildly-core-dist-3.0.0.Alpha3.zip is about 16.9MB, so this is fairly<br>
&gt; substantial.<br>
&gt;<br>
<br>
</span>I&#39;m only using commons-lang for a Levenshtein distance implementation<br>
- that could certainly be pulled in, and we could drop the 284k for<br>
commons-lang. It certainly would be nice to keep core under 17MB<br>
though.<br>
<span class="HOEnZb"><font color="#888888"><br>
- Toby<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></div></div></blockquote></div><br></div>