Skip to content

Rule target inferrence doesn't work with write-file #2469

@NathanReb

Description

@NathanReb

I personally prefer to be explicit about targets but I wanted to give a try to:

(rule (action (write-file file.ext "content")))

and it fails with:

File "dune", line 1, characters 0-47:
1 | (rule (action (write-file file.ext "content")))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: fields targets, target are all missing (exactly one is needed)

Is the rule target inferrence still working?
It seems like it's not, I just tried the example from https://dune.readthedocs.io/en/latest/dune-files.html#inferred-rules and I'm getting the same error.

I'm totally fine with this feature being removed but we should probably delete the doc section advertising it then!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions