2019-02-05 22:10:49 +00:00
|
|
|
[package]
|
2020-08-13 10:05:30 +00:00
|
|
|
name = "project_model"
|
|
|
|
version = "0.0.0"
|
2020-08-24 11:06:30 +00:00
|
|
|
description = "TBD"
|
2020-07-14 01:57:26 +00:00
|
|
|
license = "MIT OR Apache-2.0"
|
2020-08-13 10:05:30 +00:00
|
|
|
edition = "2018"
|
2019-02-05 22:10:49 +00:00
|
|
|
|
2019-11-17 15:35:05 +00:00
|
|
|
[lib]
|
|
|
|
doctest = false
|
|
|
|
|
2019-02-05 22:10:49 +00:00
|
|
|
[dependencies]
|
2020-02-18 13:57:41 +00:00
|
|
|
log = "0.4.8"
|
|
|
|
rustc-hash = "1.1.0"
|
2021-07-09 15:01:55 +00:00
|
|
|
cargo_metadata = "0.14"
|
2021-07-18 08:29:22 +00:00
|
|
|
semver = "1"
|
2020-08-13 10:05:30 +00:00
|
|
|
serde = { version = "1.0.106", features = ["derive"] }
|
|
|
|
serde_json = "1.0.48"
|
|
|
|
anyhow = "1.0.26"
|
internal: add simple smoke test for project model
Our project model code is rather complicated -- the logic for lowering
from `cargo metadata` to `CrateGraph` is fiddly and special-case. So
far, we survived without testing this at all, but this increasingly
seems like a poor option.
So this PR introduces a simple tests just to detect the most obvious
failures. The idea here is that, although we rely on external processes
(cargo & rustc), we are actually using their stable interfaces, so we
might just mock out the outputs.
Long term, I would like to try to virtualize IO here, so as to do such
mocking in a more principled way, but lets start simple.
Should we forgo the mocking and just call `cargo metadata` directly
perhaps? Touch question -- I personally feel that fast, in-process tests
are more important in this case than any extra assurance we get from
running the real thing.
Super-long term, we would probably want to extend our heavy tests to
cover more use-cases, but we should figure a way to do that without
slowing the tests down for everyone.
Perhaps we need two-tiered bors system, where we pull from `master` into
`release` branch only when an additional set of tests passes?
2021-07-20 12:38:20 +00:00
|
|
|
expect-test = "1"
|
2021-01-17 08:41:45 +00:00
|
|
|
la-arena = { version = "0.2.0", path = "../../lib/arena" }
|
2019-02-05 22:10:49 +00:00
|
|
|
|
2020-08-24 08:25:19 +00:00
|
|
|
cfg = { path = "../cfg", version = "0.0.0" }
|
|
|
|
base_db = { path = "../base_db", version = "0.0.0" }
|
|
|
|
toolchain = { path = "../toolchain", version = "0.0.0" }
|
2021-03-02 12:27:29 +00:00
|
|
|
proc_macro_api = { path = "../proc_macro_api", version = "0.0.0" }
|
|
|
|
paths = { path = "../paths", version = "0.0.0" }
|
|
|
|
stdx = { path = "../stdx", version = "0.0.0" }
|
|
|
|
profile = { path = "../profile", version = "0.0.0" }
|