Skip to content

Breaking change in version 9.11.9: all input files must not be empty even if they are not used #3801

@corneliusroemer

Description

@corneliusroemer

When upgrading to snakemake >=9.11.9 a workflow that worked in the past started failing with: Empty file path encountered. This is likely unintended.

We were setting the input file path to only be non-empty when the rule was actually being used. In the past this was fine. But this PR #3769 changed that behavior at a minor version increment.

Our code looked like this (over at nextstrain/mpox):

rule add_private_data:
    """
    This rule is conditionally added to the DAG if a config defines 'private_sequences' and 'private_metadata'
    """
    input:
        sequences=build_dir + "/{build_name}/good_sequences.fasta",
        metadata=build_dir + "/{build_name}/good_metadata.tsv",
        private_sequences=config.get("private_sequences", ""),
        private_metadata=config.get("private_metadata", ""),

https://github.com/nextstrain/mpox/blame/906b020667d33b6570f950d148bc44da98683425/phylogenetic/rules/prepare_sequences.smk#L66-L75

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions