-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6629e95
commit 943c64f
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Dino resolver | ||
|
||
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) | ||
|
||
## deno_npm | ||
This is the registry client and dependency resolver used by [Deno.](https://deno.com) | ||
|
||
### Pros | ||
- Deno has been battle-tested, and deno_npm has plenty of tests. | ||
- Written in Rust, no need to call out to Node to solve packages. | ||
|
||
### Cons | ||
- Deeply integrated with a lot of the deno_* crates, which removes the point (this is a project for learning after all!) | ||
- 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) | ||
|
||
## Pubgrub | ||
Used by Dart, and by extension Flutter. | ||
|
||
### Pros | ||
- It's fast. Like, really fast. | ||
- Battle-tested with Flutter and Dart, which are arguably more popular than Deno. | ||
- Great error messages built-in | ||
|
||
### Cons | ||
- 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) |