<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Comments in-line, except for something I just thought of.<div class=""><br class=""></div><div class="">All exception and log messages produced will likely need to follow WildFly’s/EAP's i18n standards. Message prefixed with a code, text produced in a way in an i18n manner with a reasonable way to get localized text into the software.</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 19, 2016, at 2:38 PM, Toby Crawley <<a href="mailto:tcrawley@redhat.com" class="">tcrawley@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Tue, Jul 19, 2016 at 3:15 PM, Brian Stansberry<br class=""><<a href="mailto:brian.stansberry@redhat.com" class="">brian.stansberry@redhat.com</a>> wrote:<br class=""><blockquote type="cite" class="">The only big concern I have about this is that we’ll get this behavior for<br class="">some failures but not all. And I don’t want to go down the path of trying to<br class="">force every parser to work in a manner such that we consistently get this.<br class=""><br class=""></blockquote><br class="">I haven't looked at it too deeply, but it may be straightforward to<br class="">alter staxmapper to allow providing an exception generator that would<br class="">allow catching more of the cases that the parsers miss.<br class=""><br class=""></div></div></blockquote><div><br class=""></div>I’m not sure how big of a problem staxmapper-thrown exceptions are. (I haven’t really thought.)</div><div><br class=""></div><div>What I was thinking more about when I wrote my previous post was parsers not using ParseUtils, or sometimes not using it. </div><div><br class=""></div><div>Also, a lot of XmlStreamException cases are generated from implementations of org.jboss.as.controller.AttributeDefinition, e.g.</div><div><br class=""></div><div><a href="https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/SimpleAttributeDefinition.java#L140" class="">https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/java/org/jboss/as/controller/SimpleAttributeDefinition.java#L140</a></div><div><br class=""></div><div>Parsers are encouraged to invoke methods on AttributeDefinition to validate attribute values. Perhaps though those are better left alone, as the validators are meant to produce useful exception messages.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class="">Personally I think it’s ok to have this for only some failures. Others may<br class="">disagree though and start filing bug reports, leading to demands that we fix<br class="">said “bugs”, leading to a shift of resource away from other tasks.<br class=""><br class="">My instinct is it’s worth it though. I’m curious what others think.<br class=""><br class=""></blockquote><br class="">Adding more to the WildFly team's plate is a concern of mine as well.<br class="">I'm willing to do the work to finish this feature, and to help out<br class="">with any reported issues related to it in the future, but there would<br class="">still be some increase in the team's workload from it.<br class=""><br class=""><blockquote type="cite" class="">I think the path you’ve followed is a good way to get a lot of benefit<br class="">without being overly intrusive.<br class=""><br class="">A medium sized concern is this has to be robust. It can’t be producing<br class="">misleading messages, as that’s worse than simply pointing to the line/col of<br class="">where the mistake was.<br class=""><br class=""></blockquote><br class="">Agreed - there needs to be some confidence level that if the tool<br class="">can't meet for an error, it falls back to just pointing to the<br class="">line/col, printing the original message. I fact, that may be good<br class="">enough for the failures that bubble out of staxmapper as well.<br class=""><br class=""><blockquote type="cite" class="">A minor concern is how big the added dependencies are. (I don’t know.) We<br class="">want to keep WildFly Core small in footprint.<br class=""><br class=""></blockquote><br class="">Right now, the only dependencies vdx (31k) has are commons-lang (which<br class="">is already a module in WildFly, but not core-feature-pack),<br class="">xmlschema-walker (100k), and xmlschema-core (168k). For the rest of<br class="">the work, I don't currently see needing any more dependencies.<br class=""></div></div></blockquote><div><br class=""></div>Thanks. So about 583K including 284K for commons-lang. The current wildly-core-dist-3.0.0.Alpha3.zip is about 16.9MB, so this is fairly substantial.<br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class=""><blockquote type="cite" class="">Re: "Only the first validation issue is reported, but this is unavoidable,<br class="">since the subsystem parsers throw on the first error encountered” — I’m not<br class="">bothered by that at all. We’re booting a server, not validating a document.<br class="">If people are producing documents riddled with errors there are other tools<br class="">to use to help with that.<br class=""></blockquote><br class="">Makes sense, thanks.<br class=""></div></div></blockquote></div><br class=""><div class="">
<div class=""><span style="color: rgb(51, 51, 51); font-family: monospace; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; widows: 1; background-color: rgb(253, 253, 253);" class="">--</span><span style="color: rgb(51, 51, 51); font-family: monospace; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; widows: 1; background-color: rgb(253, 253, 253);" class=""> </span><br style="color: rgb(51, 51, 51); font-family: monospace; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; widows: 1;" class=""><span style="color: rgb(51, 51, 51); font-family: monospace; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; widows: 1; background-color: rgb(253, 253, 253);" class="">Brian Stansberry</span><br style="color: rgb(51, 51, 51); font-family: monospace; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; widows: 1;" class=""><span style="color: rgb(51, 51, 51); font-family: monospace; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; widows: 1; background-color: rgb(253, 253, 253);" class="">Manager, Senior Principal Software Engineer</span><br style="color: rgb(51, 51, 51); font-family: monospace; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; widows: 1;" class=""><span style="color: rgb(51, 51, 51); font-family: monospace; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; widows: 1; background-color: rgb(253, 253, 253);" class="">JBoss by Red Hat</span></div><div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""></div></body></html>