stevedlawrence commented on issue #80:
URL: https://github.com/apache/daffodil-sbt/issues/80#issuecomment-2567812097

   > For example, some users may not want to use/structure their projects using 
sbt, but will still want to be able to create a classpath easily that has all 
the dependent schemas/jars on it so they can compile a DFDL schema at the 
command line.
   
   This plugin requires SBT and all of SBT's dependency resolution capabilities 
to download Daffodil jars, locate schema dependencies, and generate a 
classpath. The plugin doesn't do any of that work itself. So something like 
creating a classpath really does require SBT. We probably don't want to have to 
implement dependency resolution ourselves.
   
   Note that aside from setting up dependencies, this plugin really only does 
two things:
   1. Remove a bunch of boiler plate common to DFDL SBT projects (e.g. 
scalaVersions, artifact publishing, dependencies, crossPaths, testOptions, 
flatLayout)
   2. The ability to create a saved parsers (and additionally use them during 
sbt test).
   
   The first things are specific to an SBT environment, and isn't really 
something that needs to be debugged or that a main class would help with.
   
   The second probably would be helpful to have a way to debug saving a schema. 
And we already have a main for that. When running `packageDaffodilBin`, what 
this plugin actually does is fork a java process like:
   ```
   java -classpath <classpath> org.apache.daffodil.DaffodilSaver <args>`
   ```
   The classpath comes from SBT and the DaffodilSaver class is a special class 
that is packaged alongside the plugin. So there is already a main class for 
creating saved parsers. Unfortunately, this main isn't really designed to be 
called by users from a CLI. The args are positional and sometimes change 
between different versions of the plugin, and I think it would be too difficult 
to try to maintain it like a real CLI tool. If we want to enable a way to debug 
this command, I would suggest we add a way to output this command from SBT and 
a user can execute it separately in a debug environment. This was one of the 
ideas in issue #76.
   
   Note that debugging `sbt test` in DFDL schema projects should already be 
possible. And that's all handled by SBT, so I don't think a main would help 
with that.
   
   So, I'm not sure a new main would provide much value in cases outside the 
context of SBT. The one case would probably be in the context of 
packageDaffodilBin capabilities, which I think is probably best described by 
issue #76, which is more about making that debuggable more than adding a new 
main class.


-- 
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]

Reply via email to