commit | 4c17bfed49942588d0ea10981e3eb131b3cc71e5 | [log] [tgz] |
---|---|---|
author | Mike McGann <mmcgann@owlcyberdefense.com> | Wed May 31 07:56:52 2023 -0400 |
committer | Steve Lawrence <slawrence@apache.org> | Fri Jun 02 07:52:30 2023 -0400 |
tree | a5084b55583f4ed6882f1387f0626273f219d5c1 | |
parent | cad16dbd4b637ac288b6a065d79e9fb198a66c42 [diff] |
Remove warnings in serialized parser Currently, when a DataProcessor is serialized using the save() function, warnings generated during compilation are also serialized. But this behavior is not needed, and can sometimes lead to excessive diagnostics when reloading. To avoid this, this moves the diagnostics member from the SchemaSetRuntimeData to the DataProcessor, and clears that member before serialization. This also discovered an issue where the TDML runner was not correctly checking for errors vs warnings and would accept messages of the wrong type. This fixes that, which requires changes to some expected errors/warnings. That change also uncovered a bug where we only output a warning instead of an error if the main schema is not a DFDL schema. This was caused by an incorrect comparison in the "allSchemaFiles" logic, which also needed to be a LV to handle the SDE correctly. Also, the DaffodilTDMLDFDLProcessor has a getDiagnostics() function to return compile time diagnostics. However, with this change, if a processor is saved and reloaded by the TDML runner (which happens for most tests) those diagnostics are lost. Because getDiagnostics may or may not actually have diagnostics, this is an unreliable API and so is removed. Instead, diagnostics should only be taken from the CompileResult. For consistency, the isError function is also removed and should only be determined based on the CompileResult. Some asserts were added to make sure the CompileResult makes sense, and dead code removed where it was impossible to have a bad processor. DAFFODIL-2803
Apache Daffodil is an open-source implementation of the DFDL specification that uses DFDL data descriptions to parse fixed format data into an infoset. This infoset is commonly converted into XML or JSON to enable the use of well-established XML or JSON technologies and libraries to consume, inspect, and manipulate fixed format data in existing solutions. Daffodil is also capable of serializing or “unparsing” data back to the original data format. The DFDL infoset can also be converted directly to/from the data structures carried by data processing frameworks so as to bypass any XML/JSON overheads.
For more information about Daffodil, see https://daffodil.apache.org/.
See BUILD.md for more details and DEVELOP.md for a developer guide.
sbt is the officially supported tool to build Daffodil. Below are some of the more commonly used commands for Daffodil development.
Compile source code:
sbt compile
Run unit tests:
sbt test
Run slower integration tests:
sbt daffodil-test-integration/test
Build the command line interface (Linux and Windows shell scripts in daffodil-cli/target/universal/stage/bin/
; see the Command Line Interface documentation for details on their usage):
sbt daffodil-cli/stage
Run Apache RAT (license audit report in target/rat.txt
and error if any unapproved licenses are found):
sbt ratCheck
Run sbt-scoverage (report in target/scala-ver/scoverage-report/
):
sbt clean coverage test daffodil-test-integration/test sbt coverageAggregate
You can ask questions on the dev@daffodil.apache.org or users@daffodil.apache.org mailing lists. You can report bugs via the Daffodil JIRA.
Apache Daffodil is licensed under the Apache License, v2.0.