{"id":19972411,"url":"https://github.com/note/dhallj-magnolia","last_synced_at":"2026-01-30T13:18:00.927Z","repository":{"id":45024109,"uuid":"312627618","full_name":"note/dhallj-magnolia","owner":"note","description":"Dhallj Encoder and Decoder derivation using Magnolia","archived":false,"fork":false,"pushed_at":"2024-08-13T00:41:09.000Z","size":164,"stargazers_count":2,"open_issues_count":16,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-11T02:49:57.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/note.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-11-13T16:28:02.000Z","updated_at":"2023-04-11T15:33:04.000Z","dependencies_parsed_at":"2023-12-05T19:27:04.777Z","dependency_job_id":"87adcb58-2ee0-43b0-8843-5d0db144aabc","html_url":"https://github.com/note/dhallj-magnolia","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/note/dhallj-magnolia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/note%2Fdhallj-magnolia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/note%2Fdhallj-magnolia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/note%2Fdhallj-magnolia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/note%2Fdhallj-magnolia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/note","download_url":"https://codeload.github.com/note/dhallj-magnolia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/note%2Fdhallj-magnolia/sbom","scorecard":{"id":694930,"data":{"date":"2025-08-11","repo":{"name":"github.com/note/dhallj-magnolia","commit":"8026fa6fdc193f4947b96d1b89c9cfdb72d52d41"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":3,"reason":"Found 7/18 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/note/dhallj-magnolia/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/note/dhallj-magnolia/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/note/dhallj-magnolia/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/note/dhallj-magnolia/release.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T03:24:24.684Z","repository_id":45024109,"created_at":"2025-08-22T03:24:24.684Z","updated_at":"2025-08-22T03:24:24.684Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28913882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-13T03:08:02.857Z","updated_at":"2026-01-30T13:18:00.910Z","avatar_url":"https://github.com/note.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dhallj-magnolia\n\nThis library provides generic derivation of [dhallj](https://github.com/travisbrown/dhallj) `Encoder` and `Decoder` typeclasses using [magnolia](https://github.com/softwaremill/magnolia).\n\nTo use dhallj-magnolia add the following dependency to your `build.sbt`:\n\n```\nlibraryDependencies += \"pl.msitko\" %% \"dhallj-magnolia\" % \"0.1.3\"\n```\n\n## Limitations of Scala 3 version of the library\n\nDhallj-magnolia is published for both Scala 2.13 and Scala 3. Limitations of Scala 3 branch of the library:\n\n * Your project consuming dhallj-magnolia has to have the compilation flag `-Yretain-trees` enabled if you rely on default values for case classes\n * Derivation doesn't work for value classes\n\n## Examples\n\nConsider the following ADT:\n\n```scala\nsealed trait Bar\nfinal case class Bar1(a: Int) extends Bar\nfinal case class Bar2(b: String) extends Bar\nfinal case class Foo(a: Int, b: String, bar: Bar)\n```\n\n### Automatic Encoder derivation\n\n```scala\nimport org.dhallj.codec.syntax._\nimport pl.msitko.dhallj.generic.encoder.auto._\n\nval input = Foo(12, \"abc\", Bar2(\"abcd\"))\ninput.asExpr.toString\n// \"\"\"{a = 12, b = \"abc\", bar = (\u003cBar1 : {a : Natural} | Bar2 : {b : Text}\u003e.Bar2) {b = \"abcd\"}}\"\"\"\n```\n\nAdditionally, dhallj's `Encoder[A]` has `dhallType` method which prints out dhall type for `A`. So, following the example, we can:\n\n```scala\nimport org.dhallj.codec.Encoder\nprintln(Encoder[Foo].dhallType(None, None))\n// {a : Natural, b : Text, bar : \u003cBar1 : {a : Natural} | Bar2 : {b : Text}\u003e}\n```\n\n### Automatic Decoder derivation\n\n```scala\nimport org.dhallj.syntax._\nimport pl.msitko.dhallj.generic.decoder.auto._\n\nval input = \"\"\"{a = 12, b = \"abc\", bar = (\u003cBar1 : {a : Natural} | Bar2 : {b : Text}\u003e.Bar2) {b = \"abcd\"}}\"\"\"\n\nfor {\n  parsed  \u003c- input.parseExpr\n  decoded \u003c- parsed.normalize().as[Foo]\n} yield decoded\n// Right(Foo(12,abc,Bar2(abcd)))\n```\n\n### Semi-automatic Encoder derivation\n\n```scala\nimport org.dhallj.codec.syntax._\nimport pl.msitko.dhallj.generic.encoder.semiauto._\n\nimplicit val barEncoder = deriveEncoder[Bar]\nimplicit val fooEncoder = deriveEncoder[Foo]\n\nval input = Foo(12, \"abc\", Bar2(\"abcd\"))\ninput.asExpr.toString\n// \"\"\"{a = 12, b = \"abc\", bar = (\u003cBar1 : {a : Natural} | Bar2 : {b : Text}\u003e.Bar2) {b = \"abcd\"}}\"\"\"\n```\n\n### Semi-automatic Decoder derivation\n\n```scala\nimport org.dhallj.syntax._\nimport pl.msitko.dhallj.generic.decoder.semiauto._\n\nimplicit val barDecoder = deriveDecoder[Bar]\nimplicit val fooDecoder = deriveDecoder[Foo]\n\nval input = \"\"\"{a = 12, b = \"abc\", bar = (\u003cBar1 : {a : Natural} | Bar2 : {b : Text}\u003e.Bar2) {b = \"abcd\"}}\"\"\"\n\nfor {\n  parsed  \u003c- input.parseExpr\n  decoded \u003c- parsed.normalize().as[Foo]\n} yield decoded\n// Right(Foo(12,abc,Bar2(abcd)))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnote%2Fdhallj-magnolia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnote%2Fdhallj-magnolia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnote%2Fdhallj-magnolia/lists"}