Open mbeckerle opened 1 week ago
You need to tell the plugin what schema to compile using daffodilPackageBinInfos
.
Also, if your tdml tests use the saved parser file you need to set daffodilTdmlUsesPackageBin := true
.
Maybe we should output a warning if the packageDaffodilBin
task is run but either daffodilPackageBinVersions
or daffodilPackageBinInfos
is empty? One or both of those being empty means packageDaffodilBin
won't do anything.
A warning that it is being ignored would be a good fix. I'll change title of this issue.
Actually, I'm unable to get this to work, and at least one issue is not finding schemas in "src" for flattened schema style.
See this PR: https://github.com/DFDLSchemas/faketdl/pull/1
I think the schema path might require a leading /
since it's a resource path. Maybe we should also warn if it's that's missing?
As part of this, we should improve our warnings/errors related to daffodilPackageBin. We should error if a resource path does not start with a /
. We should also improve our error related to "duplicate classifiers" to make it more human friendly. It's not clear what "duplicate classifiers" even means. We should make change this error message so it's more obvious what the problem is and how to fix it.
I would add that the DaffodilBinInfo object takes an arg named root and an arg named name, as if these concepts were orthogonal.
I don't think they should be orthogonal. Users don't need that much control.
Consider fakeTDL (on DFDLSchemas github)
Two bin files are created for each version of daffodil.
dfdl-fakeTDL-1.0.0-fakeTDL-daffodil350.bin
dfdl-fakeTDL-1.0.0-fakeTDLFile-daffodil350.bin
I don't see why the root element name isn't just always used as the classifier in the name.
I don't know why users need to be able to give alternate names like just "file" instead of putting the root element name into the file name always. But at least the default should use the root element name in the file name.
That's fair. I think we could make it so that if root
is defined but name
is None
then we just default to using root as the name, maybe with QName prefixes stripped off or something. One downside is you couldn't specify a root without making the resulting name more verbose, but maybe that's not a big deal, since if you really wanted that you could just specify the root element first in the schema and you wouldn't have to provide a root parameter.
My build.sbt:
When I issue
sbt clean test packageDaffodilBin
test runs, but nothing is created in target directory.