Merge branch 'trunk' of github.com:rtfeldman/roc into pure-roc-list-walk

This commit is contained in:
Brian Carroll 2022-07-02 18:08:43 +01:00
commit 219e6d11cf
No known key found for this signature in database
GPG key ID: 9CF4E3BF9C4722C7
1067 changed files with 105 additions and 104 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

@ -53,11 +53,11 @@ install-zig-llvm-valgrind-clippy-rustfmt:
copy-dirs:
FROM +install-zig-llvm-valgrind-clippy-rustfmt
COPY --dir bindgen cli cli_utils compiler docs docs_cli editor ast code_markup error_macros highlight utils test_utils reporting repl_cli repl_eval repl_test repl_wasm repl_www roc_std vendor examples linker Cargo.toml Cargo.lock version.txt www wasi-libc-sys ./
COPY --dir crates repl_www examples Cargo.toml Cargo.lock version.txt www ./
test-zig:
FROM +install-zig-llvm-valgrind-clippy-rustfmt
COPY --dir compiler/builtins/bitcode ./
COPY --dir crates/compiler/builtins/bitcode ./
RUN cd bitcode && ./run-tests.sh && ./run-wasm-tests.sh
build-rust-test:
@ -84,7 +84,7 @@ check-rustfmt:
check-typos:
RUN cargo install typos-cli --version 1.0.11 # version set to prevent confusion if the version is updated automatically
COPY --dir .github ci cli cli_utils compiler docs editor examples ast code_markup highlight utils linker nightly_benches packages roc_std www *.md LEGAL_DETAILS shell.nix version.txt ./
COPY --dir .github ci crates examples nightly_benches www *.md LEGAL_DETAILS flake.nix version.txt ./
RUN typos
test-rust:
@ -107,7 +107,7 @@ test-rust:
cargo test --locked --release --package test_gen --no-default-features --features gen-wasm -- --test-threads=1 && sccache --show-stats
# repl_test: build the compiler for wasm target, then run the tests on native target
RUN --mount=type=cache,target=$SCCACHE_DIR \
repl_test/test_wasm.sh && sccache --show-stats
crates/repl_test/test_wasm.sh && sccache --show-stats
# run i386 (32-bit linux) cli tests
# NOTE: disabled until zig 0.9
# RUN echo "4" | cargo run --locked --release --features="target-x86" -- --target=x86_32 examples/benchmarks/NQueens.roc
@ -152,13 +152,13 @@ prep-bench-folder:
ENV RUSTFLAGS="-C link-arg=-fuse-ld=lld -C target-cpu=native"
ARG BENCH_SUFFIX=branch
RUN cargo criterion -V
RUN --mount=type=cache,target=$SCCACHE_DIR cd cli && cargo criterion --no-run
RUN mkdir -p bench-folder/compiler/builtins/bitcode/src
RUN --mount=type=cache,target=$SCCACHE_DIR cd crates/cli && cargo criterion --no-run
RUN mkdir -p bench-folder/crates/compiler/builtins/bitcode/src
RUN mkdir -p bench-folder/target/release/deps
RUN mkdir -p bench-folder/examples/benchmarks
RUN cp examples/benchmarks/*.roc bench-folder/examples/benchmarks/
RUN cp -r examples/benchmarks/platform bench-folder/examples/benchmarks/
RUN cp compiler/builtins/bitcode/src/str.zig bench-folder/compiler/builtins/bitcode/src
RUN cp crates/compiler/builtins/bitcode/src/str.zig bench-folder/crates/compiler/builtins/bitcode/src
RUN cp target/release/roc bench-folder/target/release
# copy the most recent time bench to bench-folder
RUN cp target/release/deps/`ls -t target/release/deps/ | grep time_bench | head -n 1` bench-folder/target/release/deps/time_bench

View file

@ -1,3 +1,3 @@
#!/usr/bin/env bash
cp target/release/roc ./roc # to be able to exclude "target" later in the tar command
tar -czvf $1 --exclude="target" --exclude="zig-cache" roc LICENSE LEGAL_DETAILS examples/hello-world compiler/builtins/bitcode/src/ roc_std
tar -czvf $1 --exclude="target" --exclude="zig-cache" roc LICENSE LEGAL_DETAILS examples/hello-world crates/compiler/builtins/bitcode/src/ crates/roc_std

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!(

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