Move reporting into its own crate

This commit is contained in:
Richard Feldman 2020-03-06 02:06:18 -05:00
parent 3b26a982f0
commit c3fcfd65cb
6 changed files with 50 additions and 1 deletions

16
Cargo.lock generated
View file

@ -1011,6 +1011,22 @@ dependencies = [
name = "roc_region" name = "roc_region"
version = "0.1.0" version = "0.1.0"
[[package]]
name = "roc_reporting"
version = "0.1.0"
dependencies = [
"indoc",
"maplit",
"pretty_assertions",
"quickcheck",
"quickcheck_macros",
"roc_collections",
"roc_module",
"roc_problem",
"roc_region",
"roc_types",
]
[[package]] [[package]]
name = "roc_solve" name = "roc_solve"
version = "0.1.0" version = "0.1.0"

View file

@ -14,6 +14,7 @@ members = [
"compiler/constrain", "compiler/constrain",
"compiler/unify", "compiler/unify",
"compiler/solve", "compiler/solve",
"compiler/reporting",
"vendor/ena", "vendor/ena",
"vendor/pathfinding" "vendor/pathfinding"
] ]

View file

@ -0,0 +1,19 @@
[package]
name = "roc_reporting"
version = "0.1.0"
authors = ["Richard Feldman <oss@rtfeldman.com>"]
edition = "2018"
[dependencies]
roc_collections = { path = "../collections" }
roc_region = { path = "../region" }
roc_module = { path = "../module" }
roc_problem = { path = "../problem" }
roc_types = { path = "../types" }
[dev-dependencies]
pretty_assertions = "0.5.1 "
maplit = "1.0.1"
indoc = "0.3.3"
quickcheck = "0.8"
quickcheck_macros = "0.8"

View file

@ -0,0 +1,14 @@
#![warn(clippy::all, clippy::dbg_macro)]
// I'm skeptical that clippy:large_enum_variant is a good lint to have globally enabled.
//
// It warns about a performance problem where the only quick remediation is
// to allocate more on the heap, which has lots of tradeoffs - including making it
// long-term unclear which allocations *need* to happen for compilation's sake
// (e.g. recursive structures) versus those which were only added to appease clippy.
//
// Effectively optimizing data struture memory layout isn't a quick fix,
// and encouraging shortcuts here creates bad incentives. I would rather temporarily
// re-enable this when working on performance optimizations than have it block PRs.
#![allow(clippy::large_enum_variant)]
pub mod report;

View file

@ -18,4 +18,3 @@ pub mod fmt;
pub mod llvm; pub mod llvm;
pub mod load; pub mod load;
pub mod mono; pub mod mono;
pub mod reporting;