Skip to content

add instructions for viewing contents of .tasty files to Tasty Overview #2362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scala3/guides/tasty-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ $ scalac | Hello.scala | -> | Hello.tasty | -> | Hello.class |
information)
```

You can view the contents of a _.tasty_ file in a human-readable form by running the compiler on it with the `-print-tasty` flag.
You can also view the contents decompiled in a form similar to Scala source code using the `-decompile` flag.
```bash
$ scalac -print-tasty hello.tasty
$ scalac -decompile hello.tasty
```

### The issue with _.class_ files

Because of issues such as [type erasure][erasure], _.class_ files are actually an incomplete representation of your code.
Expand Down