Commit graph

373 commits

Author SHA1 Message Date
Fábio Beirão
3ba96709fa
Add nice error message for Problem::InvalidUrl(UrlProblem::MissingHttps)
Contributes to #5487
2023-06-02 12:11:13 +02:00
Fábio Beirão
b1321659c5
Add nice error message for Problem::InvalidUrl(UrlProblem::MissingHash)
Contributes to #5487
2023-06-02 12:05:22 +02:00
Fábio Beirão
8cd09b5210
Add nice error message for Problem::InvalidUrl(UrlProblem::InvalidFragment)
Contributes to #5487
2023-06-02 11:55:18 +02:00
Fábio Beirão
bab52edba4
Add nice error message for Problem::InvalidUrl(UrlProblem::MissingTarExt)
Contributes to #5487
2023-06-02 11:40:39 +02:00
Fábio Beirão
389a714f0e
Add nice error message for Problem::InvalidUrl(UrlProblem::InvalidExtensionSuffix)
Contributes to #5487
2023-06-02 11:40:38 +02:00
Fábio Beirão
449c58cc23
Add nice error message for Problem::HttpErr
Contributes to #5487
2023-06-02 11:40:37 +02:00
Fábio Beirão
9a75542a11
Add nice error message for Problem::FsExtraErr
Contributes to #5487
2023-06-02 11:40:36 +02:00
Fábio Beirão
1080269aaa
Add nice error message for Problem::IoErr
Contributes to #5487
2023-06-02 11:40:36 +02:00
Fábio Beirão
d4d26a545e
Add nice error message for Problem::InvalidContentHash
Contributes to #5487
2023-06-02 11:40:35 +02:00
Fábio Beirão
5306570a86
Remove the url_problem_intro_x functions
This approach did not scale to other error messages
Contributes to #5487
2023-06-02 11:40:34 +02:00
Fábio Beirão
281b044ed8
Add nice error message for Problem::MultipleEncodings
Contributes to #5487
2023-06-02 11:40:33 +02:00
Fábio Beirão
c5269e24b8
Add friendly error message for Problem::UnsupportedEncoding
Contributes to #5487
2023-06-02 11:40:33 +02:00
Fábio Beirão
273b7c07c1
Initial plumbing to be able to show https errors
Related to #5487
2023-06-02 11:40:32 +02:00
Agustin Zubiaga
23db4a5e87
Update tests to new record builder syntax 2023-05-17 11:47:34 -03:00
Luke Boswell
4d4cfcf981
merge remote/main and update mono tests 2023-05-15 16:51:56 +10:00
Richard Feldman
922a10db52
Merge pull request #5389 from agu-z/agu-z/record-builder-syntax
Record Builder Syntax
2023-05-13 22:47:03 -04:00
Agustin Zubiaga
f94004d137 Parse builders without backtracking from records 2023-05-13 20:05:42 -03:00
Agustin Zubiaga
c3bcb88c5b Special record builder error when applying opaque types 2023-05-11 20:20:35 -03:00
Agustin Zubiaga
71a2990e21 Tip replacing <- with : for static values 2023-05-09 23:37:24 -03:00
Agustin Zubiaga
d2a57112fd Unapplied record builder error 2023-05-08 20:16:38 -03:00
Agustin Zubiaga
6670fbb1ab Multiple record builder error 2023-05-08 19:26:47 -03:00
Gabriel Dertoni
7d0027f428
refactor: remove needles string allocation in pretty printer
Many times, in order to create a `ven_pretty::Doc` containing a text
node, the pattern `alloc.text(format!(...))` would be used. This code
then creates a fresh string that is then used in the `Doc`. However,
many times only a small string is necessary and so the allocation could
be optimized. The `ven_pretty` crate supports this through a `SmallString`
type. Allocating a fresh string with `format!` also moves control away
from the `DocAllocator` which isn't ideal, since it could also handle
the string allocations. So, instead of creating a fresh string, one can
simply call `alloc.as_string(format_args!(...))` and delegate the
allocation to the `DocAllocator` without any loss in expressivity. So,
in order to encorage this pattern, this commit also introduces the
`text!` macro.

In order to find all instances of the code pattern, the following
tree-sitter query was used:

```scm
(call_expression
    function: (field_expression
        field: (field_identifier) @field.name
               (#eq? @field.name "text"))
    arguments: (arguments
        (macro_invocation
            macro: (identifier) @macro.name
            (#eq? @macro.name "format")))) @reference.call
```
2023-05-03 21:28:36 -03:00
Luke Boswell
4f22b0747f
mono and update Json.fromUtf8 and Json.toUtf8 to Json.json 2023-04-21 10:57:48 +10:00
Ayaz Hafiz
dc9c5b13db
Introduce unannotated function arguments to the env as appropriate 2023-04-20 16:16:40 -05:00
Ayaz Hafiz
8b42300933
Add additional tests 2023-04-20 10:11:29 -05:00
Ayaz Hafiz
6df0caa6ac
Handle function arity checking in nested closures 2023-04-20 10:10:52 -05:00
Ayaz Hafiz
b46392311e
Catch functions typed with too few arguments
Closes #5264
2023-04-20 10:10:50 -05:00
Ayaz Hafiz
3b885ccf66
Improve error message when opaque wrapping a function is applied directly
Closes #5094
2023-04-12 10:06:27 -05:00
Ayaz Hafiz
19c0ebc10f
Fix reporting tests 2023-04-10 16:31:00 -05:00
Brendan Hansknecht
e5b88366fe
add proper error messages for ingested files 2023-04-09 14:03:33 -07:00
Brendan Hansknecht
6302a8d4b5
switch from type annotation to type variable 2023-04-09 14:03:33 -07:00
Brendan Hansknecht
8f4945f286
make file loading errors that happen late in compilation still fatal 2023-04-09 14:03:33 -07:00
Brendan Hansknecht
7079361841
add ingested file category for error messages 2023-04-09 14:03:32 -07:00
Richard Feldman
d391982c33
Apply tag union diffs to recursive tag unions 2023-03-26 23:19:50 -04:00
Richard Feldman
389ec09451
Show ellipses for tag payload slots of same types 2023-03-26 21:43:13 -04:00
Richard Feldman
3013b9e113
Fix reporting edge case where both unions are open 2023-03-26 14:50:27 -04:00
Richard Feldman
21e14589b0
Update tests 2023-03-26 11:49:45 -04:00
Richard Feldman
ae906ca7b3
Improve tag union diffs 2023-03-26 10:01:05 -04:00
Ayaz
1891df77b8
Merge pull request #5188 from roc-lang/i5177
Make sure openness constraint goes under tuples
2023-03-25 15:52:09 -05:00
Ayaz Hafiz
1b2ee9ad30
Make sure openness constraint goes under tuples
Closes #5177
2023-03-24 14:13:14 -05:00
Ayaz Hafiz
f4f9ae7a5d
Implement obligation checking of tuples for all abilities 2023-03-22 10:03:01 -05:00
Richard Feldman
47dd461a4a
Merge pull request #5048 from Arkham/improve-same-name-grammar
Use 'by accident' instead of 'on accident'
2023-03-08 11:26:48 -05:00
Brendan Hansknecht
f42f61e271
run a toml formatter and then clean it up a bit 2023-03-06 19:47:57 -08:00
Brendan Hansknecht
4a89bee0a5
centralize package versions except for vendor and excluded 2023-03-06 19:29:09 -08:00
Brendan Hansknecht
5485c8a5b0
update to using workspace package spec 2023-03-06 16:36:18 -08:00
Ju Liu
dfeabc5933 Use 'by accident' instead of 'on accident' 2023-02-18 15:42:34 +00:00
Ayaz
9340a67e87
Merge pull request #4993 from joshuawarner32/tuple-gen-tuple-backend-experiment
Implement mono / code generation for tuples
2023-02-08 10:42:51 -05:00
Joshua Warner
3fee0d3e8f
Fix a bunch of bugs in parsing/formatting found by fuzzing 2023-02-07 20:25:56 -08:00
Joshua Warner
5a6be05ead
implement mono / lowering for tuples 2023-02-07 18:54:50 -08:00
Ayaz Hafiz
009607c55a
Handle FunctionOrTagUnion types in exhaustiveness checking
We should treat FunctionOrTagUnion types as tag unions for the purposes
of exhautiveness checking.

Closes #4994
2023-02-01 22:03:10 -06:00