moved all crates into seperate folder + related path fixes

This commit is contained in:
Anton-4 2022-07-01 17:37:43 +02:00
parent 12ef03bb86
commit eee85fa45d
No known key found for this signature in database
GPG key ID: C954D6E0F9C0ABFD
1063 changed files with 92 additions and 93 deletions

View file

@ -1,56 +1,56 @@
[workspace]
members = [
"compiler/ident",
"compiler/region",
"compiler/collections",
"compiler/exhaustive",
"compiler/module",
"compiler/parse",
"compiler/can",
"compiler/problem",
"compiler/types",
"compiler/builtins",
"compiler/constrain",
"compiler/unify",
"compiler/solve",
"compiler/late_solve",
"compiler/fmt",
"compiler/derive_key",
"compiler/mono",
"compiler/alias_analysis",
"compiler/test_mono",
"compiler/test_derive",
"compiler/load",
"compiler/load_internal",
"compiler/gen_llvm",
"compiler/gen_dev",
"compiler/gen_wasm",
"compiler/build",
"compiler/arena_pool",
"compiler/test_gen",
"compiler/roc_target",
"compiler/debug_flags",
"vendor/inkwell",
"vendor/pathfinding",
"vendor/pretty",
"bindgen",
"editor",
"ast",
"cli",
"code_markup",
"highlight",
"error_macros",
"reporting",
"repl_cli",
"repl_eval",
"repl_test",
"repl_wasm",
"test_utils",
"utils",
"docs",
"docs_cli",
"linker",
"wasi-libc-sys",
"crates/compiler/ident",
"crates/compiler/region",
"crates/compiler/collections",
"crates/compiler/exhaustive",
"crates/compiler/module",
"crates/compiler/parse",
"crates/compiler/can",
"crates/compiler/problem",
"crates/compiler/types",
"crates/compiler/builtins",
"crates/compiler/constrain",
"crates/compiler/unify",
"crates/compiler/solve",
"crates/compiler/late_solve",
"crates/compiler/fmt",
"crates/compiler/derive_key",
"crates/compiler/mono",
"crates/compiler/alias_analysis",
"crates/compiler/test_mono",
"crates/compiler/test_derive",
"crates/compiler/load",
"crates/compiler/load_internal",
"crates/compiler/gen_llvm",
"crates/compiler/gen_dev",
"crates/compiler/gen_wasm",
"crates/compiler/build",
"crates/compiler/arena_pool",
"crates/compiler/test_gen",
"crates/compiler/roc_target",
"crates/compiler/debug_flags",
"crates/vendor/inkwell",
"crates/vendor/pathfinding",
"crates/vendor/pretty",
"crates/bindgen",
"crates/editor",
"crates/ast",
"crates/cli",
"crates/code_markup",
"crates/highlight",
"crates/error_macros",
"crates/reporting",
"crates/repl_cli",
"crates/repl_eval",
"crates/repl_test",
"crates/repl_wasm",
"crates/test_utils",
"crates/utils",
"crates/docs",
"crates/docs_cli",
"crates/linker",
"crates/wasi-libc-sys",
]
exclude = [
# Examples sometimes have Rust hosts in their platforms. The compiler should ignore those.
@ -58,10 +58,10 @@ exclude = [
"ci/bench-runner",
# Ignore building these normally. They are only imported by tests.
# The tests will still correctly build them.
"cli_utils",
"compiler/test_mono_macros",
"crates/cli_utils",
"crates/compiler/test_mono_macros",
# `cargo build` would cause roc_std to be built with default features which errors on windows
"roc_std",
"crates/roc_std",
]
# Needed to be able to run `cargo run -p roc_cli --no-default-features` -
# see www/build.sh for more.

View file

@ -1 +0,0 @@
../../../examples/interactive/cli-platform

View file

@ -48,6 +48,7 @@ pub fn fixtures_dir(dir_name: &str) -> PathBuf {
let mut path = root_dir();
// Descend into cli/tests/fixtures/{dir_name}
path.push("crates");
path.push("bindgen");
path.push("tests");
path.push("fixtures");

View file

@ -34,7 +34,7 @@ mod bindgen_cli_run {
let output = Command::new("cargo")
.args(args)
.current_dir(root_dir().join("cli"))
.current_dir(root_dir().join("crates").join("cli"))
.output()
.unwrap_or_else(|err| {
panic!(
@ -178,6 +178,7 @@ mod bindgen_cli_run {
.parent()
.unwrap()
.join("fixture-templates");
dbg!(&fixture_templates_dir);
// Copy the rust template from the templates directory into the fixture dir.
dircpy::CopyBuilder::new(fixture_templates_dir.join("rust"), platform_dir)

View file

@ -53,7 +53,7 @@ pub const ROC_DIR: &str = "ROC_DIR";
pub const DIRECTORY_OR_FILES: &str = "DIRECTORY_OR_FILES";
pub const ARGS_FOR_APP: &str = "ARGS_FOR_APP";
const VERSION: &str = include_str!("../../version.txt");
const VERSION: &str = include_str!("../../../version.txt");
pub fn build_app<'a>() -> Command<'a> {
let flag_optimize = Arg::new(FLAG_OPTIMIZE)

View file

@ -241,7 +241,10 @@ fn main() -> io::Result<()> {
Ok(format_exit_code)
}
Some((CMD_VERSION, _)) => {
print!("{}", concatcp!("roc ", include_str!("../../version.txt")));
print!(
"{}",
concatcp!("roc ", include_str!("../../../version.txt"))
);
Ok(0)
}

Some files were not shown because too many files have changed in this diff Show more