Proper incremental TSV parser
Addresses #380.
This MR introduces a new function called parseTsvWithDiagnostics
which is used to implement the parseTsvC
function, used for importing new documents in Gargantext.
The parseTsvWithDiagnostics
is an incremental function using cassava
's incremental parser API, which allows us to incrementally parse each and every row of a document, collecting any error as we go.
I have used the original .tsv
data from ticket #380 and now it parses as it should, discarding the last problematic row.
I have also added a new emitWarning
function to the MonadJobStatus
API, which we now use to emit all such warnings.
I suspect that we will need to modify the frontend to handle them; I will open a separate ticket for that.