summaryrefslogtreecommitdiff
path: root/test-snakemake-mode.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-10-31 20:08:31 -0400
committerKyle Meyer <kyle@kyleam.com>2016-11-01 22:04:11 -0400
commit82afce155a22c5b93a165945cc17e095485d6b7e (patch)
tree18e0d09b24dd78317e5e32c09d3c00ce2b0a12f8 /test-snakemake-mode.el
parent13620417f99495f74b17cd2d9ca3c37551dbb120 (diff)
downloadsnakemake-mode-82afce155a22c5b93a165945cc17e095485d6b7e.tar.gz
Change approach for detecting invalid targets
Initially (7374840), snakemake-check-target only used regular expressions to detect invalid targets based on the presence of a MissingRuleException or RuleException in Snakemake's output. The target was assumed to be valid if these exceptions weren't found. If there was a non-zero exit status for another reason, it bubbled up to the compile call where it was visible to the user. 33a7c90 (snakemake-check-target: Adjust for upstream output, 2016-09-01) restricted the invalid target check to calls with an exit status of zero. This makes the regular expression check useless because snakemake should always exit with a non-zero status if a MissingRuleException or RuleException is thrown. Due to this change, snakemake-check-target classified all non-zero exits as invalid and all zero exits as valid. While this often gives the right answer, it doesn't in cases where the non-zero exit is unrelated to an invalid target. 2bceb7f (snakemake-check-target: Recognize protected items, 2016-09-05) addressed one case. To deal with other cases (such as an ambiguous rule error or a syntax error in the Snakefile), use the following approach. * An exit status of zero indicates a valid target. * A non-zero exit status indicates an invalid target if snakemake-all-rules has an exit status of zero. Otherwise, snakemake-all-rules will signal an error and display the Snakemake output. The main downside of this approach is the need to call snakemake twice. The output of snakmake-all-rules is cached, so this is only the case on the first call to snakemake-check-target for a given version of a Snakefile.
Diffstat (limited to 'test-snakemake-mode.el')
0 files changed, 0 insertions, 0 deletions