-
Notifications
You must be signed in to change notification settings - Fork 92
Allow overriding XMLReader used in parsing #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@SethTisue is there anything I can do for this to be merged? Thanks! |
let's try pinging @ashawley (ping!) and if we don't hear back, I'm happy to optimistically hit "merge". the changes look fine to me, but I'm not really a good judge since I don't know this library or its code very well would you like to be added as a maintainer in this repo? you seem to be the only one actively working on the code |
I also do not know the code that well, and would like for somebody to look over my changes - I do not want to accidentally break XML support for everybody ;)
I do have plans for a couple more pull requests, and I don't mind to be notified of other people's pull requests so that I can take a look - if that is what "maintainer" means in this context, but I have no clue how releases are done here, so you will have to continue to do those honors ;) Thank you! |
I predict it is a nice enhancement. I also don't have any comment on the specific changes. They look fine. |
I'd only raise that it may produce binary compatibilities in 2.0. We were going to rely on the version policy plugin, that is inherited from the sbt Scala module plugin used here, to be the minder on these issues, but it was disabled, see #617. |
I've submitted #641 to re-enable MiMa. Once it's merged, this PR could be rebased on top of it so we're sure it's not breaking backwards bincompat. (It's fine to break forwards bincompat; it just means the next version will need to be 2.2.0, not 2.1.1.) |
Understood, but also, we need to strike some kind of balance here between caution and paralysis, otherwise the library becomes impossible to improve at all. It's not the end of the world if we accidentally break something. Bugs happen. If someone notices a regression, they can report it here and downgrade to the previous version temporarily, and we'll figure out where to go from there. We should be as careful as we reasonably can, but emphasis on “reasonably”.
Well, watching the repo is sufficient to get notified of PRs. By “maintainer” I mean the following things:
sbt-ci-release (which includes sbt-dynver) makes it quite easy: you can make the release in the GitHub UI, and when GitHub Actions notices the release's tag (e.g. Then I (or someone else from the Scala org) will, on request, manually release the staging repo. (We retain this manual step for a little added security and quality control, since although the code is community-maintained the artifacts are published under the org.scala-lang.modules org, so the Scala org bears some responsibility.) These days GitHub will even write some minimally acceptable the release notes for you, by seeing what PRs were merged since the previous release. It can be nice to make some improvements by hand. |
…Parser()` method. Some XML parsing customizations require changing the XMLReader contained inside every SAXParser (e.g., adding an XMLFilter). This pull request introduces an additional extension point `XMLLoader.reader` and a method `XML.withXMLReader()` for such a purpose. Also, ErrorHandler and EntityResolver configured externally are no longer wiped out before parsing the XML.
Rebased; it seems that compatibility did not break.
Please define "reasonable amount of time" ;)
Let's try it - I'll yell if I get overwhelmed ;) Thanks! |
Heh... well, at the short end of “reasonable”, if something is really routine, like an sbt version bump or something, I'll typically let it sit for a couple days, just in case, or even just merge it right away. At the long end of “reasonable”, if we're going to do something especially momentous, I might wait two or three weeks, especially if there's a key person we haven't heard from yet. I guess for a typical PR we'd wait a week or so, something like that?
👍! #642 |
scala.xml.XML
allows overriding the SAXParser used via thewithSAXParser()
method. Some XML parsing customizations require changing the XMLReader contained inside every SAXParser (e.g., adding an XMLFilter). This pull request introduces an additional extension pointXMLLoader.reader
and a methodXML.withXMLReader()
for such a purpose.Also, ErrorHandler and EntityResolver configured externally are no longer wiped out before parsing the XML.