{"id":16862515,"url":"https://github.com/aarzilli/whydeadcode","last_synced_at":"2025-07-21T15:02:14.920Z","repository":{"id":165646808,"uuid":"641045746","full_name":"aarzilli/whydeadcode","owner":"aarzilli","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-26T17:18:16.000Z","size":6,"stargazers_count":28,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T04:41:20.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/aarzilli.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":"2023-05-15T17:00:17.000Z","updated_at":"2025-03-22T03:35:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"52443102-ea11-4e88-8a0a-e681b3b0263d","html_url":"https://github.com/aarzilli/whydeadcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aarzilli/whydeadcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarzilli%2Fwhydeadcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarzilli%2Fwhydeadcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarzilli%2Fwhydeadcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarzilli%2Fwhydeadcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aarzilli","download_url":"https://codeload.github.com/aarzilli/whydeadcode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aarzilli%2Fwhydeadcode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266324283,"owners_count":23911226,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-10-13T14:35:42.379Z","updated_at":"2025-07-21T15:02:14.872Z","avatar_url":"https://github.com/aarzilli.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SUMMARY\n\nDisplays why deadcode elimination was partially disabled by the Go linker.\n\nThe Go linker will disable most deadcode elimination if it finds reachable calls to `reflect.Value.MethodByName` or `reflect.Value.Method`. This is done because, using these two methods it is possible to dynamically call any public method in the application. \nWhydeadcode uses the call graph produced by the linker to display why `reflect.Value.MethodByName` or `reflect.Value.Method` are reachable. Use it like this:\n\n```\n\tgo build -ldflags=-dumpdep your/package |\u0026 whydeadcode\n```\n\nNeeds Go 1.21 or later.\n\nBecause of how `-dumpdep` works only the first result output by whydeadcode is real. Because of how `-dumpdep` works anything beyond the first result can be a false positive (i.e. things that look like they will affect deadcode elimination but won't if the first result is taken care of) and it can also have false negatives (i.e. things that will continue to keep deadcode elimination disabled if the first result is taken care of).\n\n# TALK\n\nFor a more detailed explanation see the [golab 2023 talk](https://youtu.be/EkG177eRcco) or the [slides](https://github.com/aarzilli/talks/blob/master/golab2023_deadcode.pdf).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faarzilli%2Fwhydeadcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faarzilli%2Fwhydeadcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faarzilli%2Fwhydeadcode/lists"}