Skip to content
Merged
Show file tree
Hide file tree
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
32 changes: 0 additions & 32 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
7 changes: 2 additions & 5 deletions docs/docs/BestPracticeAndFAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,12 @@ val schoolDiffer: Differ[School] = {

## Where is fully automatic derivation for `Differ`s?

Fully automatic derivation is strongly discouraged, however it might be convenient in certain debugging use-cases.

With automatic derivation, the compiler will derive the instances **every time it is needed**.
This very frequently leads to extremely long compile times which isn't worth the few lines of code it saves you.
Fully automatic derivation is generally discouraged, however it might be convenient for quick .

If you only want recursive derivation at one explicit call site, prefer `Differ.derivedDeep[T]`. It derives missing
field instances recursively without enabling automatic derivation for the surrounding scope.

To enable auto-derivation add following import:
If you still want auto-derivation, add following import:

for scala 2
```scala
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Derivation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: derivation
title: Derivation
title: Deriving Differs
---

# Derivation
Expand Down
64 changes: 0 additions & 64 deletions docs/docs/Introduction.md

This file was deleted.

39 changes: 34 additions & 5 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ title: Difflicious
sidebar_label: Overview
---

Difflicious helps you find and compare the differences between values.
# Difflicious

[![Release](https://img.shields.io/nexus/r/com.github.jatcwang/difflicious-munit_2.13?server=https%3A%2F%2Foss.sonatype.org)](https://oss.sonatype.org/content/repositories/releases/com/github/jatcwang/difflicious-munit_2.13/)
[![(https://badges.gitter.im/gitterHQ/gitter.png)](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jatcwang/difflicious)
> Diffs for human and machine consumption

- Readable diff results
- Flexible diffing logic
[![Release](https://img.shields.io/maven-central/v/com.github.jatcwang/difflicious-munit_3)](https://repo1.maven.org/maven2/com/github/jatcwang/difflicious-munit_3/)

**Difflicious** provides diffs for structured data in Scala, primarily for tests.

- Readable and actionable diff results tells you where exactly your data is different
- Flexible and configurable diffing logic
- Ignore unimportant fields when comparing
- Compare `List`s of items independent of order
- Match `Map` entries by key and show diffs of the values
- Integration with test frameworks and popular libraries

Hungry for some good diffs? Check out the [documentation](https://jatcwang.github.io/difflicious/)!

# Installation

If you're using the [MUnit](https://scalameta.org/munit/) test framework:
Expand All @@ -33,3 +38,27 @@ If you're using [ScalaTest](https://www.scalatest.org/) test framework:
// == Mill ==
ivy"com.github.jatcwang::difflicious-scalatest:@VERSION@"
```

If you're using [Weaver](https://typelevel.org/weaver-test/) test framework:
```
// == SBT ==
"com.github.jatcwang" %% "difflicious-weaver" % "@VERSION@"
// == Mill ==
ivy"com.github.jatcwang::difflicious-weaver:@VERSION@"
```

# Contributing

All contributions are welcome, including suggestions and ideas. For larger changes, please raise an issue
first to avoid duplicate work :)

# Attributions

This project takes many inspirations from:

- [diffx](https://github.com/softwaremill/diffx)'s path expression for ignoring fields
- [MUnit](https://scalameta.org/munit/)'s case class diffs

# License

**Apache License 2.0**. See LICENSE file.
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const config = {
title: 'Docs',
items: [
{label: 'Quickstart', to: '/docs/quickstart'},
{label: 'Introduction', to: '/docs/introduction'},
{label: 'Overview', to: '/docs'},
{label: 'Configuring Differs', to: '/docs/configuring-differs'},
],
},
Expand Down
3 changes: 1 addition & 2 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ module.exports = {
label: 'Difflicious',
items: [
'index',
'introduction',
'quickstart',
'derivation',
'basic-differs',
'derivation',
'configuring-differs',
{
type: 'category',
Expand Down
20 changes: 9 additions & 11 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,23 @@ export default function Home() {
</Heading>
<p className={styles.tagline}>{siteConfig.tagline}</p>
<div className={styles.actions}>
<Link className="button button--primary button--lg" to="/docs/quickstart">
Quickstart
</Link>
<Link className="button button--secondary button--lg" to="/docs/introduction">
Introduction
<Link className="button button--secondary button--lg" to="/docs/quickstart">
Quick Start
</Link>
</div>
</div>
</header>
<main>
<div className={clsx('container', styles.features)}>
<Feature title="Readable results">
Difflicious highlights the exact mismatches that caused a test failure.
<Feature title="Pinpoint exactly what's different">
Quickly pinpoint the field, collection item, or map entry that caused
an assertion to fail.
</Feature>
<Feature title="Configurable comparisons">
Ignore noisy fields, pair collection entries, and tune nested comparisons.
<Feature title="Configurable comparison">
Exclude fields from comparison and configure alternative pairing strategy when comparing collections.
</Feature>
<Feature title="Test framework integrations">
Use Difflicious with MUnit, ScalaTest, Weaver, Cats, and Circe.
<Feature title="Test framework and library integration">
Integrates with popular framework and libraries such as MUnit, ScalaTest, Weaver, Cats, and Circe.
</Feature>
</div>
</main>
Expand Down