{"id":24901763,"url":"https://github.com/goose97/why-recompile","last_synced_at":"2025-10-16T13:30:29.752Z","repository":{"id":246781321,"uuid":"781400234","full_name":"Goose97/why-recompile","owner":"Goose97","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-17T10:41:15.000Z","size":31,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-22T13:47:33.943Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Goose97.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-03T10:03:30.000Z","updated_at":"2024-08-20T04:01:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"7902ce8f-6da8-49d9-9d79-615c854ae6d0","html_url":"https://github.com/Goose97/why-recompile","commit_stats":null,"previous_names":["goose97/why-recompile"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Goose97%2Fwhy-recompile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Goose97%2Fwhy-recompile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Goose97%2Fwhy-recompile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Goose97%2Fwhy-recompile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Goose97","download_url":"https://codeload.github.com/Goose97/why-recompile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236719432,"owners_count":19194048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-01T21:17:41.795Z","updated_at":"2025-10-16T13:30:29.419Z","avatar_url":"https://github.com/Goose97.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Package](https://img.shields.io/badge/-Package-important)](https://hex.pm/packages/why_recompile)\n\nA tool helps you answering the question: why editing this file cause 127 other files to recompile?\n\n## Installation\n\nThe package can be installed by adding `why_recompile` to your list of dependencies\nin `mix.exs`:\n\n```elixir\ndef deps do\n  [{:why_recompile, \"~\u003e 0.1\", only: [:dev], runtime: false}]\nend\n```\n\n## Basic Usage\n\nThe package provides some Mix tasks to explore the recompile depedency graph of your project. To see the full commands documentation:\n\n```\nmix why_recompile help\n```\n\n### mix why_recompile list\n\nList all files in the project sorted by number of recompile dependencies. If A is a recompile depedency of B, when B is recompiled, A must be recompiled as well.\n\n\u003e [!NOTE]\n\u003e There are two kind of dependencies. Given two files A and B:\n\u003e 1. Hard dependencies: if A is a hard depedency of B, when B is recompiled, A MUST be recompiled\n\u003e 1. Soft dependencies: if A is a hard depedency of B, when B is recompiled, A MIGHT have to recompiled\n\u003e\n\u003e An example for soft dependencies: when A uses struct from B, if B is recompiled but doesn't change the struct definition, A won't need to be recompiled. Otherwise, A needs to be recompiled.\n\n```elixir\n# List all files in the project\nmix why_recompile list\n\n# List all files in the project, include files with no dependencies\nmix why_recompile list --all\n\n# Only list top 5 files\nmix why_recompile list --limit 5\n```\n\n### mix why_recompile show\n\nShow all the recompile dependencies of a file and the detailed explanation of such depedency.\n\n```elixir\n# Provide the file path\nmix why_recompile show lib/A.ex\n```\n\nYou can increase the verbosity to see more details about the depedency.\n\n```elixir\n# Print the whole dependency chain\nmix why_recompile show lib/A.ex --verbose 1\n\n# Print the whole dependency chain and code snippets that cause the dependency\nmix why_recompile show lib/A.ex --verbose 2\n```\n\nTo filter by dependency name (support partial match):\n\n```elixir\nmix why_recompile show lib/A.ex --filter C.ex\n```\n\nTo include soft dependencies:\n\n```elixir\nmix why_recompile show lib/A.ex --include-soft\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoose97%2Fwhy-recompile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoose97%2Fwhy-recompile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoose97%2Fwhy-recompile/lists"}