Sourcecode is a Scala library that provides source code metadata (file, line, enclosing method) at compile time via macros, targeting Scala 2.12.
<dependency>
<groupId>com.lihaoyi</groupId>
<artifactId>sourcecode_2.12</artifactId>
<version>0.4.4</version>
</dependency>No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal Scala snippet showing how to capture the current source file using SourceFile.
Use the appropriate artifact for your Scala version (e.g., sourcecode_2.13).
No dependency data recorded yet.