{"id":19885521,"url":"https://github.com/nafg/scalac-options","last_synced_at":"2025-06-11T11:12:48.442Z","repository":{"id":39851540,"uuid":"351847402","full_name":"nafg/scalac-options","owner":"nafg","description":"A DSL for scalacOptions","archived":false,"fork":false,"pushed_at":"2025-04-29T08:24:45.000Z","size":415,"stargazers_count":17,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-29T09:34:12.966Z","etag":null,"topics":["mill","sbt","scalac"],"latest_commit_sha":null,"homepage":"","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/nafg.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":"2021-03-26T16:36:46.000Z","updated_at":"2025-04-29T08:24:47.000Z","dependencies_parsed_at":"2023-01-31T02:30:28.315Z","dependency_job_id":"dfdf3826-3ee7-4302-8612-a7bb30928759","html_url":"https://github.com/nafg/scalac-options","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafg%2Fscalac-options","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafg%2Fscalac-options/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafg%2Fscalac-options/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafg%2Fscalac-options/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nafg","download_url":"https://codeload.github.com/nafg/scalac-options/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252071828,"owners_count":21690099,"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":["mill","sbt","scalac"],"created_at":"2024-11-12T17:34:31.592Z","updated_at":"2025-05-02T16:31:42.547Z","avatar_url":"https://github.com/nafg.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![javadoc](https://javadoc.io/badge2/io.github.nafg.scalac-options/scalac-options_2.12/javadoc.svg)](https://javadoc.io/doc/io.github.nafg.scalac-options/scalac-options_2.12)\n\n\n# scalac-options\nDSL for scalacOptions\n\nThis library contains code-generated traits for all scalac options, from 2.11.0 and on. They are generated by running the compiler and parsing its output.\n\nThere are traits and objects for concrete versions, as well as traits for version ranges: entire epochs (`V2` and `V3`), entire major versions (e.g. `V2_13`), and even minimum minor versions (e.g. `V2_13_2_+`).\n\nThey consist of `List[String]`-returning methods for each supported option, with the appropriate name and parameters.\n\nThere is a simple DSL for `-Wconf` strings.\n\nThere is also a helper method to supply different options depending on the version.\n`ScalacOptions.all` takes a version string, and any number of `VersionOptionsFunction`s,\nfor which you can simply supply a function from a version trait to a `List[String]`. See the example below.\n\nThis library can be used in SBT, Mill, or anywhere else. It does not depend on any build tool.\n\n\n## Example usage\n\n### `project/plugins.sbt`\n```scala\nlibraryDependencies += \"io.github.nafg.scalac-options\" %% \"scalac-options\" % \"0.1.9\"\n```\n### `build.sbt`\n```scala\n// In build.sbt, _root_ is necessary because `sbt.io` is imported into the namespace already\nimport _root_.io.github.nafg.scalacoptions._\n\nThisBuild / scalacOptions ++=\n  // Use all of the options we supply that are applicable to the current version\n  ScalacOptions.all(scalaVersion.value)(\n    // These are available in all scala versions (hence \"Common\")\n    (opts: options.Common) =\u003e opts.deprecation ++ opts.unchecked ++ opts.feature,\n    // For 2.13.x, pass -Xlint:_\n    (_: options.V2_13).Xlint(\"_\"),\n    // For 2.13.4+, pass -YtastyReader\n    (_: options.V2_13_4_+).YtastyReader,\n    // Where applicable, silence warnings in the lint-byname-implicit category\n    // This will add -Wconf:cat=lint-byname-implicit:silent on 2.12.13 and 2.13.2+\n    WarningsConfig(WarningsConfig.Filter.Category(WarningsConfig.Category.`lint-byname-implicit`).silent)\n  )\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnafg%2Fscalac-options","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnafg%2Fscalac-options","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnafg%2Fscalac-options/lists"}