Policy for checking which fields were used for transformation #248
Labels
enhancement
help wanted
relatively easy but not small
Task with requires some knowlege and writing more code, but not the intimate knoledge about macros
Milestone
Some users would find it useful to be able to fail compilation if some/all fields from source were not used during derivation. Example of such thing was asked in this StackOverflow question: https://stackoverflow.com/questions/73927120/chimeny-scala-validate-source .
Such feature was implemented in ducktape so alternative libraries already decided that it is worth providing.
We could consider adding some/all of the setting:
.requireSourceFieldsUsed
.requireSourceFieldsUsed(_.fieldA, _.fieldB, _.fieldC)
.requireSourceFieldsUsedExcept(_.fieldA, _.fieldB)
.requireTargetSubtypesUsed
.requireTargetSubtypeUsed[SubType]
.requireTargetSubtypeNotUsed[SubType]
The text was updated successfully, but these errors were encountered: