Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use relative path for error messages. #708

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions spec/errors/access_expected_field
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ component Main {

I was expecting the name of the accessed entity but I found "a space" instead:

./spec/errors/access_expected_field:3:7
├────────────────────────────────────────
┌ errors/access_expected_field:3:7
├─────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ "".
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/access_field_not_found
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ The accessed field "blaha" does not exists on the entity:

The access in question is here:

./spec/errors/access_field_not_found:10:5
├──────────────────────────────────────────
┌ errors/access_field_not_found:10:5
├───────────────────────────────────
6│ fun render : Bool {
7│ let blah =
8│ { blah: "Hello" }
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/access_not_record
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ You are trying to access a field on an entity which is not a record:

The access in question is here:

./spec/errors/access_not_record:5:5
├────────────────────────────────────
┌ errors/access_not_record:5:5
├─────────────────────────────
1│ component Main {
2│ fun render : Bool {
3│ let blah = ""
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/argument_expected_colon
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ A colon must separate the arguments name from its type, here is an example:

I was expecting the colon of the argument but I found "a space" instead:

./spec/errors/argument_expected_colon:2:15
├───────────────────────────────────────────
┌ errors/argument_expected_colon:2:15
├────────────────────────────────────
1│ component Main {
2│ fun render (a
│ ⌃⌃⌃⌃
4 changes: 2 additions & 2 deletions spec/errors/argument_expected_default_value
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ an example:

I was expecting the default value of the argument but I found "a space" instead:

./spec/errors/argument_expected_default_value:2:26
├───────────────────────────────────────────────────
┌ errors/argument_expected_default_value:2:26
├────────────────────────────────────────────
1│ component Main {
2│ fun render (a : String =
│ ⌃⌃⌃⌃
4 changes: 2 additions & 2 deletions spec/errors/argument_expected_type
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ An argument must have its type defined, here is an example:

I was expecting the type of the argument but I found "a space" instead:

./spec/errors/argument_expected_type:2:17
├──────────────────────────────────────────
┌ errors/argument_expected_type:2:17
├───────────────────────────────────
1│ component Main {
2│ fun render (a :
│ ⌃⌃⌃⌃
4 changes: 2 additions & 2 deletions spec/errors/array_destructuring_expected_closing_bracket
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ component Main {
I was expecting the closing bracket of an array destructuring but I found "a
space" instead:

./spec/errors/array_destructuring_expected_closing_bracket:3:10
├────────────────────────────────────────────────────────────────
┌ errors/array_destructuring_expected_closing_bracket:3:10
├─────────────────────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ let [x
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/array_expected_closing_bracket
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ component Main {

I was expecting the closing bracket of an array but I found "a space" instead:

./spec/errors/array_expected_closing_bracket:3:8
├─────────────────────────────────────────────────
┌ errors/array_expected_closing_bracket:3:8
├──────────────────────────────────────────
1│ component Main {
2│ fun render : Array(String) {
3│ ["A"
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/array_expected_type_or_variable
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ example:

I was expecting the type but I found "a space" instead:

./spec/errors/array_expected_type_or_variable:3:9
├──────────────────────────────────────────────────
┌ errors/array_expected_type_or_variable:3:9
├───────────────────────────────────────────
1│ component Main {
2│ fun render : Array(String) {
3│ [] of
Expand Down
7 changes: 4 additions & 3 deletions spec/errors/array_not_matches
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ component Main {
<div/>
}
}
--------------------------------------------------------------------------------░ ERROR (ARRAY_NOT_MATCHES) ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
--------------------------------------------------------------------------------
░ ERROR (ARRAY_NOT_MATCHES) ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

The 2nd item of an array does not match the type of the 1st item.

Expand All @@ -27,8 +28,8 @@ Instead it is:

The item in question is here:

./spec/errors/array_not_matches:5:7
├────────────────────────────────────
┌ errors/array_not_matches:5:7
├─────────────────────────────
1│ component Main {
2│ fun test : Array(String) {
3│ [
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/array_not_matches_defined_type
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Instead it is:

The array in question is here:

./spec/errors/array_not_matches_defined_type:6:10
├──────────────────────────────────────────────────
┌ errors/array_not_matches_defined_type:6:10
├───────────────────────────────────────────
2│ fun test : Array(String) {
3│ [
4│ "Hello",
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/asset_directive_expected_closing_parenthesis
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ component Main {
I was expecting the closing parenthesis of an asset directive but I found "a
space" instead:

./spec/errors/asset_directive_expected_closing_parenthesis:3:15
├────────────────────────────────────────────────────────────────
┌ errors/asset_directive_expected_closing_parenthesis:3:15
├─────────────────────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ @asset(path
Expand Down
5 changes: 2 additions & 3 deletions spec/errors/asset_directive_expected_file
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ The path specified for an asset directive does not exist:

The asset directive in question is here:

./spec/errors/asset_directive_expected_file:3:5
├────────────────────────────────────────────────
┌ errors/asset_directive_expected_file:3:5
├─────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ @asset(path)
│ ⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃⌃
4│ }
5│ }

4 changes: 2 additions & 2 deletions spec/errors/asset_directive_expected_opening_parenthesis
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ component Main {
I was expecting the opening parenthesis of an asset directive but I found "a
space" instead:

./spec/errors/asset_directive_expected_opening_parenthesis:3:10
├────────────────────────────────────────────────────────────────
┌ errors/asset_directive_expected_opening_parenthesis:3:10
├─────────────────────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ @asset
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/asset_directive_expected_path
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ component Main {
I was expecting the path (to the asset) of an asset directive but I found "a
space" instead:

./spec/errors/asset_directive_expected_path:3:11
├─────────────────────────────────────────────────
┌ errors/asset_directive_expected_path:3:11
├──────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ @asset(
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/block_no_expressions
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ component Main {

This block doesn't have any statements. It should have at least one.

./spec/errors/block_no_expressions:2:26
├────────────────────────────────────────
┌ errors/block_no_expressions:2:26
├─────────────────────────────────
1│ component Main {
│ ⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄
2│ fun componentDidUpdate {
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/bracket_access_expected_closing_bracket
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ component Main {
I was expecting the closing bracket of a bracket access but I found "a space"
instead:

./spec/errors/bracket_access_expected_closing_bracket:3:11
├───────────────────────────────────────────────────────────
┌ errors/bracket_access_expected_closing_bracket:3:11
├────────────────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ array[0
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/bracket_access_expected_index
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ component Main {

I was expecting the index of a bracket access but I found "a space" instead:

./spec/errors/bracket_access_expected_index:3:10
├─────────────────────────────────────────────────
┌ errors/bracket_access_expected_index:3:10
├──────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ array[
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/bracket_access_index_not_number
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Instead it is:

The index in question is here:

./spec/errors/bracket_access_index_not_number:7:7
├──────────────────────────────────────────────────
┌ errors/bracket_access_index_not_number:7:7
├───────────────────────────────────────────
3│ [
4│ "Hello",
5│ "Blah",
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/bracket_access_invalid_tuple
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ of the tuple is:

The tuple in question is here:

./spec/errors/bracket_access_invalid_tuple:3:5
├───────────────────────────────────────────────
┌ errors/bracket_access_invalid_tuple:3:5
├────────────────────────────────────────
1│ component Main {
2│ fun test : Maybe(String) {
3│ {"Hello", ""}[2]
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/bracket_access_not_accessible
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Instead it is:

The array in question is here:

./spec/errors/bracket_access_not_accessible:3:5
├────────────────────────────────────────────────
┌ errors/bracket_access_not_accessible:3:5
├─────────────────────────────────────────
1│ component Main {
2│ fun test : Maybe(String) {
3│ 0[0]
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/call_argument_size_mismatch
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ The type of the function is:

The call in question is here:

./spec/errors/call_argument_size_mismatch:7:5
├──────────────────────────────────────────────
┌ errors/call_argument_size_mismatch:7:5
├───────────────────────────────────────
3│ input
4│ }
5│
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/call_argument_type_mismatch
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Instead it is:

The call in question is here:

./spec/errors/call_argument_type_mismatch:7:5
├──────────────────────────────────────────────
┌ errors/call_argument_type_mismatch:7:5
├───────────────────────────────────────
3│ input
4│ }
5│
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/call_expected_closing_parenthesis
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ The arguments of a call must be enclosed by parenthesis, here is an example:

I was expecting the closing parenthesis of a call but I found "a space" instead:

./spec/errors/call_expected_closing_parenthesis:3:12
├─────────────────────────────────────────────────────
┌ errors/call_expected_closing_parenthesis:3:12
├──────────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ test("A"
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/call_not_a_function
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ The entity you called is not a function, instead it is:

The call in question is here:

./spec/errors/call_not_a_function:5:5
├──────────────────────────────────────
┌ errors/call_not_a_function:5:5
├───────────────────────────────
1│ component Main {
2│ state x : String = ""
3│
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/call_not_found_argument
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ The type of the function is:

The call in question is here:

./spec/errors/call_not_found_argument:7:5
├──────────────────────────────────────────
┌ errors/call_not_found_argument:7:5
├──────────────────────────────────────
3│ <div/>
4│ }
5│
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/call_with_mixed_arguments
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ specific cases I cannot pair the arguments with the values.

The call in question is here:

./spec/errors/call_with_mixed_arguments:7:5
├────────────────────────────────────────────
┌ errors/call_with_mixed_arguments:7:5
├─────────────────────────────────────
3│ <div/>
4│ }
5│
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/case_branch_expected_expression
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ A case branch must have an value, here is an example:

I was expecting the value of a case branch but I found "a space" instead:

./spec/errors/case_branch_expected_expression:4:8
├──────────────────────────────────────────────────
┌ errors/case_branch_expected_expression:4:8
├───────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ case ("a") {
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/case_branch_not_matches
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Instead it is:

The branch in question is here:

./spec/errors/case_branch_not_matches:5:7
├──────────────────────────────────────────
┌ errors/case_branch_not_matches:5:7
├───────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ case ("x") {
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/case_expected_branches
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ component Main {

I was expecting the branches of a case but I found "a space" instead:

./spec/errors/case_expected_branches:3:16
├──────────────────────────────────────────
┌ errors/case_expected_branches:3:16
├───────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ case ("a") {
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/case_expected_closing_bracket
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ component Main {

I was expecting the closing bracket of a case but I found "a space" instead:

./spec/errors/case_expected_closing_bracket:4:12
├─────────────────────────────────────────────────
┌ errors/case_expected_closing_bracket:4:12
├──────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ case ("a") {
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/case_expected_closing_parenthesis
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ component Main {

I was expecting the closing parenthesis of a case but I found "a space" instead:

./spec/errors/case_expected_closing_parenthesis:3:13
├─────────────────────────────────────────────────────
┌ errors/case_expected_closing_parenthesis:3:13
├──────────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ case ("a"
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/case_expected_condition
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ component Main {

I was expecting the condition of a case but I found "a space" instead:

./spec/errors/case_expected_condition:3:8
├──────────────────────────────────────────
┌ errors/case_expected_condition:3:8
├───────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ case
Expand Down
4 changes: 2 additions & 2 deletions spec/errors/case_expected_opening_bracket
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ component Main {

I was expecting the opening bracket of a case but I found "a space" instead:

./spec/errors/case_expected_opening_bracket:3:14
├─────────────────────────────────────────────────
┌ errors/case_expected_opening_bracket:3:14
├──────────────────────────────────────────
1│ component Main {
2│ fun render : String {
3│ case ("a")
Expand Down
Loading