snakecharm icon indicating copy to clipboard operation
snakecharm copied to clipboard

#260 Error for using reference expression without defining args, when it is necessary

Open artemd24 opened this issue 5 years ago • 2 comments

Error for using reference expression without defining args, when it is necessary.

Fixes: #260

artemd24 avatar Aug 11 '20 13:08 artemd24

260 issue is only partially implemented, e.g not proper highlighting for case + the only error shown is incorrect

image

rule r260_output1:
    output: "foo{genome}{boo}.dd"
    input: "foo{genome}{boo}"

rule r260_output2:
    output: rules.r260_output1.input # {doo} from log not mentioned here
    log: "foo{genome}{doo}.qq.log" # here {boo} from output not mentioned here 
    input: "foo{genome}{doo}" # here {genome} is ok, but {doo} is missing in output

Also boo not in autocompletion. Please test your impl carefully and think on examples and valid usecases.

iromeo avatar Aug 11 '20 15:08 iromeo

Also be aware of possible recursion in rules, it could not have sense on runtime but shouldn't result in Stackoverflow exceptions in plugin.

E.g.:

rule r260_wd_recurs1:
    benchmark: rules.r260_wd_recurs2.output

rule r260_wd_recurs2:
    output: rules.r260_wd_recurs3.log

rule r260_wd_recurs3:
    log: rules.r260_wd_recurs1.benchmark

iromeo avatar Aug 11 '20 15:08 iromeo