Refactor handling of red/green for new contracts #412
Merged
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.
Previously, the behaviour of
write_when.calls.green
andwrite_when.puts.red
was such that each option was treated as "only write when red/green", but this was confusing and had a bug.Now, there are separate red/green options for both puts and calls, and they can be set per-symbol. Now there are (with default values):
write_when.puts.red=true
andwrite_when.puts.green=false
write_when.calls.green=true
andwrite_when.calls.red=false
You can also specify these on a per-symbol basis with
symbols.<symbol>.<right>.write_when.(green|red)
.Refer to thetagang.toml for details.
If you had previously used the default config, or didn't specify these values, then the behaviour should remain unchanged. You may want to verify your settings. You can keep the default behaviour with:
Thetagang will still respect the setting for write thresholds.
This resolves #410.