Registry / utility / sourcecode-2-12

sourcecode-2-12

JSON →
library0.4.4javamavenunverified

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>
INSTALL
IMPORT
SIG · SOURCECODE-2-12
S
sourcecode-2-12
utilityjavav0.4.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SourceFile
sourcecode.SourceFile

Minimal Scala snippet showing how to capture the current source file using SourceFile.

import sourcecode.SourceFile object Example extends App { implicit val source: SourceFile = sourcecode.SourceFile.here println(source.value) }
Debug
Known issues
breakingThis artifact is specific to Scala 2.12; not compatible with other Scala versions.
fix
Use the appropriate artifact for your Scala version (e.g., sourcecode_2.13).
affects: *
Upgrade
Version history
0.4.4latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
sourcecode-2-12 — mvn dependency:get sourcecode-2-12 · libregistry