Skip to content

jpablo/type-explorer

Repository files navigation

Type Explorer

Explore the types of your Scala code in a visual way.

Install

Download the latest release from here.

Unzip the file and add type-explorer-$version/bin to your $PATH.

There are two files in the bin folder:

  • type-explorer: The main executable
  • type-explorer-compile-project.sh: A script to compile your project with semanticdb enabled.

Requirements

  • JVM 8 or higher
  • SBT based project

Compile your code

type-explorer-compile-project.sh will compile the project in the current directory.

cd akka-persistence-jdbc
❯ type-explorer-compile-project.sh

To compile a single module:

❯ type-explorer-compile-project.sh module-name

Run

❯ type-explorer
--------------------------------------------------
Welcome to Type Explorer!
name: type-explorer-shared, version: 0.2.0, scalaVersion: 3.3.1, sbtVersion: 1.9.6
Open your browser at http://localhost:8090/
Press Ctrl-C to stop the server
--------------------------------------------------

Examples

Scala standard library.

❯ git clone https://github.com/scala/scala.git
❯ cd scala

❯ pwd
/Users/jpablo/GitHub/scala

❯ type-explorer-compile-project.sh

❯ find . -name "*.semanticdb" | wc -l
    1215

Initial screen

initial-screen

Select folder containing semanticdb files and name project

base-path

project-name

Add a type to the diagram

select-type

Add all parents

inheritance-diagram

License

License

Copyright 2024 Juan Pablo Romero and the type-explorer contributors.