There's an assert in
jobs.py that does not resolve rule script path correctly, causing the
--list-code-changes to fail for any rules that are not defined in the top level directory and have a script.
The assert in question is here: https://bitbucket.org/snakemake/snakemake/src/56dade73ee707b3e3879a6bf6f5dc46cd82c4ce9/snakemake/jobs.py#lines-165
To reproduce, create the following directory tree:
- subfolder/script.py - subfolder/test.smk - foo - Snakefile
rule brokenscriptpaths: input: "foo" output: "bar" script: "script.py"
include: "subfolder/test.smk" rule all: input: "bar"
subfolder/script.py can be empty for the purposes of this example.
With this directory structure
will work as expected.
Changing the script path to
subfolder/script.py in the rule will fix list code changes, but break the actual snakemake pipeline.