{"id":17690641,"url":"https://github.com/ktoso/kaze-class","last_synced_at":"2025-05-13T02:08:50.444Z","repository":{"id":74773957,"uuid":"55645583","full_name":"ktoso/kaze-class","owner":"ktoso","description":"Like Case Class, but easier to bin-compat evolve","archived":false,"fork":false,"pushed_at":"2019-01-11T13:05:00.000Z","size":39,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-13T02:08:40.984Z","etag":null,"topics":["codegen","copy-paste","scala"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ktoso.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":"2016-04-06T22:27:40.000Z","updated_at":"2019-04-22T12:34:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8a471bc-7866-4b7b-9a33-b4cac066ce3f","html_url":"https://github.com/ktoso/kaze-class","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktoso%2Fkaze-class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktoso%2Fkaze-class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktoso%2Fkaze-class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktoso%2Fkaze-class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktoso","download_url":"https://codeload.github.com/ktoso/kaze-class/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253856656,"owners_count":21974582,"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":["codegen","copy-paste","scala"],"created_at":"2024-10-24T11:51:37.831Z","updated_at":"2025-05-13T02:08:50.420Z","avatar_url":"https://github.com/ktoso.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"Kaze Class\n==========\n\n[![Build Status](https://travis-ci.org/ktoso/kaze-class.svg?branch=master)](https://travis-ci.org/ktoso/kaze-class)\n\nYet another \"like case class but easier to evolve in binary compatible way\" source code generator.\n\n**Specific use case:** when configuration objects where prototyped during experimental phase of a project \nusing case classes, and now need to be made stable API, thus having to resign \nfrom using case classes – this project takes a `Class[T]` and generates a **KazeClass** from it,\nwhich is a string representation of a \"manual implementation\" of the most basic features of case clases.\n\nNaming\n------\n\n*Kaze* (風) means \"wind\" or \"movement of air\" in Japanese,\nwhich reminded me of how we wanted to swiftly, and unhindered–like the wind–evolve these classes.\n\nUsage\n=====\n\nGet the jar or [copy\u0026paste the KazeClass](https://raw.githubusercontent.com/ktoso/kaze-class/master/src/main/scala/pl/project13/kaze/KazeClass.scala) into your project, then call:\n\n```scala\nval rendered: String = KazeClass.of[Person].render\n```\nor even (requires java.awt to be available...)\n```scala\nKazeClass.of[Person].toClipboard\n```\n\nto get a \"desugared\" case class, ready to replace your case class.\n\nBy default a `KazeClass` uses identity equality (not structural equality). To generate `hashCode` and `equals` methods for structural equality call `.withEqualsHashcode` before rendering.\n\nThere are a few more flags, which you may configure:\n\n```scala\nKazeClass.of[Person]\n  .withEqualsHashcode\n  .withConfig\n  .toClipboard\n```\n\nUse `withoutAkkaUtils` to generate conversion of `FiniteDuration` according to the [Java 8 compatibility lib](https://github.com/scala/scala-java8-compat#converters-between-scalaconcurrentdurationfiniteduration-and-javatimeduration).\n\n\nHere is an [example output](src/test/scala/pl/project13/kaze/KazeClassSpec.scala).\n\nGoals / Non-Goals\n=================\n\nGoal: \n\n- One of the goals is to be able to just paste this one class (or include in REPL) to generate the source.\nIt must be small, trivial even, and have zero dependencies.\n\nNon-Goal: \n\n- Actually become a big fancy project that solves all things regarding helping evolve the classes.\n  Multiple people have attempted that, and eventually it always breaks down on some edge cases (or plain lack \n  of time), thus this code generator is dead simple and proud to be so.\n- Cover all edge cases of what might go wrong, minor manual interaction is acceptable (feel free to submit PRs to minimize those though).\n\nLicense\n=======\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktoso%2Fkaze-class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktoso%2Fkaze-class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktoso%2Fkaze-class/lists"}