mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
fixed dir copying issue, added earthignore, fixed typos, set up typo checking for CI
This commit is contained in:
parent
22d834ebd9
commit
8a8bbfd10b
4 changed files with 10 additions and 13 deletions
4
.earthignore
Normal file
4
.earthignore
Normal file
|
@ -0,0 +1,4 @@
|
|||
AUTHORS
|
||||
nix
|
||||
.envrc
|
||||
.gitignore
|
15
Earthfile
15
Earthfile
|
@ -1,8 +1,6 @@
|
|||
FROM rust:1.52-slim-buster
|
||||
WORKDIR /earthbuild
|
||||
|
||||
ARG TO_COPY_DIRS=cli compiler docs editor roc_std vendor examples Cargo.toml Cargo.lock
|
||||
|
||||
prep-debian:
|
||||
RUN apt -y update
|
||||
|
||||
|
@ -40,8 +38,6 @@ install-zig-llvm-valgrind-clippy-rustfmt:
|
|||
RUN rustup component add clippy
|
||||
# rustfmt
|
||||
RUN rustup component add rustfmt
|
||||
# typo checker
|
||||
RUN cargo install typos-cli
|
||||
# criterion
|
||||
RUN cargo install --git https://github.com/Anton-4/cargo-criterion --branch main
|
||||
# sccache
|
||||
|
@ -61,8 +57,7 @@ deps-image:
|
|||
copy-dirs:
|
||||
FROM +install-zig-llvm-valgrind-clippy-rustfmt
|
||||
# If you edit this, make sure to update copy-dirs-and-cache below.
|
||||
RUN baksldbjk
|
||||
COPY --dir $TO_COPY_DIRS ./
|
||||
COPY --dir cli compiler docs editor roc_std vendor examples Cargo.toml Cargo.lock ./
|
||||
|
||||
copy-dirs-and-cache:
|
||||
FROM +install-zig-llvm-valgrind-clippy-rustfmt
|
||||
|
@ -71,7 +66,7 @@ copy-dirs-and-cache:
|
|||
# This needs to be kept in sync with copy-dirs above.
|
||||
# The reason this is at the end is to maximize caching.
|
||||
# Lines above this should be cached even if the code changes.
|
||||
COPY --dir $TO_COPY_DIRS ./
|
||||
COPY --dir cli compiler docs editor roc_std vendor examples Cargo.toml Cargo.lock ./
|
||||
|
||||
prepare-cache:
|
||||
FROM +copy-dirs
|
||||
|
@ -105,10 +100,8 @@ check-rustfmt:
|
|||
RUN cargo fmt --all -- --check
|
||||
|
||||
check-typos:
|
||||
FROM +copy-dirs
|
||||
RUN echo "DIRS_TO_KEEP=" > temp42.txt
|
||||
RUN echo $TO_COPY_DIRS | sed "s/ /\"|\"/g" >> temp42.txt
|
||||
RUN source temp42.txt && rm -v !("$DIRS_TO_KEEP")
|
||||
RUN cargo install typos-cli --version 1.0.4 # use latest version on resolution of issue crate-ci/typos#277
|
||||
COPY --dir .github ci cli compiler docs editor examples packages roc_std www *.md LEGAL_DETAILS shell.nix ./
|
||||
RUN typos
|
||||
|
||||
test-rust:
|
||||
|
|
|
@ -27,7 +27,7 @@ map :
|
|||
|
||||
# TODO: removed `'` from signature because parser does not support it yet
|
||||
# Original signature: insert : Dict 'key val, 'key, val -> Dict 'key val
|
||||
## Make sure never to insert a key of *NaN* into a [Dict]! Becuase *NaN* is
|
||||
## Make sure never to insert a key of *NaN* into a [Dict]! Because *NaN* is
|
||||
## defined to be unequal to *NaN*, inserting a *NaN* key results in an entry
|
||||
## that can never be retrieved or removed from the [Dict].
|
||||
insert : Dict key val, key, val -> Dict key val
|
||||
|
|
|
@ -18,7 +18,7 @@ len : Set * -> Nat
|
|||
|
||||
# TODO: removed `'` from signature because parser does not support it yet
|
||||
# Original signature: `add : Set 'elem, 'elem -> Set 'elem`
|
||||
## Make sure never to add a *NaN* to a [Set]! Becuase *NaN* is defined to be
|
||||
## Make sure never to add a *NaN* to a [Set]! Because *NaN* is defined to be
|
||||
## unequal to *NaN*, adding a *NaN* results in an entry that can never be
|
||||
## retrieved or removed from the [Set].
|
||||
add : Set elem, elem -> Set elem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue