{"id":56836,"library":"sourcecode-2-12","title":"Sourcecode","description":"Sourcecode is a Scala library that provides source code metadata (file, line, enclosing method) at compile time via macros, targeting Scala 2.12.","status":"active","version":"0.4.4","language":"java","source_language":null,"source_url":"https://github.com/com-lihaoyi/sourcecode","tags":["scala","macros","source-code","metadata"],"install":[{"cmd":"<dependency>\n  <groupId>com.lihaoyi</groupId>\n  <artifactId>sourcecode_2.12</artifactId>\n  <version>0.4.4</version>\n</dependency>","lang":"xml","label":"Maven"},{"cmd":"implementation 'com.lihaoyi:sourcecode_2.12:0.4.4'","lang":"groovy","label":"Gradle"}],"dependencies":[],"imports":[{"symbol":"SourceFile","correct":"sourcecode.SourceFile"}],"quickstart":{"code":"import sourcecode.SourceFile\n\nobject Example extends App {\n  implicit val source: SourceFile = sourcecode.SourceFile.here\n  println(source.value)\n}","lang":"scala","description":"Minimal Scala snippet showing how to capture the current source file using SourceFile."},"warnings":[{"fix":"Use the appropriate artifact for your Scala version (e.g., sourcecode_2.13).","message":"This artifact is specific to Scala 2.12; not compatible with other Scala versions.","severity":"breaking","affected_versions":"*"}],"env_vars":null,"search_vec":"'2.12':23 'code':10,28 'compil':17 'enclos':14 'file':12 'librari':6 'line':13 'macro':20,25 'metadata':11,29 'method':15 'provid':8 'scala':5,22,24 'sourc':9,27 'source-cod':26 'sourcecod':1,2 'target':21 'time':18 'via':19","created_at":"2026-06-15T10:52:04.456933+00:00","updated_at":"2026-06-15T10:52:04.456933+00:00","problems":[],"ecosystem":"maven","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/com-lihaoyi/sourcecode","github":"https://github.com/com-lihaoyi/sourcecode","docs":"https://appdoc.app/artifact/com.lihaoyi/sourcecode_2.12/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}