{"id":18060778,"url":"https://github.com/0xleif/kpedit","last_synced_at":"2025-08-22T09:32:57.572Z","repository":{"id":83170822,"uuid":"289372759","full_name":"0xLeif/KPEdit","owner":"0xLeif","description":"Quick Key Path Edit. The compiler is unable to type-check this expression in reasonable time; 🤠","archived":false,"fork":false,"pushed_at":"2020-08-21T22:25:10.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T12:29:44.322Z","etag":null,"topics":["keypath","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xLeif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-08-21T21:59:39.000Z","updated_at":"2022-05-18T23:00:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"81d72dc8-9002-4726-8cf9-a19e1355ef5d","html_url":"https://github.com/0xLeif/KPEdit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/0xLeif/KPEdit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xLeif%2FKPEdit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xLeif%2FKPEdit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xLeif%2FKPEdit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xLeif%2FKPEdit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xLeif","download_url":"https://codeload.github.com/0xLeif/KPEdit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xLeif%2FKPEdit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266142121,"owners_count":23883038,"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":["keypath","swift"],"created_at":"2024-10-31T04:10:28.158Z","updated_at":"2025-07-20T14:37:31.027Z","avatar_url":"https://github.com/0xLeif.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KPEdit\n\nQuick KeyPath Editting\n\n### Example Usage\n```swift\n/*\nclass SomeObject {\n  var value = \"\"\n}\n*/\nlet someValue = SomeObject()\n\nprint(someValue.value) // Output: \"\"\n\n/*\n(ObjectForKeyPath) + (KeyPath) - (ValueOfKeyPath)\n*/\nsomeValue + \\.value - \"Hello World\"\n\nprint(someValue.value) // Output: \"Hello World\"\n```\n\n#### Known Issue\n![CleanShot 2020-08-21 at 17 20 26](https://user-images.githubusercontent.com/8268288/90939924-a212cd80-e3d2-11ea-9a25-e7d3c7ad3a56.png)\n\u003e error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions\n        dumb + \\.string - \"Hello!\" + \\.double - 3.14 + \\.array - [1, 43, 6, true]\n        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~\n\n#### Solution\n\n**Make sure to use parentheses!**\n\n```swift\nvar dumb = DumbStruct()\n        \n(((dumb + \\.string - \"Hello!\")\n     + \\.double - 3.14)\n     + \\.array - [1, 43, 6, true])\n\nXCTAssertEqual(dumb.string, \"Hello, World!\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xleif%2Fkpedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xleif%2Fkpedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xleif%2Fkpedit/lists"}