You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 21, 2018. It is now read-only.
Xml module is not able to dispatch a valid Extractor from nested structures when the extraction of some middle elements has been customized. The behavior has been observed starting from nested structures greater than three elements. See the next code snippet as an example of this issue:
objectRaptureXmlOk {
importrapture.xml._caseclassFoo(bar: Bar)
caseclassBar(baz: Baz)
caseclassBaz(qux: Qux)
caseclassQux(value: String)
implicitly[Extractor[Bar, Xml]] // works
implicitly[Extractor[Foo, Xml]] // works
}
// REPL// :paste// Entering paste mode (ctrl-D to finish)// CTRL +D// Exiting paste mode, now interpreting.// defined object RaptureXmlOkobjectRaptureXmlKo {
importrapture.xml._, xmlBackends.stdlib._caseclassFoo(bar: Bar)
caseclassBar(baz: Baz)
caseclassBaz(qux: Qux)
objectBaz {
// custom extractor in order to be able to extract this:// xml"""<foo><bar><baz><value>xxx</value></baz></bar></foo>""".as[Foo]// i.e. without the extra <qux>...</qux>implicitvalbazExtractor:Extractor[Baz, Xml] =Xml.extractor[Qux].map(Baz(_))
}
caseclassQux(value: String)
implicitly[Extractor[Bar, Xml]] // works
implicitly[Extractor[Foo, Xml]] // fails!!!
}
// REPL// :paste// Entering paste mode (ctrl-D to finish)// CTRL +D// Exiting paste mode, now interpreting.// <console>:27: error: cannot extract type RaptureXmlKo.Foo from rapture.xml.Xml.// implicitly[Extractor[Foo, Xml]] // fails!!!
The text was updated successfully, but these errors were encountered:
Thanks for the report, @juanjovazquez! We've shifted development to a complete rewrite called Xylophone which avoids several of the fundamental problems with Rapture XML, though we haven't yet got the generic serialization and extraction done. However, I think this is a known problem, which is fixed in the latest source, and will certainly be fixed in Xylophone when it's ready. (Hopefully quite soon!)
I'll leave this open for now as a reminder to check it in Xylophone.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Xml
module is not able to dispatch a validExtractor
from nested structures when the extraction of some middle elements has been customized. The behavior has been observed starting from nested structures greater than three elements. See the next code snippet as an example of this issue:The text was updated successfully, but these errors were encountered: