You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by stevedlawrence <gi...@git.apache.org> on 2017/11/01 11:53:19 UTC

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

GitHub user stevedlawrence opened a pull request:

    https://github.com/apache/incubator-daffodil/pull/2

    Daffodil 1856 - Updates to for Apache incubation

    This is split up into 4 commits to make things easier to review:
    
    1. Remove old files
    2. Move the directory layout. All changes are a 100% rename
    3. Update package and xml namespaces to be apache based, adding backwards compatability for namespaces
    4. Changes to add "Apache" and "incubating" where necessary, including updating the version to include "-incubating" and to be manually updated.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/stevedlawrence/incubator-daffodil daffodil-1856-incubating

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-daffodil/pull/2.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2
    
----
commit 4dd5ef6bdd6c7172611e6375faabe2e2a8a10d12
Author: Steve Lawrence <sl...@apache.org>
Date:   2017-10-26T16:44:51Z

    Remove unused files and cruft
    
    Over the years many files have been added to the repo that are no longer
    used. This includes old test files, out of date documentation, scripts
    that have since been replaced by the CLI, and schemas that have been
    moved to external repositories. This removes these files from this
    repository to make the transition to Apache easier and cleaner.
    
    DAFFODIL-1856

commit 8c98a49b4608acae5cf7fb8333d6a2265b37ce93
Author: Steve Lawrence <sl...@apache.org>
Date:   2017-10-26T16:44:58Z

    Move directory layout from edu/illinois/ncsa to org/apache
    
    This does not change content, this just moves files to the new
    org.apache namespace directory layout. All files in here should appear
    like a 100% rename.
    
    DAFFODIL-1856

commit b8fe1cc96838172cd5c403817045fd1bfe7e739a
Author: Steve Lawrence <sl...@apache.org>
Date:   2017-10-26T16:45:06Z

    Replace instances of ncsa.illinois.edu with apache.org
    
    - Update urls to reference daffodil.apache.org
    - Update package names to be org.apache.daffodil. This breaks API
      backwards compatibility, but only requires a small change to update
      imports
    - Add new xml namespace for daffodil.apache.org. This maintains backwards
      compatibility with the previous namespace, and provides a pattern for
      adding new namespace versions for when that may be needed. All tests
      are updated to use the new namespace.
    
    DAFFODIL-1856

commit 4b4c46ec8e5b001ef35d5e45334c58127e69f876
Author: Steve Lawrence <sl...@apache.org>
Date:   2017-10-26T16:45:12Z

    Include "Apache" and "incubating" where appropriate
    
    - Add Apache incubating DISCLAIMER
    - Remove the use of git to determine version numbers. That did not
      interact well with the new 'incubating' version number. The version is
      now hardcoded in build.sbt and needs to be updated manually. Not only
      does this reduce complexity, it allows one to build Daffodil from
      source tarballs without needing git installed and without needing
      certain branches and tags.
    
    DAFFODIL-1856

----


---

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

Posted by stevedlawrence <gi...@git.apache.org>.
Github user stevedlawrence closed the pull request at:

    https://github.com/apache/incubator-daffodil/pull/2


---

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

Posted by johnament <gi...@git.apache.org>.
Github user johnament commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/2#discussion_r148242215
  
    --- Diff: build.sbt ---
    @@ -21,7 +23,7 @@ testOptions in ThisBuild += Tests.Argument(TestFrameworks.JUnit, "-v")
     
     transitiveClassifiers := Seq("sources", "javadoc")
     
    -resolvers in ThisBuild += "NCSA Sonatype Releases" at "https://opensource.ncsa.illinois.edu/nexus/content/repositories/releases"
    +resolvers in ThisBuild += "NCSA Sonatype Releases" at "https://daffodil.apache.org/nexus/content/repositories/releases"
    --- End diff --
    
    This url doesn't work.


---

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

Posted by johnament <gi...@git.apache.org>.
Github user johnament commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/2#discussion_r148242313
  
    --- Diff: daffodil-cli/DISCLAIMER ---
    @@ -0,0 +1,7 @@
    +Apache Daffodil is an effort undergoing incubation at The Apache Software
    --- End diff --
    
    The disclaimer should only have to appear once, in the source root.  If this is the root of the binary artifact that's fine, but its ideal if it can be a single entry.


---

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

Posted by stevedlawrence <gi...@git.apache.org>.
Github user stevedlawrence commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/2#discussion_r148241914
  
    --- Diff: daffodil-core/src/main/scala/org/apache/daffodil/dsom/IIBase.scala ---
    @@ -179,7 +179,17 @@ abstract class IIBase(xml: Node, xsdArg: XMLSchemaDocument, val seenBefore: IIMa
         res
       }.value
     
    -  final lazy val schemaLocationProperty = getAttributeOption("schemaLocation")
    +  final lazy val schemaLocationProperty = {
    +    val prop = getAttributeOption("schemaLocation")
    +    prop.map { text =>
    +      if (text.contains("edu/illinois/ncsa/daffodil")) {
    +        SDW("schemaLocation property uses deprecated edu/illinois/ncsa/daffodil path instead of org/apache/daffodil. Converting to new path.")
    +        text.replace("edu/illinois/ncsa/daffodil", "org/apache/daffodil")
    +      } else {
    +        text
    +      }
    +    }
    +  }
    --- End diff --
    
    Supports backwards compatibility for schemas that still reference the old paths. For example, it is common to have an import with schemaLocation="edu/illinois/ncsa/daffodil/built-in-formats.xsd"


---

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

Posted by johnament <gi...@git.apache.org>.
Github user johnament commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/2#discussion_r148242436
  
    --- Diff: daffodil-cli/src/main/scala/org/apache/daffodil/debugger/CLIDebuggerRunner.scala ---
    @@ -0,0 +1,85 @@
    +/* Copyright (c) 2012-2015 Tresys Technology, LLC. All rights reserved.
    --- End diff --
    
    We'll typically only change package name once the SGA is on file and we can remove copyright.


---

[GitHub] incubator-daffodil issue #2: Daffodil 1856 - Updates to for Apache incubatio...

Posted by stevedlawrence <gi...@git.apache.org>.
Github user stevedlawrence commented on the issue:

    https://github.com/apache/incubator-daffodil/pull/2
  
    Seems reasonable. I'll close this pull request and create a new one that just adds the Apache incubator stuff and a few other minor things, plus addresses the comments in this thread.


---

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

Posted by stevedlawrence <gi...@git.apache.org>.
Github user stevedlawrence commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/2#discussion_r148246652
  
    --- Diff: daffodil-cli/DISCLAIMER ---
    @@ -0,0 +1,7 @@
    +Apache Daffodil is an effort undergoing incubation at The Apache Software
    --- End diff --
    
    This was done because the daffodil-cli directory is a subproject, and there are some cases where SBT will prevent one from pulling in files outside of a subdirectory. This might not be one of those cases, I'll see if there is a way to only have one file.


---

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

Posted by stevedlawrence <gi...@git.apache.org>.
Github user stevedlawrence commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/2#discussion_r148247029
  
    --- Diff: daffodil-cli/src/main/scala/org/apache/daffodil/debugger/CLIDebuggerRunner.scala ---
    @@ -0,0 +1,85 @@
    +/* Copyright (c) 2012-2015 Tresys Technology, LLC. All rights reserved.
    --- End diff --
    
    Ok. So maybe we should hold off on the two commits that change the directory layout and package names/XML namespaces for now.


---

[GitHub] incubator-daffodil issue #2: Daffodil 1856 - Updates to for Apache incubatio...

Posted by stevedlawrence <gi...@git.apache.org>.
Github user stevedlawrence commented on the issue:

    https://github.com/apache/incubator-daffodil/pull/2
  
    Regarding the "-incubating" comment in the version, I was just following what other projects seemed to do. If it's only required in the source release, I'd probably prefer to not include it in the version. It added a little extra complexity and makes the version numbers a bit messy.


---

[GitHub] incubator-daffodil issue #2: Daffodil 1856 - Updates to for Apache incubatio...

Posted by johnament <gi...@git.apache.org>.
Github user johnament commented on the issue:

    https://github.com/apache/incubator-daffodil/pull/2
  
    Please note - the requirement is to have the word "incubating" in the source release.  There is no requirement that the version # has to include "incubating" but most people find this the easiest way to handle it.  It has the downside that your convenience binaries now unnecessarily include "-incubating" in them.


---

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

Posted by stevedlawrence <gi...@git.apache.org>.
Github user stevedlawrence commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/2#discussion_r148241627
  
    --- Diff: daffodil-core/src/main/scala/org/apache/daffodil/dpath/Expression.scala ---
    @@ -1302,13 +1302,22 @@ case class FunctionCallExpression(functionQNameString: String, expressions: List
         val FUNC = XMLUtils.XPATH_FUNCTION_NAMESPACE
         val MATH = XMLUtils.XPATH_MATH_NAMESPACE
         val XSD = XMLUtils.XSD_NAMESPACE
    -    val DAF = XMLUtils.EXT_NS
    +    val DAF_NCSA = XMLUtils.EXT_NS_NCSA
    +    val DAF_APACHE = XMLUtils.EXT_NS_APACHE
         val funcObj = (functionQName, expressions) match {
     
    -      case (RefQName(_, "trace", DAF), args) =>
    +      case (RefQName(_, "trace", DAF_NCSA), args) =>
             DAFTraceExpr(functionQNameString, functionQName, args)
     
    -      case (RefQName(_, "error", DAF), args) => {
    +      case (RefQName(_, "trace", DAF_APACHE), args) =>
    +        DAFTraceExpr(functionQNameString, functionQName, args)
    +
    +      case (RefQName(_, "error", DAF_NCSA), args) => {
    +        SDW("Expression daf:error is deprecated. Use fn:error instead")
    +        DAFErrorExpr(functionQNameString, functionQName, args)
    +      }
    +
    +      case (RefQName(_, "error", DAF_APACHE), args) => {
             SDW("Expression daf:error is deprecated. Use fn:error instead")
             DAFErrorExpr(functionQNameString, functionQName, args)
    --- End diff --
    
    Changes to support xml namespace backwards compatibility.


---

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

Posted by stevedlawrence <gi...@git.apache.org>.
Github user stevedlawrence commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/2#discussion_r148245664
  
    --- Diff: build.sbt ---
    @@ -21,7 +23,7 @@ testOptions in ThisBuild += Tests.Argument(TestFrameworks.JUnit, "-v")
     
     transitiveClassifiers := Seq("sources", "javadoc")
     
    -resolvers in ThisBuild += "NCSA Sonatype Releases" at "https://opensource.ncsa.illinois.edu/nexus/content/repositories/releases"
    +resolvers in ThisBuild += "NCSA Sonatype Releases" at "https://daffodil.apache.org/nexus/content/repositories/releases"
    --- End diff --
    
    Actually, this line doesn't even belong in here anymore. Daffodil does not require dependencies from anything on NCSA. I'll remove this line.


---

[GitHub] incubator-daffodil issue #2: Daffodil 1856 - Updates to for Apache incubatio...

Posted by mbeckerle <gi...@git.apache.org>.
Github user mbeckerle commented on the issue:

    https://github.com/apache/incubator-daffodil/pull/2
  
    I'd really like to schedule this change specifically. I.e., coordinate so all outstanding work is committed, then this change occurs. Because I have outstanding changes that include removal and renaming of files, movement of code from class to class and file to file. 
    
    Past experience has told me that major rename/relabel events need to happen without putting a huge burden on those with major sets of outstanding changes. 
    
    In other words. I'd like 60 days notice before this happens.


---

[GitHub] incubator-daffodil pull request #2: Daffodil 1856 - Updates to for Apache in...

Posted by stevedlawrence <gi...@git.apache.org>.
Github user stevedlawrence commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/2#discussion_r148242411
  
    --- Diff: daffodil-lib/src/main/scala/org/apache/daffodil/xml/XMLUtils.scala ---
    @@ -339,20 +339,24 @@ object XMLUtils {
        *
        * These definitions must match their XSD counterparts in dafint.xsd and dafext.xsd
        */
    -  private val DAFFODIL_EXTENSIONS_NAMESPACE_ROOT = "urn:ogf:dfdl:2013:imp:opensource.ncsa.illinois.edu:2012" // TODO: finalize syntax of this URN
    -  private val DAFFODIL_EXTENSION_NAMESPACE = NS(DAFFODIL_EXTENSIONS_NAMESPACE_ROOT + ":ext")
    -  private val DAFFODIL_INTERNAL_NAMESPACE = NS(DAFFODIL_EXTENSIONS_NAMESPACE_ROOT + ":int")
    -  val EXT_PREFIX = "daf"
    -  val EXT_NS = NS(DAFFODIL_EXTENSION_NAMESPACE.uri)
    -  val INT_PREFIX = "dafint"
    +  private val DAFFODIL_EXTENSIONS_NAMESPACE_ROOT_NCSA = "urn:ogf:dfdl:2013:imp:opensource.ncsa.illinois.edu:2012"
    +  private val DAFFODIL_EXTENSION_NAMESPACE_NCSA = NS(DAFFODIL_EXTENSIONS_NAMESPACE_ROOT_NCSA + ":ext")
    +  val EXT_PREFIX_NCSA = "daf"
    +  val EXT_NS_NCSA = NS(DAFFODIL_EXTENSION_NAMESPACE_NCSA.uri)
    +
    +  private val DAFFODIL_EXTENSIONS_NAMESPACE_ROOT_APACHE = "urn:ogf:dfdl:2013:imp:daffodil.apache.org:2017"
    +  private val DAFFODIL_EXTENSION_NAMESPACE_APACHE = NS(DAFFODIL_EXTENSIONS_NAMESPACE_ROOT_APACHE + ":ext")
    +  val EXT_PREFIX_APACHE = "daf"
    +  val EXT_NS_APACHE = NS(DAFFODIL_EXTENSION_NAMESPACE_APACHE.uri)
    +
    +  private val DAFFODIL_INTERNAL_NAMESPACE = NS(DAFFODIL_EXTENSIONS_NAMESPACE_ROOT_APACHE + ":int")
    +  val INT_PREFIX= "dafint"
    --- End diff --
    
    New XML Namespace defined.  Support for the NCSA namespace is still provided for backwards compatibility. The internal namespace does not maintain comapt, since it's internal only.


---