Commit Graph

878 Commits

Author SHA1 Message Date
Folkert
ee87eafdca
remove once_cell dependency 2023-01-28 14:26:24 +01:00
Ayaz Hafiz
7159eeabcd
Toss out when-recursive in alias analysis 2023-01-25 12:30:32 -06:00
dependabot[bot]
8801c147cb
Bump bumpalo from 3.11.0 to 3.11.1
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.11.0 to 3.11.1.
- [Release notes](https://github.com/fitzgen/bumpalo/releases)
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.11.0...3.11.1)

---
updated-dependencies:
- dependency-name: bumpalo
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-21 15:06:17 +00:00
Ayaz Hafiz
d9da945283
Allow generalization of annotations with no implementation 2023-01-14 15:33:54 +01:00
Folkert de Vries
d8b2ff07f8
Merge pull request #4802 from roc-lang/valgrind-unit-tests
Valgrind unit tests
2023-01-11 19:45:28 +01:00
Folkert
9d9ae290fe
rebuild the platform without doing anything else 2023-01-08 15:39:47 +01:00
dependabot[bot]
d5b8e077b8
Bump tokio from 1.22.0 to 1.24.1
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.22.0 to 1.24.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.22.0...tokio-1.24.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-06 21:55:09 +00:00
Ayaz Hafiz
50826d1a83
Inline interners into the layout interner module
I realized that we'll need to make the layout interner more complicated
to support things like recursive pointers pointing to their parents and
to support lambda set layout caching. Since the layout interner is the
only user of intern crate right now anyway, just inline the whole thing.
2023-01-03 14:19:39 -06:00
Folkert
06e5aea454
add test source 2022-12-30 14:30:09 +01:00
Folkert
c97dbcfde1
valgrind test crate 2022-12-30 14:30:08 +01:00
Ayaz Hafiz
7ab7fdfa7b
Push interned layouts as mut throughout the backend, and intern box layouts 2022-12-28 18:51:26 -06:00
Joshua Warner
bfeddc470a
Move syntax tests to a dedicated crate
* test_fmt moves out of fmt crate
* test_parse _mostly_ moves out of parse crate and into `test_snapshots.rs` (some simple tests remain)
* now there's only two fuzz targets, fuzz_expr and fuzz_module, that cover both parsing and formatting
* added a system to auto-add new snapshot entries for new test files
* took some commented-out tests in `test_parse` and converted them to snapshot tests
* moved test_fmt's verification of formatting consistency into test_snapshots
* fixed a huge derp on my part where the fmt fuzzer in #4758 was completely useless (broken by refactoring just prior to submitting the PR)
* fixed a formatting bug found by fuzzing (bound_variable.expr.roc) - that I missed earlier due to ^^^ that derp
* no longer have roc_test_utils as a dependency in fmt - which was causing problems for the wasm build
2022-12-26 22:50:24 -08:00
Brian Carroll
405387afd5
repl_test: remove dependency on roc_wasm_module 2022-12-16 15:01:36 +00:00
Brian Carroll
fec64f0766
cli: remove wasmer dependency and rename run_with_wasmer->run_wasm 2022-12-16 14:52:10 +00:00
Brian Carroll
d63715d05f
repl_test: remove dependency on wasmer 2022-12-16 14:52:10 +00:00
Brian Carroll
b7fef386ee
wasm_interp: implement WASI random_get & refactor default imports 2022-12-16 14:52:05 +00:00
Brian Carroll
eaa3f14fb0
repl_test: start re-writing the Wasm tests to use roc_wasm_interp 2022-12-16 14:52:05 +00:00
Brian Carroll
d389601035
Merge branch 'main' of github.com:roc-lang/roc into wasm_interp_test_gen 2022-12-16 14:50:09 +00:00
Ayaz
9b4e30a903
Merge pull request #4745 from roc-lang/i4712
Ensure that disjoint nested lambda sets force parents to be disjoint
2022-12-14 14:55:25 -06:00
Brian Carroll
01d0c5fabc
Merge branch 'main' of github.com:roc-lang/roc into wasm_interp_test_gen 2022-12-14 11:15:42 +00:00
Ayaz Hafiz
6b2497f342
Update cargo lock 2022-12-12 14:50:53 -06:00
Joshua Warner
e83cd8f191
Re-improve perf of skipping spaces and comments
On my M1 mac this shows as ~25% faster at parsing Num.roc than the old implementation, probably because nobody wrote any NEON code.

Even on my x86_64 linux box (Ryzen 2700x), this shows as 10% faster than the current SSE implementation (running with RUSTFLAGS="-C target-cpu=native").
2022-12-11 08:43:22 -08:00
Brian Carroll
90449f45f3
test_gen: get some tests working with roc_wasm_interp 2022-12-10 00:52:23 +00:00
Brendan Hansknecht
8e710cb80e
disable wasm tests that are broken 2022-12-03 13:17:36 -08:00
Brendan Hansknecht
cb08dca6f1
Add an indexmap like dict to roc 2022-12-03 13:17:34 -08:00
Ayaz Hafiz
7e512077e7
Fix imports for repl 2022-12-02 14:11:58 -06:00
Ayaz Hafiz
39f89e3d65
Get severity from type problem variants 2022-12-02 14:11:58 -06:00
Richard Feldman
0e74cc14cc
Merge pull request #4653 from roc-lang/fix-mv
Fallback to deep copy if `rename` fails when unpacking package tarball
2022-12-02 07:19:57 -05:00
Richard Feldman
84eb82b815
Make fs_extra a workspace dependency 2022-12-01 22:33:04 -05:00
Ayaz Hafiz
06d133c866
Update lockfile 2022-12-01 10:06:17 -06:00
Anton-4
a2e296e433
update lock file 2022-11-30 18:15:24 +01:00
Richard Feldman
b2beeb770e
Merge remote-tracking branch 'origin/main' into https-packages 2022-11-25 19:50:06 -05:00
Ayaz
8c0ff4c839
Merge pull request #4558 from roc-lang/specialization-sets-for-impl-opaques
Support custom abilities for opaques with immaterial lambda sets
2022-11-25 16:42:32 -06:00
Richard Feldman
253f903ae6
Drop openssl dependency 2022-11-24 21:14:26 -05:00
Brian Carroll
60a671362f
wasm_interp: Create a CLI to run .wasm files 2022-11-25 00:14:44 +00:00
Richard Feldman
f5cb2d73a1
Merge branch 'precompiled-legacy' into https-packages 2022-11-24 04:29:56 -05:00
Richard Feldman
28bccb792f
Merge remote-tracking branch 'origin/main' into precompiled-legacy 2022-11-24 02:20:50 -05:00
Ayaz
3059fd31c9
Merge branch 'main' into specialization-sets-for-impl-opaques
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-11-23 17:12:04 -06:00
Richard Feldman
e97a5fe7f6
Use include_bytes! so builtin hosts live in binary 2022-11-22 17:57:32 -05:00
Ayaz Hafiz
e36618b9e9
Support custom abilities for opaques with immaterial lambda sets
If a specialization of an ability member has a lambda set that is not
reflected in the unspecialized lambda sets of the member's prototype
signature, then the specialization lambda set is deemed to be immaterial
to the specialization lambda set mapping, and we don't need to associate
it with a particular region from the prototype signature.

This can happen when an opaque contains functions that are some specific
than the generalized prototype signature; for example, when we are
defining a custom impl for an opaque with functions.

Addresses a bug found in 8c3158c3e0
2022-11-21 18:03:56 -06:00
Richard Feldman
ea8bb8820b
Switch from ureq to reqwest::blocking 2022-11-21 15:01:43 -05:00
Brian Carroll
b0e89dd386
wasm_interp: new crate, with a value_stack module 2022-11-21 19:54:48 +00:00
Richard Feldman
721841fa1f
Provide roc_cache_dir everywhere 2022-11-20 19:53:48 -05:00
Richard Feldman
581c2f248d
Download files into tempdir if no cache available 2022-11-20 11:29:31 -05:00
Richard Feldman
a6c0bd854f
Revert "Always use a tempdir for caches during tests"
This reverts commit 6572b46983.
2022-11-20 11:10:51 -05:00
Richard Feldman
6572b46983
Always use a tempdir for caches during tests 2022-11-20 11:10:17 -05:00
Richard Feldman
40bd8ff1de
Support loading platform modules via HTTPS 2022-11-20 10:37:55 -05:00
Richard Feldman
066eb38043
Drop unusued tempfile dependency in packaging 2022-11-19 23:47:34 -05:00
Richard Feldman
7c1c48afa7
Add https module 2022-11-19 23:46:29 -05:00
Richard Feldman
0fe3a2e1dc
Switch from lz4 to brotli compression 2022-11-19 23:46:29 -05:00
Richard Feldman
777e05cdc8
Report how long it took to make the bundle 2022-11-19 23:46:28 -05:00
Richard Feldman
841d764ca1
Add roc_packaging::rp1 initial implementation 2022-11-19 23:46:28 -05:00
Richard Feldman
7f617c87bf
Change precompiled host filename format 2022-11-18 17:08:10 -05:00
Richard Feldman
fa2e0648ca
Fix wasm32 host filename generation 2022-11-18 16:47:29 -05:00
Richard Feldman
e4e629c4e4
clippy doesn't like Result with () for the error 2022-11-18 14:45:12 -05:00
Brian Carroll
2fa4c33b77
Merge branch 'main' of github.com:roc-lang/roc into wasm_module_crate 2022-11-15 21:16:25 +00:00
Ayaz Hafiz
3723071c15
Collect deeply nested type names in alias analysis
Previously we only collected type names that appeared on the surface of
a type during alias analysis, but certain types that need to be named
(i.e. recursive types) may be observed only when we actually convert the IR
to the morphic IR. Make sure we collect those appropriately.

This is a cherry pick of the relevant changes in #4121.
2022-11-15 09:23:28 -06:00
Brian Carroll
04fcf89653
Fix compile errors in wasm tests 2022-11-15 09:40:55 +00:00
Folkert
2c23a106f2
make inkwell a workspace dependency 2022-11-13 15:00:48 +01:00
Brian Carroll
63d9187343
move wasm_module out of gen_wasm 2022-11-13 09:03:08 +00:00
Ayaz
2cb72eb622
Merge pull request #4499 from roc-lang/debug-soa-types
Pretty-printer for debug representation of SoA types
2022-11-10 02:01:18 -06:00
Ayaz Hafiz
80a05be8e5
Pretty-printer for debug representation of SoA types
```
[roc_load 0.0.1] [crates/compiler/solve/src/solve.rs:331] types.dbg(typ) = (`List.List` (`Num.U8`)), 68 -70->
[roc_load 0.0.1]   (`Decode.DecodeResult` 69
[roc_load 0.0.1]     ==> {result!: `Result.Result` 69 (`Decode.DecodeError` ==> [TooShort]73),
[roc_load 0.0.1]          rest!: `List.List` (`Num.U8`)})
```
2022-11-09 13:34:59 -06:00
Folkert de Vries
d242aa121e
Merge pull request #4497 from roc-lang/mutex-new-is-const
`Mutex::new` is now const
2022-11-09 20:20:49 +01:00
Folkert
e92ceb7282
Mutex::new() is now const 2022-11-09 17:51:43 +01:00
Richard Feldman
5a2dde73e0
Use strum to automate keeping targets list in sync 2022-11-09 10:47:09 -05:00
Anton-4
7702a1c62e
Merge pull request #4329 from roc-lang/editor_launch_fix
editor launch fix + new test
2022-11-07 15:27:22 +01:00
Folkert
92cc120c7f
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-11-05 12:21:37 +01:00
Richard Feldman
c03dc17ab4
Merge remote-tracking branch 'origin/main' into repl 2022-11-05 01:04:44 -04:00
Anton-4
590c61a6fd
Merge branch 'main' of github.com:roc-lang/roc into editor_launch_fix 2022-11-04 15:15:55 +01:00
Folkert
0c9b49f5cd
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-11-02 23:02:22 +01:00
Richard Feldman
1499ec5def
Drop termline dependency 2022-11-01 21:42:08 -04:00
Ayaz
0f4420e85e
Merge pull request #4447 from roc-lang/list-patterns-exhaustiveness
Exhaustiveness checking for list pattern matches
2022-11-01 15:19:42 -05:00
Ayaz Hafiz
92a3c48ce5
Implement sketching and pattern specialization for list patterns 2022-11-01 12:06:59 -05:00
Anton-4
4ec43d9964
Closes #4423, link build command refactoring 2022-10-31 21:32:38 +01:00
Richard Feldman
c3641d38d2
Add targets for repl_test 2022-10-31 16:14:59 -04:00
Richard Feldman
2b89f53e76
Right-align var_name if terminal under 80 chars 2022-10-31 06:14:43 -04:00
Folkert
dbd0d30893
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-10-30 15:57:07 +01:00
Richard Feldman
51cb51d485
Gracefully recover from malformed closure in repl 2022-10-30 03:31:54 -04:00
Richard Feldman
875a2181a0
Right-align var_name output in repl (at 80 cols) 2022-10-30 02:47:26 -04:00
Richard Feldman
b7d3c77b76
Have the repl eval anyway if there are errors 2022-10-27 18:47:32 -04:00
Richard Feldman
90e79379cb
Remove test dependency on rustyline 2022-10-27 18:47:32 -04:00
Richard Feldman
a6c1667d37
Reorganize repl modules 2022-10-27 18:47:31 -04:00
Brendan Hansknecht
7189d79572
remove clap from linker deps 2022-10-25 15:41:00 -07:00
Brendan Hansknecht
d6bdd2aec7
create a roc sub command for generating a dummy lib 2022-10-24 18:47:11 -07:00
Folkert
b4878e5550
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-10-24 18:39:30 +02:00
Folkert
989784620d
use execve on windows! 2022-10-22 01:23:41 +02:00
Anton-4
8dff853830
Merge branch 'main' of github.com:roc-lang/roc into editor_launch_fix 2022-10-18 14:32:06 +02:00
Ayaz Hafiz
2a21cd8c6e
Resolve ability specializations looked up in expects 2022-10-18 01:04:21 +02:00
Ayaz Hafiz
d26e9c81e0
Resolve ability specializations looked up in expects 2022-10-17 17:56:48 -05:00
Ayaz Hafiz
c5cdab1ff9
Only ftruncate shm_open'd file once, and add some error messages 2022-10-17 09:45:34 -05:00
Folkert
323210c547
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-10-16 13:56:30 +02:00
Anton-4
2f8dcb7e12
Merge pull request #4298 from lucacervello/replace-panic!-with-internal-error!-in-compiler-crates
Replace panic! with internal_error! in `compiler/build`, `compiler/alias_analysis` and `compiler/arena_pool`
2022-10-15 17:05:25 +02:00
Anton-4
652dbde26e
editor launch fix + new test 2022-10-15 12:36:06 +02:00
Ayaz Hafiz
46eb427393
Use roc_serialize in serializing abilities store, and add tests 2022-10-11 09:41:47 -05:00
Ayaz Hafiz
46aab8ad8c
Use roc_serialize for subs serialization 2022-10-11 09:19:25 -05:00
Luca Cervello
c39103d6d0
chore: replace panic! with internal_error! 2022-10-11 11:52:08 +02:00
Ayaz
b84c05fad9
Merge pull request #4276 from roc-lang/dependabot/cargo/once_cell-1.15.0
Bump once_cell from 1.14.0 to 1.15.0
2022-10-10 10:08:50 -05:00
dependabot[bot]
1a9323ecdc
Bump libc from 0.2.133 to 0.2.135
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.133 to 0.2.135.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.133...0.2.135)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 13:00:20 +00:00
dependabot[bot]
7a2a0e12aa
Bump once_cell from 1.14.0 to 1.15.0
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 05:26:09 +00:00
Folkert
e62ab00c65
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-10-09 18:46:57 +02:00