{"id":15680585,"url":"https://github.com/ckipp01/mill-scip","last_synced_at":"2025-07-30T18:06:53.692Z","repository":{"id":50887375,"uuid":"520044036","full_name":"ckipp01/mill-scip","owner":"ckipp01","description":"A Mill plugin that generates and SCIP index for your build.","archived":false,"fork":false,"pushed_at":"2025-04-30T05:01:47.000Z","size":216,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-07T08:04:43.262Z","etag":null,"topics":["mill","mill-plugin"],"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/ckipp01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"ckipp01"}},"created_at":"2022-08-01T09:23:50.000Z","updated_at":"2025-04-18T09:21:24.000Z","dependencies_parsed_at":"2024-01-09T09:50:33.618Z","dependency_job_id":"2d05c525-a87c-44aa-8d23-cac06781b50b","html_url":"https://github.com/ckipp01/mill-scip","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/ckipp01/mill-scip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckipp01%2Fmill-scip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckipp01%2Fmill-scip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckipp01%2Fmill-scip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckipp01%2Fmill-scip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ckipp01","download_url":"https://codeload.github.com/ckipp01/mill-scip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckipp01%2Fmill-scip/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267914053,"owners_count":24164637,"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-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["mill","mill-plugin"],"created_at":"2024-10-03T16:43:17.068Z","updated_at":"2025-07-30T18:06:53.646Z","avatar_url":"https://github.com/ckipp01.png","language":"Scala","funding_links":["https://github.com/sponsors/ckipp01"],"categories":[],"sub_categories":[],"readme":"# mill-scip\n\nA [Mill](https://com-lihaoyi.github.io/mill/mill/Intro_to_Mill.html) plugin to\ncreate a [SCIP](https://github.com/sourcegraph/scip/blob/main/scip.proto) index\nfor your Mill build. Most commonly this is used to enable [precise code\nnavigation](https://docs.sourcegraph.com/code_intelligence/explanations/precise_code_intelligence)\non [Sourcegraph](https://sourcegraph.com/).\n\n_An example using the [Sourcegraph browser\nextension](https://docs.sourcegraph.com/integration/browser_extension) enabling\nprecise navigation on GitHub._\n\n![2022-08-01 15 40 23](https://user-images.githubusercontent.com/13974112/182163135-57e504b2-7b29-42d6-8588-3da6b71b8bba.gif)\n\nYou can read more about SCIP in the [announcement blog\npost](https://about.sourcegraph.com/blog/announcing-scip).\n\n## Requirements\n\n- The latest version of this plugin supports both the `0.10.x` and `0.11.x`\nseries of Mill.\n\n## Quick Start\n\nThis plugin is an [external Mill\nmodule](https://com-lihaoyi.github.io/mill/mill/Modules.html#_external_modules)\nso you don't need to add anything to your build to use it.\n\nThe quickest way to use this is actually by using the\n[`scip-java`](https://sourcegraph.github.io/scip-java/) cli. You can install it\nwith [Coursier](https://get-coursier.io/docs/cli-installation).\n\n```sh\ncs install --contrib scip-java\n```\n\nOnce installed, you just need to run `scip-java index` in your workspace:\n\n```sh\nscip-java index\n```\n\n`scip-java` will actually use this plugin to genreate an `index.scip` which you\ncan then find at the root of your project.\n\nYou can also verify that this worked correctly by using the [scip cli\ntool](https://github.com/sourcegraph/scip).\n\n_Here is an example after running on the [Courser code base](https://github.com/coursier/coursier)_\n```\n❯ scip stats\n{\n  \"documents\": 450,\n  \"linesOfCode\": 46090,\n  \"occurrences\": 112426,\n  \"definitions\": 18979\n}\n```\n\n## Uploading to Sourcegraph\n\nMore than likely the reason you're generating your `index.scip` is to upload to\nSourcegraph. The easiest way to do this is in a GitHub action workflow like you\nsee below. For convenience the following curl command will create it for you in\nyour repo:\n\n```sh\ncurl -sLo .github/workflows/sourcegraph.yml --create-dirs https://raw.githubusercontent.com/ckipp01/mill-scip/main/.github/workflows/sourcegraph.yml\n```\n\n_Example workflow_\n```yml\nname: Sourcegraph\non:\n  push:\n    branches:\n      - main\n  pull_request:\n  \njobs:\n  scip:\n    runs-on: ubuntu-latest\n    name: \"Upload SCIP\"\n    steps:\n      - uses: actions/checkout@v3\n      - uses: coursier/setup-action@v1\n        with:\n          jvm: 'temurin:17'\n          apps: scip-java\n\n      - name: Generate SCIP File\n        run: scip-java index\n\n      - name: Install src\n        run: yarn global add @sourcegraph/src\n\n      - name: Upload SCIP file\n        run: src code-intel upload -github-token $GITHUB_TOKEN\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Generating with Mill\n\nYou can also use Mill directly to create your index by doing the following:\n\n```sh\nmill --import ivy:io.chris-kipp::mill-scip::0.3.0 io.kipp.mill.scip.Scip/generate\n```\n\nThis command will generate an `index.scip` file for you located in your\n`out/io/kipp/mill/scip/Scip/generate.dest/` directory.\n\n### Output formats\n\nYou can optionally pass in a ouput format to `generate`. The following formats\nare supported:\n\n- *.lsif\n- *.lsif-protobuf\n- *.scip\n- *.scip.ndjson\n\n_An example of passing in the output format_\n```sh \nmill --import ivy:io.chris-kipp::mill-scip::0.3.0 io.kipp.mill.scip.Scip/generate --output dump.lsif\n```\n\n## How does this work?\n\nThe [manual configuration\nguide](https://sourcegraph.github.io/scip-java/docs/manual-configuration.html)\nof `scip-java` does a good job at outlining the approach taken here. Part of the\ndesign of this plugin was that it's important that the user doesn't have to\nchange anything in their build to use it, which isn't the easiest with Mill.\nTherefore the following steps outline how we arrive at the `index.scip` file.\n\n- We capture all of the `JavaModule`s in your build\n- We hijack all the necessary settings that are necessary to compile your\n    project and then add some additional ones.\n    - If it's a Scala 2 project we fetch the [semanticdb compiler\n        plugin](https://scalameta.org/docs/semanticdb/guide.html#scalac-compiler-plugin)\n        and add it to compilation classpath as well as the relevant\n        `scalacOptions`.\n    - If it's a Scala 3 project enable the production of SemanticDB as it's part\n        of the compiler.\n- With these new updated settings we do a \"compile-like\" task which mimics the\n    compile task but produces semanticDB.\n- Once we have semanticDB we utilize\n  [scip-java](https://sourcegraph.github.io/scip-java/) as a library to slurp up\n  all the semanticDB files and produce a `index.scip` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckipp01%2Fmill-scip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fckipp01%2Fmill-scip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckipp01%2Fmill-scip/lists"}