rombert commented on PR #168: URL: https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/168#issuecomment-1538459954
I pushed this additional test + a revert of SLING-11421 to https://github.com/apache/sling-org-apache-sling-feature-cpconverter/tree/issue/SLING-11865-with-revert . You can see exactly what is being generated by running those tests. The particular file that triggers the problem gets converted to ```xml <?xml version='1.0' encoding='UTF-8'?> <jcr:root xmlns="" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" xmlns:my="http://namespace.com/my" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" jcr:primaryType="nt:unstructured" description="{String}This node has been created by a sling bundle." title="{String}My first node"> <cq:EditConfig jcr:primaryType="cq:EditConfig" description="{String}Some dummy data from sling initial content."> <cq:listeners jcr:primaryType="cq:EditListenersConfig" description="{String}Some dummy data from sling initial content."> </cq:listeners> </cq:EditConfig> <graniteComponent jcr:primaryType="sling:Folder" jcr:mixinTypes="[granite:Component]"> <granite:data jcr:primaryType="nt:unstructured" description="{String}Some dummy data from sling initial content."> </granite:data> <my:subnode jcr:primaryType="nt:unstructured" description="{String}Some dummy data from sling initial content."> </my:subnode> </graniteComponent> </jcr:root> ``` To your point on whether this is a behaviour to keep or not, in Sling we try hard to preserve backwards compatiblity, and that breaking existing projects is a very big change which we should only do for very good reasons. Being too restrictive with what we accept as input will only hurt adoption of new versions of CP Converter, leaving deployments on old versions because upgrading was too inconvenient. Again, this is a conversion that worked on 1.3.0 and not on 1.3.2 and that was installable using the JCR ContentLoader. If you do believe that this is something that must be eventually enforced, let's please start with a warning and make the behaviour opt-in via a command line flag, so consumers can control the evolution of their project. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
