There is not currently a setting that does that. We could probably add one
pretty easily, but it feels like it could be a bit fragile?
For example, say this new setting is enabled and you run packageDaffodilBin to
build a saved parser and you run "sbt test" and all test pass. Then you make
changes to the schema that accidentally break things, but forget to run
"packgeDaffodilBin". If you run "sbt test" all the tests will pass because
you're using an older saved parser even though they should fail. The current
logic detects when schema changes have been made and will force a rebuild when
you run tests.
Would it work to temporarily change daffodilTdmlUsesPackageBin to false while
you do things that don't need a binary and then change it back when your done?
Or would there be too much switching?
If that would be too much of a headache, we can definitely add setting, but it
would have to come with a warning that it's up to the user to not forget to
rebuild schemas when running tests. We might be able to output a warning if
tests are run and the cache is old, but dealing with SBT cache is tricky, so it
might not be possible.
On 2024-10-25 07:56 PM, Mike Beckerle wrote:
So in IntelliJ when I run a main app that is part of src/test/scala, the build
process runs packageDaffodilBin and that recompiles the entire schema.
This takes *minutes* for this large schema.
Is there a setting I can use to tell it to only recompile the binary schema when
I specifically request it by 'sbt packageDaffodilBin' ?
I don't want to turn off use of the binary by TDML tests. I just want to turn
off all automatic such compilation.
If the compiled binary doesn't exist I want a diagnostic error from whatever was
looking for it, not an automatic recompile.