Skip to content

Commit 943c64f

Browse files
Add RESOLVER_NOTES.md
1 parent 6629e95 commit 943c64f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

RESOLVER_NOTES.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Dino resolver
2+
3+
Package managers use what is known as a **solver/package resolver** to identify exact versions of dependencies that are compatible with each other. Each solver has different properties and _may_ have different solutions. This is what makes things difficult: either we manually port npm's package solver to Rust, which takes a lot of time, or use a different solver such as Pubgrub (more on that later)
4+
5+
## deno_npm
6+
This is the registry client and dependency resolver used by [Deno.](https://deno.com)
7+
8+
### Pros
9+
- Deno has been battle-tested, and deno_npm has plenty of tests.
10+
- Written in Rust, no need to call out to Node to solve packages.
11+
12+
### Cons
13+
- Deeply integrated with a lot of the deno_* crates, which removes the point (this is a project for learning after all!)
14+
- Weird Deno-related quirks, such as a [hardcoded version of @types/node](https://github.com/denoland/deno_npm/blob/8e6a3bd35249868c7266b9efca441c1bf259f0e8/src/resolution/common.rs#L152)
15+
16+
## Pubgrub
17+
Used by Dart, and by extension Flutter.
18+
19+
### Pros
20+
- It's fast. Like, really fast.
21+
- Battle-tested with Flutter and Dart, which are arguably more popular than Deno.
22+
- Great error messages built-in
23+
24+
### Cons
25+
- The differences between the Pubgrub and the npm solver could use incompatibilities and subtle issues (such as one working fine, and the other using a broken version of a package)

0 commit comments

Comments
 (0)