Skip to content

Clean needed when turning a directory into a file #6575

@voodoos

Description

@voodoos

Changing a directory test to a single-file test with the same name requires a dune clean:

Given a working directory cram test:
  $ mkdir sometest.t
  $ cat >sometest.t/run.t <<EOF
  >   $ echo "foobar"
  >   foobar
  > EOF

  $ dune build @sometest

We turn it into a single-file test:
  $ mv sometest.t sometest.t.bak
  $ mv sometest.t.bak/run.t sometest.t
  $ rm -r sometest.t.bak

FIXME: Dune should detect the change:
  $ dune build @sometest
  Error: _build/default/sometest.t: Is a directory
  -> required by _build/default/sometest.t
  -> required by alias sometest
  [1]

After a clean it works as expected:
  $ dune clean
  $ dune build @sometest

Specifications

  • Version of dune: main (3.6.0-85-gdd6f976)

  • Version of ocaml: 4.14

  • Operating system: Macos (M1)

  • Link to gist with verbose output (run dune with the --verbose flag):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions