Skip to content

mix clean --deps does not clean out .erl files generated by yecc/leex #8262

Open
@f355

Description

@f355

Current behavior

When running mix clean --deps, the .erl files generated from .xrl/.yrl are left behind.

Expected behavior

All artefacts and intermediate files for the dependencies are deleted after running mix clean --deps, leaving the tree as it looked after mix deps.get, before the compilation.

Steps to reproduce

I'll use Absinthe as an example dependency. I'm using a GitHub tag instead of Hex version, because the artefact pushed to Hex has the .erl files in question included for some reason (which might be a separate issue around mix hex.publish that's outside of the scope for this bug report).

  • Create a new project: mix new mix_bug && cd mix_bug
  • Edit mix.exs to add {:absinthe, git: "https://github.com/absinthe-graphql/absinthe.git", tag: "v1.4.13"} to the list of deps.
  • Fetch the dependencies: mix deps.get
  • Verify there are no .erl files:
$ ls deps/absinthe/src
absinthe_lexer.xrl  absinthe_parser.yrl
  • Compile and clean the project: mix compile && mix clean --deps
  • The .erl files should be gone after cleaning, but they are not:
$ ls deps/absinthe/src/
absinthe_lexer.erl  absinthe_lexer.xrl  absinthe_parser.erl absinthe_parser.yrl

Environment

  • Elixir & Erlang/OTP versions (elixir --version):
$ elixir --version
Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.7.3 (compiled with Erlang/OTP 21)
  • Mix version:
$ mix --version
Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]

Mix 1.7.3 (compiled with Erlang/OTP 21)
  • Operating system:
    macOS Mojave 10.14

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions