Make -D- option for compiled datalog behave same as if interpreted #2401
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Makes compiled datalog handle -D- option as interpreted datalog. Fixes #2348
It is a second and less inclusive attempt after #2400.
Change slightly the generated code so that, if the output directory is
-
the io config is stdout.As I said in #2400:
I don't know what is the best solution, to change slightly the generated code so that it puts
"IO"
to"stdout"
when the output file is-
or to change methodIOSystem::getWriter
to do the change before getting the appropriate factory.In my opinion
IOSystem
should not have this intelligence and it should just expect the caller to know where it wants to put the output.. I'll try to do the change in the generated code, doing it in thegetWriter
method would be a piece of cake if we want to go for this solution afterwards.Before:
After:
I still don't know how to test that, if you have any pointer to do that I would add a test to the PR.