Commit Graph

7860 Commits

Author SHA1 Message Date
JRI98
ad6900514b
Create symbols for struct fields before record update 2024-02-02 23:49:48 +00:00
Folkert de Vries
2347c3f667
Merge pull request #6481 from roc-lang/roc-test-inline-expect
make an inline expect triggered by a top-level expect work
2024-02-02 21:35:05 +01:00
Anton-4
76005451cc
update to basic-cli 0.8.1 2024-02-02 20:01:20 +01:00
Anton-4
3c7a834da1
update to new interpolation syntax 2024-02-02 13:39:10 +01:00
Brendan Hansknecht
50f220f878
Avoid generating actual lambda names
This is super slow. When trying to compile a "real" app like rocci-bird or the false interpreter,
the compiler will just hang in repeated calls to this function.

I am not sure if this "fix" is valid. I would assume that hashing the names should be equivalent hashing
the InLayout. The InLayout should be a unique id that maps to the layout. The layout should map to name.
So I think it should be a fix.

I haven't done intensive testing, but this is way way faster.
2024-02-01 21:35:17 -08:00
Richard Feldman
f79ff6d496
Remove unused lowlevel StrGetCapacity 2024-02-01 21:37:16 -05:00
Richard Feldman
6a6c25d32d
Update some docs and names 2024-02-01 21:30:44 -05:00
Brendan Hansknecht
fc6b519b59
Merge pull request #6463 from roc-lang/dec-pow
`Num.pow` for `Dec`
2024-02-01 09:17:55 -08:00
Folkert
41ad915c35
make an inline expect triggered by a top-level expect work 2024-02-01 13:08:01 +01:00
faldor20
ff0514aafc
spelling 2024-02-01 18:17:10 +10:00
Richard Feldman
0b42a902ab
Have List.withCapacity lowlevel use u64 over usize 2024-01-31 20:29:17 -05:00
Brendan Hansknecht
82ddfbb665
Merge pull request #6475 from roc-lang/windows-cc-return-correction
Correct windows return by pointer calculation
2024-01-31 12:30:18 -08:00
Brendan Hansknecht
a03a6d3bd3
Merge pull request #6477 from roc-lang/glue-with-legacy-and-surgical
Update test_glue_cli to use surgical and legacy linker
2024-01-31 02:37:30 -08:00
Brendan Hansknecht
39a90ec32d
Merge pull request #6474 from roc-lang/numeric-match-llvm-18
Change our alignment for 128bit numbers to match correct abi
2024-01-31 01:59:51 -08:00
Brendan Hansknecht
81dcaeceef
Update test_glue_cli to use surgical and legacy linker
I am hoping this will increase the changes of hitting a repro of #5924 with the legacy linker.
2024-01-30 22:30:30 -08:00
Brendan Hansknecht
795c368638
Merge pull request #6340 from roc-lang/pi-is-not-3
pi is not 3
2024-01-30 22:30:17 -08:00
Brendan Hansknecht
47ba132905
Correct windows return by pointer calculation
I always thought this was wrong. Saw it again today and decided to look it up.
Windows will return by pointer for anything over 64bits on an x86_64 machine.

Note: this is wrong for windows aarch64, but I will correct that in a PR where I clean up targets.
https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#return-values
https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#return-values
2024-01-30 21:37:51 -08:00
Brendan Hansknecht
f3b934c444
skip more broken glue tests on linux 2024-01-30 20:32:52 -08:00
Richard Feldman
aabd95404f
Merge remote-tracking branch 'origin/main' into remove-nat 2024-01-30 21:42:45 -05:00
Brendan Hansknecht
a925478f8d
Correct wasm32 alignment for 128bit types 2024-01-30 16:53:42 -08:00
Brendan Hansknecht
90a1468e37
Change our alignment for 128bit numbers to match llvm 18 and correct abi 2024-01-30 16:38:30 -08:00
Brendan Hansknecht
e7be9d435d
Merge pull request #6460 from roc-lang/dec-div-floor
`floor`, `ceiling` and `round` for `Dec`
2024-01-30 16:38:12 -08:00
Folkert
164319a07d
pi is not 3 2024-01-30 15:51:49 -08:00
Folkert
73d4a4ee56
wasm: incorrect step used to read RocList elements 2024-01-30 18:51:14 +01:00
Folkert
8c46ab95f2
prepend used wrong layout for alignment 2024-01-30 18:51:14 +01:00
Folkert
e16b25c93e
Num.pow for Dec 2024-01-30 16:33:50 +01:00
Folkert
21b540751a
force interpolated variables to be of type string 2024-01-30 15:04:56 +01:00
Kiryl Dziamura
b3dfdb562b
crash on rem div by zero 2024-01-30 11:12:02 +01:00
Richard Feldman
dd86b11150
Merge pull request #6430 from stuarth/links-in-doc-headers
allow attributes in doc headers
2024-01-29 14:49:04 -05:00
Folkert
2e648cfdd5
add support in llvm/wasm backends 2024-01-29 16:16:06 +01:00
Richard Feldman
7c19b42a99
Merge pull request #6457 from roc-lang/division-by-zero
Division by zero
2024-01-29 08:37:31 -05:00
Folkert
db3b40a07b
Dec floor/ceiling/round 2024-01-29 13:39:38 +01:00
Richard Feldman
3e27e18566
Merge remote-tracking branch 'origin/main' into remove-nat 2024-01-29 07:23:58 -05:00
Eli Dowling
84e8e61fa5
formatting
fix formatting

fixed last formatting issue

Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:53 +10:00
Eli Dowling
987e0c6c4b
Support for completion of closures
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:52 +10:00
Eli Dowling
2da3a2e7a6
remove time based tests
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:52 +10:00
Eli Dowling
55b364e76b
Added comment about condvar for waiting on latest doc
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:52 +10:00
Eli Dowling
59ed193f67
spelling
removed sleep

Rework comment

Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:51 +10:00
Eli Dowling
85ed513775
prevented overwriting newer documents during updating
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:51 +10:00
Eli Dowling
9e65c28891
added env var for debounce, removed app from tests
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:51 +10:00
Eli Dowling
9d02662d2c
added indoc to tests and increased delay to ensure it is longer than change debounce
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:51 +10:00
Eli Dowling
22b8c77232
Update crates/lang_srv/src/analysis/completion.rs
Co-authored-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
Signed-off-by: Eli Dowling <eli.jambu@yahoo.com>
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:50 +10:00
Eli Dowling
94102f6097
updated tests
removed accidentally commited

Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:50 +10:00
Eli Dowling
feacff4e14
analysis code refactor
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:50 +10:00
Eli Dowling
7eeda9825b
Better names for roc
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:50 +10:00
Eli Dowling
41088bb7e5
Reworked latest_doc waiting code
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:49 +10:00
Eli Dowling
e3ffa61c36
made latest doc code clearer
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:49 +10:00
Eli Dowling
cf2be505e6
moved updating code
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:49 +10:00
Eli Dowling
4cae553a7d
improved logs formatting
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:48 +10:00
Eli Dowling
dd8e76e0e3
reworked global analysis to remove unnecissary tuple
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:48 +10:00
Eli Dowling
a6549f3fd3
using ROCLS_LOG for logging env var
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:48 +10:00
Eli Dowling
740222e51a
fixed tests
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:48 +10:00
Eli Dowling
413d50a95a
fixed spelling
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:47 +10:00
Eli Dowling
c081bb7016
Removed LatestDocument and replaced it with a OnceLock
Signed-off-by: faldor20 <eli.jambu@yahoo.com>

removed unused imports

Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:47 +10:00
Eli Dowling
8a6855f29c
Made hover display with hightlighting
fixed bug in record field completion code

Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:47 +10:00
Eli Dowling
6dfbc1747c
Using env_logger for logging
added testing

Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:47 +10:00
Eli Dowling
b125cc22aa
Switched to simpler version of locking mechanisim
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:46 +10:00
Eli Dowling
a2c8acd9ac
completed refactor
added cargo lock

Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:46 +10:00
Eli Dowling
58dec9af28
support for tuples
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:46 +10:00
Eli Dowling
61b37b276e
refactor: Removed panicks from completion
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:45 +10:00
Eli Dowling
5ccaa1dc74
fixed completion being stopped by changes
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:45 +10:00
Eli Dowling
e86bd610e0
added support for record fields
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:45 +10:00
Eli Dowling
a988ee29ff
scoping all working and patterns too
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:45 +10:00
Eli Dowling
049c0e6358
function params and local variables working
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:44 +10:00
Eli Dowling
9b4230cfc3
completion working when there are errors in the file and has types
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:44 +10:00
Eli Dowling
8c44ec8fd2
first draft of completion
Signed-off-by: faldor20 <eli.jambu@yahoo.com>
2024-01-29 21:54:44 +10:00
Richard Feldman
cc7b9def5e
Update some string interpolation tests 2024-01-29 06:44:41 -05:00
Folkert
a7212ceb7f
add fract/trunc functions to zig RocDec 2024-01-29 12:44:34 +01:00
Richard Feldman
2dc950924f
Merge pull request #6458 from roc-lang/list-get-repl
List.get with negative index in repl
2024-01-29 06:41:37 -05:00
Folkert de Vries
eadc0d37cd
Merge pull request #6448 from roc-lang/dev-backend-glue-new
glue with the dev backend works again
2024-01-29 11:51:12 +01:00
Anton-4
1c62a41fad
Merge pull request #6333 from roc-lang/rust-1-72-upgrade
Rust 1.72 upgrade
2024-01-29 04:32:40 +01:00
Folkert
979128cf32
make division by zero (integer) not trap 2024-01-29 01:38:32 +01:00
Folkert
0b0127f45e
format infinite float as the ∞ utf8 symbol 2024-01-29 01:37:46 +01:00
Folkert de Vries
4a593a5b77
Merge pull request #6442 from roc-lang/dev-backend-glue-primitives
Dev backend glue primitives
2024-01-29 00:08:51 +01:00
Folkert de Vries
c8c28140b7
Merge pull request #6449 from roc-lang/dict-mul-wrap
dict: use Num.mulWrap to prevent branches
2024-01-29 00:07:01 +01:00
Richard Feldman
0681929d6d
Update snapshot syntax tests 2024-01-28 17:34:47 -05:00
Richard Feldman
3be96e52d8
roc format 2024-01-28 16:35:57 -05:00
Richard Feldman
3264d9ec8e
Merge pull request #6432 from jaredly/fix-glue
Fix syntax errors from RustGlue's tag generated code
2024-01-28 16:33:19 -05:00
Folkert
b0d57587e3
List.get with negative index in repl 2024-01-28 22:21:40 +01:00
Richard Feldman
b21e75e359
Remove a nat suffix 2024-01-28 15:16:41 -05:00
Richard Feldman
d84de324d8
Update insta tests 2024-01-28 14:57:39 -05:00
Folkert
28ab81614c
fix duplicate test that trips up llvm-wasm 2024-01-28 19:22:49 +01:00
Anton-4
6338e54205
improve wording 2024-01-28 18:33:12 +01:00
Folkert
df3d04e92d
fix duplicate test that trips up llvm-wasm 2024-01-28 18:29:08 +01:00
Anton-4
30a5a2cfac
change hashtag formatting 2024-01-28 18:15:24 +01:00
Anton-4
4da0b005f6
forgot &
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-01-28 17:30:38 +01:00
Folkert
1ef0a8f39e
update mono tests 2024-01-28 16:54:04 +01:00
Folkert
d4cac5cdd9
dict: use Num.mulWrap to prevent branches 2024-01-28 16:53:23 +01:00
Folkert
4fe383eb43
cleanup 2024-01-28 16:39:20 +01:00
Folkert
bd0cb6338e
fix incorrect element width used for List.append in dev backend 2024-01-28 16:39:16 +01:00
Anton-4
f09b4aaac4
skip nullable_wrapped too
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-01-28 16:35:34 +01:00
Anton-4
70f33f1a07
disable glue_cli_run::option,closures 2024-01-28 16:03:25 +01:00
Luke Boswell
be5c538763
fix glue TypeId 2024-01-28 10:57:43 +11:00
Folkert de Vries
01761abede
Merge pull request #6447 from roc-lang/fix-dollar
Fix parsing strings with non-interpolated "$"
2024-01-28 00:38:37 +01:00
Folkert
685025a240
a working dev-backend RustGlue.roc
with 2 caveates

- list reallocation does not work (so we make fresh allocations instead
- List.append in the glue main function causes a segfault. we use a concat with a single-element list instead
2024-01-28 00:36:07 +01:00
Richard Feldman
40fba2f1af
Fix parsing strings with non-interpolated "$" 2024-01-27 16:28:01 -05:00
Folkert
2794348722
fix bug in casting to u128/i128 2024-01-27 21:58:56 +01:00
Asher Mancinelli
da261be209
[parse] Better error message for bad packages list
When an appropriate list end is not found in the packages list, give a
more informative error message.
2024-01-27 11:25:19 -08:00
Trevor Settles
579522a602
caught incorrect file ext 2024-01-27 10:27:14 -07:00
Folkert
2786e8ff7f
refactor glue roc calling logic 2024-01-27 18:14:12 +01:00