apache / apache/daffodil-sbt

Documentation needed on how to debug packageDaffodilBin

Open
#76 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
2
Forks
7
PR merge metrics
No merged PRs in 30d

Description

The packageDaffodilBin task forks a process with a custom classpath, which makes it difficult to debug.

We need to determine a way to make this easier and document it somewhere. This issue is more about debugging Daffodil than the plugin, so the documentation may want to live in the Daffodil wiki, but changes to the plugin might be useful to aid in getting things set up.

One example, currently it's possible to get the classpath used "sbt test" by running a command like this:

```
export DAFFODIL_CLASSPATH=$(sbt -batch -error "export fullClasspath")
```

This classpath is the same as what is used by daffodilPackageBin if daffodilPackageBinVersions is the same as daffodilVersion.

You can then run the Daffodil CLI with that classpath (e.g. daffodil save-parser -s ...) and get essentially the same results as packageDaffodilBin. From there it is just a matter of debugging the CLI.

Another option might be a way to output the arguments that packageDaffodilBin uses to fork, and then those arguments can copied and run in a debugger. That might avoids issues with setting up the classpath.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the packageDaffodilBin task and the example using `sbt -batch -error "export fullClasspath"`; compare that classpath with `daffodilPackageBin` when `daffodilPackageBinVersions` matches `daffodilVersion`. Check the Daffodil CLI debugging flow and decide whether the completed documentation belongs in the Daffodil wiki or whether plugin changes are needed. Done means a newcomer can reproduce packageDaffodilBin behavior and debug it.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
developer-experience, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.