stevedlawrence commented on issue #80:
URL: https://github.com/apache/daffodil-sbt/issues/80#issuecomment-2567983892
SBT actually has a command that is actually very similar to this idea, the
"export" command. From `sbt 'help export'`:
```
export [--last] <task>+
Runs the specified tasks and prints the equivalent command lines or
other exportable
information for those runs.
--last
Uses information from the previous execution
NOTES: These command lines are necessarily approximate. Usually tasks
do not actually
execute the command line and the actual command line program may not be
installed or
on the PATH. Incremental tasks will typically show the command line
for an
incremental run and not for a full run. Many tasks have no direct
command line
equivalent and will show nothing at all.
```
So if we can tell SBT that the "exportable information" for the
`packageDaffodilBin` task is the java command that the plugin fork/execs, then
users can just run `sbt "export packageDaffodilBin"` and they'll see the exact
command that the plugin uses. That can then be copied/pasted into a shell
script or added to an IDE to debug.
From what I can tell, adding the "exportable information" is just a matter
of writing to a special stream, so I think it's just a couple of lines.
We'll definitely need some documentation for this since the "export" command
seems pretty uncommon (I think it only works for outputting classpaths and
scalac/scaladoc commands), but this seems like the intended way to do this kind
of thing in SBT.
--
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]