Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

Refresh snapshots

-1368
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__canonical_link.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: "compile_with_markdown_pages(config, modules, pages,\nCompileWithMarkdownPagesOpts::default())" 4 - snapshot_kind: text 5 4 --- 6 5 //// LICENSE.html 7 6
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__discarded_arguments_are_not_shown.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: "compile(config, modules)" 4 - snapshot_kind: text 5 4 --- 6 5 //// app.html 7 6
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__hello_docs.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: "compile(config, modules)" 4 - snapshot_kind: text 5 4 --- 6 5 //// app.html 7 6
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__internal_definitions_are_not_included.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: "compile(config, modules)" 4 - snapshot_kind: text 5 4 --- 6 5 //// app.html 7 6
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__long_function_wrapping.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: "compile(config, modules)" 4 - snapshot_kind: text 5 4 --- 6 5 //// app.html 7 6
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__markdown_code_from_function_comment_is_trimmed.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: "compile(config, modules)" 4 - snapshot_kind: text 5 4 --- 6 5 //// app.html 7 6
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__markdown_code_from_module_comment_is_trimmed.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: "compile(config, modules)" 4 - snapshot_kind: text 5 4 --- 6 5 //// app.html 7 6
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__markdown_code_from_standalone_pages_is_not_trimmed.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: "compile_with_markdown_pages(config, vec![], pages,\nCompileWithMarkdownPagesOpts::default())" 4 - snapshot_kind: text 5 4 --- 6 5 //// one.html 7 6
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__no_hex_publish.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: "compile_with_markdown_pages(config, modules, pages,\nCompileWithMarkdownPagesOpts { hex_publish: Some(DocContext::Build) })" 4 - snapshot_kind: text 5 4 --- 6 5 //// LICENSE.html 7 6
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__output_of_search_data_json.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: json 4 - snapshot_kind: text 5 4 --- 6 5 {"items":[{"type":"module","parentTitle":"gleam/option","title":"gleam/option","doc":"","ref":"gleam/option.html"},{"type":"type","parentTitle":"gleam/option","title":"Option","doc":"`Option` represents a value that may be present or not. `Some` means the value is present, `None` means the value is not.","ref":"gleam/option.html#Option"},{"type":"function","parentTitle":"gleam/option","title":"unwrap","doc":"Extracts the value from an `Option`, returning a default value if there is none.","ref":"gleam/option.html#unwrap"},{"type":"constant","parentTitle":"gleam/dynamic/decode","title":"bool","doc":"A decoder that decodes `Bool` values.\n\n # Examples\n\n \n let result = decode.run(dynamic.from(True), decode.bool)\n assert result == Ok(True)\n \n","ref":"gleam/dynamic/decode.html#bool"}],"proglang":"gleam"}
-1
compiler-core/src/docs/snapshots/gleam_core__docs__tests__tables.snap
··· 1 1 --- 2 2 source: compiler-core/src/docs/tests.rs 3 3 expression: "compile(config, modules)" 4 - snapshot_kind: text 5 4 --- 6 5 //// app.html 7 6
-20
compiler-core/src/javascript/tests/snapshots/gleam_core__javascript__tests__bit_arrays__match_dynamic_bits_size_error.snap
··· 1 - --- 2 - source: compiler-core/src/javascript/tests/bit_arrays.rs 3 - expression: "\nfn go(x) {\n let n = 16\n let assert <<a:bits-size(n)>> = x\n}\n" 4 - --- 5 - ----- SOURCE CODE 6 - 7 - fn go(x) { 8 - let n = 16 9 - let assert <<a:bits-size(n)>> = x 10 - } 11 - 12 - 13 - ----- ERROR 14 - error: Unsupported feature for compilation target 15 - ┌─ /src/javascript/error.gleam:4:16 16 - 17 - 4 │ let assert <<a:bits-size(n)>> = x 18 - │ ^^^^^^^^^^^^^^ 19 - 20 - This bit array size option in patterns is not supported for JavaScript compilation.
-20
compiler-core/src/javascript/tests/snapshots/gleam_core__javascript__tests__bit_arrays__match_dynamic_size_error.snap
··· 1 - --- 2 - source: compiler-core/src/javascript/tests/bit_arrays.rs 3 - expression: "\nfn go(x) {\n let n = 16\n let assert <<a:size(n)>> = x\n}\n" 4 - --- 5 - ----- SOURCE CODE 6 - 7 - fn go(x) { 8 - let n = 16 9 - let assert <<a:size(n)>> = x 10 - } 11 - 12 - 13 - ----- ERROR 14 - error: Unsupported feature for compilation target 15 - ┌─ /src/javascript/error.gleam:4:16 16 - 17 - 4 │ let assert <<a:size(n)>> = x 18 - │ ^^^^^^^^^ 19 - 20 - Non-constant size option in patterns is not supported for JavaScript compilation.
-2
compiler-core/src/language_server/tests/snapshots/gleam_core__language_server__tests__action__generate_dynamic_decoder_for_multi_variant_type_multi_word_name.snap
··· 1 1 --- 2 2 source: compiler-core/src/language_server/tests/action.rs 3 - assertion_line: 4432 4 3 expression: "\npub type Wibble {\n OneTwo(wibble: Int, next: Wibble)\n ThreeFour(wobble: Float, text: String, values: List(Bool))\n FiveSixSeven(one_two: Int)\n}\n" 5 - snapshot_kind: text 6 4 --- 7 5 ----- BEFORE ACTION 8 6
-2
compiler-core/src/language_server/tests/snapshots/gleam_core__language_server__tests__action__inline_variable_in_case_scope.snap
··· 1 1 --- 2 2 source: compiler-core/src/language_server/tests/action.rs 3 - assertion_line: 5199 4 3 expression: "\nimport gleam/io\n\npub fn main(x) {\n case x {\n True -> {\n let message = \"Hello!\"\n io.println(message)\n }\n False -> Nil\n }\n}\n" 5 - snapshot_kind: text 6 4 --- 7 5 ----- BEFORE ACTION 8 6
-24
compiler-core/src/parse/snapshots/gleam_core__parse__tests__case_without_body.snap
··· 1 - --- 2 - source: compiler-core/src/parse/tests.rs 3 - expression: case a 4 - --- 5 - [ 6 - Expression( 7 - Case { 8 - location: SrcSpan { 9 - start: 0, 10 - end: 6, 11 - }, 12 - subjects: [ 13 - Var { 14 - location: SrcSpan { 15 - start: 5, 16 - end: 6, 17 - }, 18 - name: "a", 19 - }, 20 - ], 21 - clauses: [], 22 - }, 23 - ), 24 - ]
-1
compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__errors__negative_out_of_range_erlang_float.snap
··· 1 1 --- 2 2 source: compiler-core/src/type_/tests/errors.rs 3 3 expression: "-1.8e308" 4 - snapshot_kind: text 5 4 --- 6 5 ----- SOURCE CODE 7 6 -1.8e308
-1
compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__errors__negative_out_of_range_erlang_float_in_const.snap
··· 1 1 --- 2 2 source: compiler-core/src/type_/tests/errors.rs 3 3 expression: const x = -1.8e308 4 - snapshot_kind: text 5 4 --- 6 5 ----- SOURCE CODE 7 6 const x = -1.8e308
-1
compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__errors__negative_out_of_range_erlang_float_in_pattern.snap
··· 1 1 --- 2 2 source: compiler-core/src/type_/tests/errors.rs 3 3 expression: "let assert [-1.8e308, b] = [x, y]" 4 - snapshot_kind: text 5 4 --- 6 5 ----- SOURCE CODE 7 6 let assert [-1.8e308, b] = [x, y]
-1
compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__errors__out_of_range_erlang_float.snap
··· 1 1 --- 2 2 source: compiler-core/src/type_/tests/errors.rs 3 3 expression: "1.8e308" 4 - snapshot_kind: text 5 4 --- 6 5 ----- SOURCE CODE 7 6 1.8e308
-1
compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__errors__out_of_range_erlang_float_in_const.snap
··· 1 1 --- 2 2 source: compiler-core/src/type_/tests/errors.rs 3 3 expression: const x = 1.8e308 4 - snapshot_kind: text 5 4 --- 6 5 ----- SOURCE CODE 7 6 const x = 1.8e308
-1
compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__errors__out_of_range_erlang_float_in_pattern.snap
··· 1 1 --- 2 2 source: compiler-core/src/type_/tests/errors.rs 3 3 expression: "let assert [1.8e308, b] = [x, y]" 4 - snapshot_kind: text 5 4 --- 6 5 ----- SOURCE CODE 7 6 let assert [1.8e308, b] = [x, y]
-38
compiler-core/src/type_/tests/snapshots/gleam_core__type___tests__errors__suggest_wrapping_a_value_into_ok_if_types_match_3.snap
··· 1 - --- 2 - source: compiler-core/src/type_/tests/errors.rs 3 - expression: "\npub fn main() {\n case todo {\n 1 -> Ok(2)\n _ -> {\n todo\n 1\n }\n }\n}\n" 4 - --- 5 - ----- SOURCE CODE 6 - 7 - pub fn main() { 8 - case todo { 9 - 1 -> Ok(2) 10 - _ -> { 11 - todo 12 - 1 13 - } 14 - } 15 - } 16 - 17 - 18 - ----- ERROR 19 - error: Type mismatch 20 - ┌─ /src/one/two.gleam:5:5 21 - 22 - 5 │ ╭ _ -> { 23 - 6 │ │ todo 24 - 7 │ │ 1 25 - │ │ ^ Did you mean to wrap this in an `Ok`? 26 - 8 │ │ } 27 - │ ╰─────^ 28 - 29 - This case clause was found to return a different type than the previous 30 - one, but all case clauses must return the same type. 31 - 32 - Expected type: 33 - 34 - Result(Int, a) 35 - 36 - Found type: 37 - 38 - Int
-2
test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_non_record_atom_tag.snap
··· 1 1 --- 2 2 source: test-output/src/tests/echo.rs 3 - assertion_line: 191 4 3 expression: output 5 - snapshot_kind: text 6 4 --- 7 5 --- main.gleam ---------------------- 8 6 pub fn main() {
-1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__alias_unqualified_import.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 8 4 3 expression: "./cases/alias_unqualified_import" 5 4 --- 6 5 //// /out/lib/the_package/_gleam_artefacts/one.cache
-2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__duplicate_module.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 21 4 3 expression: "./cases/duplicate_module" 5 4 --- 6 5 error: Duplicate module ··· 9 8 10 9 First: src/main.gleam 11 10 Second: test/main.gleam 12 -
-1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_escape_names.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 63 4 3 expression: "./cases/erlang_escape_names" 5 4 --- 6 5 //// /out/lib/the_package/_gleam_artefacts/one.cache
-1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 74 4 3 expression: "./cases/erlang_import" 5 4 --- 6 5 //// /out/lib/the_package/_gleam_artefacts/one.cache
-1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import_shadowing_prelude.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 85 4 3 expression: "./cases/erlang_import_shadowing_prelude" 5 4 --- 6 5 //// /out/lib/the_package/_gleam_artefacts/one.cache
-1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 96 4 3 expression: "./cases/erlang_nested" 5 4 --- 6 5 //// /out/lib/the_package/_gleam_artefacts/one@two.cache
-1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__hello_joe.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 118 4 3 expression: "./cases/hello_joe" 5 4 --- 6 5 //// /out/lib/the_package/_gleam_artefacts/hello_joe.cache
-1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_external_fns.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 173 4 3 expression: "./cases/imported_external_fns" 5 4 --- 6 5 //// /out/lib/the_package/_gleam_artefacts/one.cache
-1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__not_overwriting_erlang_module.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 237 4 3 expression: "./cases/not_overwriting_erlang_module" 5 4 --- 6 5 //// /out/lib/the_package/_gleam_artefacts/app@code.cache
-13
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_construct.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 249 4 - expression: "./cases/opaque_type_construct" 5 - --- 6 - error: Unknown variable 7 - ┌─ src/two.gleam:7:3 8 - 9 - 7 │ User(name: "Alim", score: 10) 10 - │ ^ Did you mean `Error`? 11 - 12 - The name `User` is not in scope here. 13 -
-1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__overwriting_erlang_module.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 273 4 3 expression: "./cases/overwriting_erlang_module" 5 4 --- 6 5 error: Erlang module name collision
-1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__variable_or_module.snap
··· 1 1 --- 2 2 source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 316 4 3 expression: "./cases/variable_or_module" 5 4 --- 6 5 //// /out/lib/the_package/_gleam_artefacts/main.cache
-53
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__alias_unqualified_import.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 8 4 - expression: "./cases/alias_unqualified_import" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/one.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 10 - <77 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/one.erl 13 - -module(one). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export([id/1]). 17 - -export_type([empty/0]). 18 - 19 - -type empty() :: empty. 20 - 21 - -file("src/one.gleam", 2). 22 - -spec id(I) -> I. 23 - id(X) -> 24 - X. 25 - 26 - 27 - //// /out/lib/the_package/_gleam_artefacts/two.cache 28 - <.cache binary> 29 - 30 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 31 - <88 byte binary> 32 - 33 - //// /out/lib/the_package/_gleam_artefacts/two.erl 34 - -module(two). 35 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 36 - 37 - -export([make/0]). 38 - 39 - -file("src/two.gleam", 4). 40 - -spec make() -> one:empty(). 41 - make() -> 42 - one:id(empty). 43 - 44 - 45 - //// /out/lib/the_package/ebin/importy.app 46 - {application, importy, [ 47 - {vsn, "0.1.0"}, 48 - {applications, []}, 49 - {description, ""}, 50 - {modules, [one, 51 - two]}, 52 - {registered, []} 53 - ]}.
-12
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__duplicate_module.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 21 4 - expression: "./cases/duplicate_module" 5 - --- 6 - error: Duplicate module 7 - 8 - The module `main` is defined multiple times. 9 - 10 - First: src/main.gleam 11 - Second: test/main.gleam 12 -
-28
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/erlang_app_generation" 4 - --- 5 - //// /out/lib/the_package/_gleam_artefacts/main.cache 6 - <.cache binary> 7 - 8 - //// /out/lib/the_package/_gleam_artefacts/main.cache_meta 9 - <49 byte binary> 10 - 11 - //// /out/lib/the_package/_gleam_artefacts/main.erl 12 - -module(main). 13 - 14 - 15 - //// /out/lib/the_package/ebin/my_erlang_application.app 16 - {application, my_erlang_application, [ 17 - {mod, {'my_erlang_application_sup', []}}, 18 - {vsn, "0.1.0"}, 19 - {applications, [gleam_otp, 20 - gleam_stdlib, 21 - inets, 22 - midas, 23 - simple_json, 24 - ssl]}, 25 - {description, "It's very cool"}, 26 - {modules, [main]}, 27 - {registered, []} 28 - ]}.
-51
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_bug_752.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/erlang_bug_752" 4 - --- 5 - //// /out/lib/the_package/_gleam_artefacts/one.cache 6 - <.cache binary> 7 - 8 - //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 9 - <57 byte binary> 10 - 11 - //// /out/lib/the_package/_gleam_artefacts/one.erl 12 - -module(one). 13 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 14 - 15 - -export_type([one/1]). 16 - 17 - -type one(I) :: {one, I}. 18 - 19 - 20 - 21 - 22 - //// /out/lib/the_package/_gleam_artefacts/two.cache 23 - <.cache binary> 24 - 25 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 26 - <84 byte binary> 27 - 28 - //// /out/lib/the_package/_gleam_artefacts/two.erl 29 - -module(two). 30 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 31 - 32 - -export_type([two/1]). 33 - 34 - -type two(K) :: {two, one:one(integer())} | {gleam_phantom, K}. 35 - 36 - 37 - 38 - 39 - //// /out/lib/the_package/ebin/importy.app 40 - {application, importy, [ 41 - {vsn, "0.1.0"}, 42 - {applications, []}, 43 - {description, ""}, 44 - {modules, [one, 45 - two]}, 46 - {registered, []} 47 - ]}. 48 - 49 - 50 - //// /out/lib/the_package/include/two_Two.hrl 51 - -record(two, {thing :: one:one(integer())}).
-22
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_empty.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/erlang_empty" 4 - --- 5 - //// /out/lib/the_package/_gleam_artefacts/empty.cache 6 - <.cache binary> 7 - 8 - //// /out/lib/the_package/_gleam_artefacts/empty.cache_meta 9 - <49 byte binary> 10 - 11 - //// /out/lib/the_package/_gleam_artefacts/empty.erl 12 - -module(empty). 13 - 14 - 15 - //// /out/lib/the_package/ebin/hello_joe.app 16 - {application, hello_joe, [ 17 - {vsn, "0.1.0"}, 18 - {applications, []}, 19 - {description, ""}, 20 - {modules, [empty]}, 21 - {registered, []} 22 - ]}.
-65
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_escape_names.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 63 4 - expression: "./cases/erlang_escape_names" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/one.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 10 - <61 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/one.erl 13 - -module(one). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export(['receive'/1]). 17 - 18 - -file("src/one.gleam", 2). 19 - -spec 'receive'(I) -> I. 20 - 'receive'(X) -> 21 - X. 22 - 23 - 24 - //// /out/lib/the_package/_gleam_artefacts/two.cache 25 - <.cache binary> 26 - 27 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 28 - <136 byte binary> 29 - 30 - //// /out/lib/the_package/_gleam_artefacts/two.erl 31 - -module(two). 32 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 33 - 34 - -export([qualified_call/0, qualified_value/0, unqualified_call/0, unqualified_value/0]). 35 - 36 - -file("src/two.gleam", 4). 37 - -spec qualified_call() -> integer(). 38 - qualified_call() -> 39 - one:'receive'(1). 40 - 41 - -file("src/two.gleam", 8). 42 - -spec qualified_value() -> fun((Q) -> Q). 43 - qualified_value() -> 44 - fun one:'receive'/1. 45 - 46 - -file("src/two.gleam", 12). 47 - -spec unqualified_call() -> integer(). 48 - unqualified_call() -> 49 - one:'receive'(1). 50 - 51 - -file("src/two.gleam", 16). 52 - -spec unqualified_value() -> fun((S) -> S). 53 - unqualified_value() -> 54 - fun one:'receive'/1. 55 - 56 - 57 - //// /out/lib/the_package/ebin/importy.app 58 - {application, importy, [ 59 - {vsn, "0.1.0"}, 60 - {applications, []}, 61 - {description, ""}, 62 - {modules, [one, 63 - two]}, 64 - {registered, []} 65 - ]}.
-50
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 74 4 - expression: "./cases/erlang_import" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/one.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 10 - <88 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/one.erl 13 - -module(one). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export([unbox/1]). 17 - 18 - -file("src/one.gleam", 3). 19 - -spec unbox(two:box()) -> integer(). 20 - unbox(X) -> 21 - {box, I} = X, 22 - I. 23 - 24 - 25 - //// /out/lib/the_package/_gleam_artefacts/two.cache 26 - <.cache binary> 27 - 28 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 29 - <57 byte binary> 30 - 31 - //// /out/lib/the_package/_gleam_artefacts/two.erl 32 - -module(two). 33 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 34 - 35 - -export_type([box/0]). 36 - 37 - -type box() :: {box, integer()}. 38 - 39 - 40 - 41 - 42 - //// /out/lib/the_package/ebin/importy.app 43 - {application, importy, [ 44 - {vsn, "0.1.0"}, 45 - {applications, []}, 46 - {description, ""}, 47 - {modules, [one, 48 - two]}, 49 - {registered, []} 50 - ]}.
-49
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import_shadowing_prelude.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 85 4 - expression: "./cases/erlang_import_shadowing_prelude" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/one.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 10 - <61 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/one.erl 13 - -module(one). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export_type([error/0]). 17 - 18 - -type error() :: error. 19 - 20 - 21 - 22 - 23 - //// /out/lib/the_package/_gleam_artefacts/two.cache 24 - <.cache binary> 25 - 26 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 27 - <88 byte binary> 28 - 29 - //// /out/lib/the_package/_gleam_artefacts/two.erl 30 - -module(two). 31 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 32 - 33 - -export([main/0]). 34 - 35 - -file("src/two.gleam", 4). 36 - -spec main() -> one:error(). 37 - main() -> 38 - error. 39 - 40 - 41 - //// /out/lib/the_package/ebin/importy.app 42 - {application, importy, [ 43 - {vsn, "0.1.0"}, 44 - {applications, []}, 45 - {description, ""}, 46 - {modules, [one, 47 - two]}, 48 - {registered, []} 49 - ]}.
-31
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 96 4 - expression: "./cases/erlang_nested" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/one@two.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta 10 - <57 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/one@two.erl 13 - -module(one@two). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export([main/0]). 17 - 18 - -file("src/one/two.gleam", 1). 19 - -spec main() -> binary(). 20 - main() -> 21 - <<"Hi there"/utf8>>. 22 - 23 - 24 - //// /out/lib/the_package/ebin/importy.app 25 - {application, importy, [ 26 - {vsn, "0.1.0"}, 27 - {applications, []}, 28 - {description, ""}, 29 - {modules, [one@two]}, 30 - {registered, []} 31 - ]}.
-40
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested_qualified_constant.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/erlang_nested_qualified_constant" 4 - --- 5 - //// /out/lib/the_package/_gleam_artefacts/one@two.cache 6 - <.cache binary> 7 - 8 - //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta 9 - <57 byte binary> 10 - 11 - //// /out/lib/the_package/_gleam_artefacts/one@two.erl 12 - -module(one@two). 13 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 14 - 15 - -export_type([a/0]). 16 - 17 - -type a() :: a. 18 - 19 - 20 - 21 - 22 - //// /out/lib/the_package/_gleam_artefacts/two.cache 23 - <.cache binary> 24 - 25 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 26 - <100 byte binary> 27 - 28 - //// /out/lib/the_package/_gleam_artefacts/two.erl 29 - -module(two). 30 - 31 - 32 - //// /out/lib/the_package/ebin/importy.app 33 - {application, importy, [ 34 - {vsn, "0.1.0"}, 35 - {applications, []}, 36 - {description, ""}, 37 - {modules, [one@two, 38 - two]}, 39 - {registered, []} 40 - ]}.
-31
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__hello_joe.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 118 4 - expression: "./cases/hello_joe" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/hello_joe.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/hello_joe.cache_meta 10 - <57 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/hello_joe.erl 13 - -module(hello_joe). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export([main/0]). 17 - 18 - -file("src/hello_joe.gleam", 1). 19 - -spec main() -> binary(). 20 - main() -> 21 - <<"Hello, Joe!"/utf8>>. 22 - 23 - 24 - //// /out/lib/the_package/ebin/hello_joe.app 25 - {application, hello_joe, [ 26 - {vsn, "0.1.0"}, 27 - {applications, []}, 28 - {description, ""}, 29 - {modules, [hello_joe]}, 30 - {registered, []} 31 - ]}.
-17
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/import_cycle" 4 - --- 5 - error: Import cycle 6 - ┌─ src/one.gleam:1:1 7 - 8 - 1 │ import one 9 - │ ^ Imported here 10 - 11 - The import statements for these modules form a cycle: 12 - 13 - ┌─────┐ 14 - │ one 15 - └─────┘ 16 - Gleam doesn't support dependency cycles like these, please break the 17 - cycle to continue.
-31
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle_multi.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/import_cycle_multi" 4 - --- 5 - error: Import cycle 6 - ┌─ src/three.gleam:1:1 7 - 8 - 1 │ import one 9 - │ ^ Imported here 10 - 11 - ┌─ src/two.gleam:1:1 12 - 13 - 1 │ import three 14 - │ ^ Imported here 15 - 16 - ┌─ src/one.gleam:1:1 17 - 18 - 1 │ import two 19 - │ ^ Imported here 20 - 21 - The import statements for these modules form a cycle: 22 - 23 - ┌─────┐ 24 - │ three 25 - │ ↓ 26 - │ two 27 - │ ↓ 28 - │ one 29 - └─────┘ 30 - Gleam doesn't support dependency cycles like these, please break the 31 - cycle to continue.
-73
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__import_shadowed_name_warning.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 151 4 - expression: "./cases/import_shadowed_name_warning" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/one.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 10 - <57 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/one.erl 13 - -module(one). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export_type([port_/0]). 17 - 18 - -type port_() :: any(). 19 - 20 - 21 - 22 - 23 - //// /out/lib/the_package/_gleam_artefacts/two.cache 24 - <.cache binary> 25 - 26 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 27 - <120 byte binary> 28 - 29 - //// /out/lib/the_package/_gleam_artefacts/two.erl 30 - -module(two). 31 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 32 - 33 - -export([use_type/1]). 34 - -export_type([shadowing/0]). 35 - 36 - -type shadowing() :: port. 37 - 38 - -file("src/two.gleam", 14). 39 - -spec use_type(one:port_()) -> nil. 40 - use_type(Port) -> 41 - wibble:wobble(Port). 42 - 43 - 44 - //// /out/lib/the_package/ebin/importy.app 45 - {application, importy, [ 46 - {vsn, "0.1.0"}, 47 - {applications, []}, 48 - {description, ""}, 49 - {modules, [one, 50 - two]}, 51 - {registered, []} 52 - ]}. 53 - 54 - 55 - //// Warning 56 - warning: Unused private constructor 57 - ┌─ src/two.gleam:9:3 58 - 59 - 9 │ Port 60 - │ ^ This private constructor is never used 61 - 62 - Hint: You can safely remove it. 63 - 64 - 65 - 66 - //// Warning 67 - warning: Unused private type 68 - ┌─ src/two.gleam:7:1 69 - 70 - 7 │ type Shadowing { 71 - │ ^ This private type is never used 72 - 73 - Hint: You can safely remove it.
-107
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__imported_constants.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 162 4 - expression: "./cases/imported_constants" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/one.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 10 - <89 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/one.erl 13 - -module(one). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export_type([a/0, b/0, user/0]). 17 - 18 - -type a() :: a. 19 - 20 - -type b() :: {b, a(), a()}. 21 - 22 - -type user() :: {user, binary(), integer()}. 23 - 24 - 25 - 26 - 27 - //// /out/lib/the_package/_gleam_artefacts/two.cache 28 - <.cache binary> 29 - 30 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 31 - <324 byte binary> 32 - 33 - //// /out/lib/the_package/_gleam_artefacts/two.erl 34 - -module(two). 35 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 36 - 37 - -export([accessors/1, destructure_qualified/1, destructure_unqualified/1, destructure_aliased/1, qualified_fn_a/0, qualified_fn_b/0, unqualified_fn_a/0, unqualified_fn_b/0, aliased_fn_a/0, aliased_fn_b/0]). 38 - 39 - -file("src/two.gleam", 45). 40 - -spec accessors(one:user()) -> {binary(), integer()}. 41 - accessors(User) -> 42 - Name = erlang:element(2, User), 43 - Score = erlang:element(3, User), 44 - {Name, Score}. 45 - 46 - -file("src/two.gleam", 52). 47 - -spec destructure_qualified(one:user()) -> {binary(), integer()}. 48 - destructure_qualified(User) -> 49 - {user, Name, Score} = User, 50 - {Name, Score}. 51 - 52 - -file("src/two.gleam", 57). 53 - -spec destructure_unqualified(one:user()) -> {binary(), integer()}. 54 - destructure_unqualified(User) -> 55 - {user, Name, Score} = User, 56 - {Name, Score}. 57 - 58 - -file("src/two.gleam", 62). 59 - -spec destructure_aliased(one:user()) -> {binary(), integer()}. 60 - destructure_aliased(User) -> 61 - {user, Name, Score} = User, 62 - {Name, Score}. 63 - 64 - -file("src/two.gleam", 6). 65 - -spec qualified_fn_a() -> one:a(). 66 - qualified_fn_a() -> 67 - a. 68 - 69 - -file("src/two.gleam", 12). 70 - -spec qualified_fn_b() -> one:b(). 71 - qualified_fn_b() -> 72 - {b, a, a}. 73 - 74 - -file("src/two.gleam", 19). 75 - -spec unqualified_fn_a() -> one:a(). 76 - unqualified_fn_a() -> 77 - a. 78 - 79 - -file("src/two.gleam", 25). 80 - -spec unqualified_fn_b() -> one:b(). 81 - unqualified_fn_b() -> 82 - {b, a, a}. 83 - 84 - -file("src/two.gleam", 33). 85 - -spec aliased_fn_a() -> one:a(). 86 - aliased_fn_a() -> 87 - a. 88 - 89 - -file("src/two.gleam", 39). 90 - -spec aliased_fn_b() -> one:b(). 91 - aliased_fn_b() -> 92 - {b, a, a}. 93 - 94 - 95 - //// /out/lib/the_package/ebin/importy.app 96 - {application, importy, [ 97 - {vsn, "0.1.0"}, 98 - {applications, []}, 99 - {description, ""}, 100 - {modules, [one, 101 - two]}, 102 - {registered, []} 103 - ]}. 104 - 105 - 106 - //// /out/lib/the_package/include/one_User.hrl 107 - -record(user, {name :: binary(), score :: integer()}).
-97
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__imported_external_fns.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 173 4 - expression: "./cases/imported_external_fns" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/one.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 10 - <53 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/one.erl 13 - -module(one). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export([thing/0]). 17 - 18 - -file("src/one.gleam", 2). 19 - -spec thing() -> nil. 20 - thing() -> 21 - thing:new(). 22 - 23 - 24 - //// /out/lib/the_package/_gleam_artefacts/two.cache 25 - <.cache binary> 26 - 27 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 28 - <319 byte binary> 29 - 30 - //// /out/lib/the_package/_gleam_artefacts/two.erl 31 - -module(two). 32 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 33 - 34 - -export([fn_reference_qualified/0, fn_reference_qualified_aliased/0, fn_reference_unqualified/0, fn_reference_unqualified_aliased/0, fn_call_qualified/0, fn_call_qualified_aliased/0, fn_call_unqualified/0, fn_call_unqualified_aliased/0, the_consts/0]). 35 - 36 - -file("src/two.gleam", 27). 37 - -spec fn_reference_qualified() -> fun(() -> nil). 38 - fn_reference_qualified() -> 39 - fun thing:new/0. 40 - 41 - -file("src/two.gleam", 31). 42 - -spec fn_reference_qualified_aliased() -> fun(() -> nil). 43 - fn_reference_qualified_aliased() -> 44 - fun thing:new/0. 45 - 46 - -file("src/two.gleam", 35). 47 - -spec fn_reference_unqualified() -> fun(() -> nil). 48 - fn_reference_unqualified() -> 49 - fun thing:new/0. 50 - 51 - -file("src/two.gleam", 39). 52 - -spec fn_reference_unqualified_aliased() -> fun(() -> nil). 53 - fn_reference_unqualified_aliased() -> 54 - fun thing:new/0. 55 - 56 - -file("src/two.gleam", 45). 57 - -spec fn_call_qualified() -> nil. 58 - fn_call_qualified() -> 59 - thing:new(). 60 - 61 - -file("src/two.gleam", 49). 62 - -spec fn_call_qualified_aliased() -> nil. 63 - fn_call_qualified_aliased() -> 64 - thing:new(). 65 - 66 - -file("src/two.gleam", 53). 67 - -spec fn_call_unqualified() -> nil. 68 - fn_call_unqualified() -> 69 - thing:new(). 70 - 71 - -file("src/two.gleam", 57). 72 - -spec fn_call_unqualified_aliased() -> nil. 73 - fn_call_unqualified_aliased() -> 74 - thing:new(). 75 - 76 - -file("src/two.gleam", 14). 77 - -spec the_consts() -> nil. 78 - the_consts() -> 79 - _ = fun thing:new/0, 80 - _ = fun thing:new/0, 81 - _ = fun thing:new/0, 82 - _ = fun thing:new/0, 83 - thing:new(), 84 - thing:new(), 85 - thing:new(), 86 - thing:new(). 87 - 88 - 89 - //// /out/lib/the_package/ebin/importy.app 90 - {application, importy, [ 91 - {vsn, "0.1.0"}, 92 - {applications, []}, 93 - {description, ""}, 94 - {modules, [one, 95 - two]}, 96 - {registered, []} 97 - ]}.
-143
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__imported_record_constructors.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 184 4 - expression: "./cases/imported_record_constructors" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/one@one.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/one@one.cache_meta 10 - <89 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/one@one.erl 13 - -module(one@one). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export_type([a/0, b/0, user/0]). 17 - 18 - -type a() :: a. 19 - 20 - -type b() :: {b, a(), a()}. 21 - 22 - -type user() :: {user, binary(), integer()}. 23 - 24 - 25 - 26 - 27 - //// /out/lib/the_package/_gleam_artefacts/two.cache 28 - <.cache binary> 29 - 30 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 31 - <491 byte binary> 32 - 33 - //// /out/lib/the_package/_gleam_artefacts/two.erl 34 - -module(two). 35 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 36 - 37 - -export([accessors/1, destructure_qualified/1, destructure_qualified_aliased/1, destructure_unqualified/1, destructure_aliased/1, update_qualified/1, update_qualified_aliased/1, update_unqualified/1, update_aliased/1, qualified_fn_a/0, qualified_fn_b/0, qualified_aliased_fn_a/0, qualified_aliased_fn_b/0, unqualified_fn_a/0, unqualified_fn_b/0, aliased_fn_a/0, aliased_fn_b/0]). 38 - 39 - -file("src/two.gleam", 58). 40 - -spec accessors(one@one:user()) -> {binary(), integer()}. 41 - accessors(User) -> 42 - Name = erlang:element(2, User), 43 - Score = erlang:element(3, User), 44 - {Name, Score}. 45 - 46 - -file("src/two.gleam", 65). 47 - -spec destructure_qualified(one@one:user()) -> {binary(), integer()}. 48 - destructure_qualified(User) -> 49 - {user, Name, Score} = User, 50 - {Name, Score}. 51 - 52 - -file("src/two.gleam", 70). 53 - -spec destructure_qualified_aliased(one@one:user()) -> {binary(), integer()}. 54 - destructure_qualified_aliased(User) -> 55 - {user, Name, Score} = User, 56 - {Name, Score}. 57 - 58 - -file("src/two.gleam", 75). 59 - -spec destructure_unqualified(one@one:user()) -> {binary(), integer()}. 60 - destructure_unqualified(User) -> 61 - {user, Name, Score} = User, 62 - {Name, Score}. 63 - 64 - -file("src/two.gleam", 80). 65 - -spec destructure_aliased(one@one:user()) -> {binary(), integer()}. 66 - destructure_aliased(User) -> 67 - {user, Name, Score} = User, 68 - {Name, Score}. 69 - 70 - -file("src/two.gleam", 86). 71 - -spec update_qualified(one@one:user()) -> one@one:user(). 72 - update_qualified(User) -> 73 - erlang:setelement(2, User, <<"wibble"/utf8>>). 74 - 75 - -file("src/two.gleam", 90). 76 - -spec update_qualified_aliased(one@one:user()) -> one@one:user(). 77 - update_qualified_aliased(User) -> 78 - erlang:setelement(2, User, <<"wibble"/utf8>>). 79 - 80 - -file("src/two.gleam", 94). 81 - -spec update_unqualified(one@one:user()) -> one@one:user(). 82 - update_unqualified(User) -> 83 - erlang:setelement(2, User, <<"wibble"/utf8>>). 84 - 85 - -file("src/two.gleam", 98). 86 - -spec update_aliased(one@one:user()) -> one@one:user(). 87 - update_aliased(User) -> 88 - erlang:setelement(2, User, <<"wibble"/utf8>>). 89 - 90 - -file("src/two.gleam", 7). 91 - -spec qualified_fn_a() -> one@one:a(). 92 - qualified_fn_a() -> 93 - a. 94 - 95 - -file("src/two.gleam", 13). 96 - -spec qualified_fn_b() -> one@one:b(). 97 - qualified_fn_b() -> 98 - {b, a, a}. 99 - 100 - -file("src/two.gleam", 19). 101 - -spec qualified_aliased_fn_a() -> one@one:a(). 102 - qualified_aliased_fn_a() -> 103 - a. 104 - 105 - -file("src/two.gleam", 25). 106 - -spec qualified_aliased_fn_b() -> one@one:b(). 107 - qualified_aliased_fn_b() -> 108 - {b, a, a}. 109 - 110 - -file("src/two.gleam", 32). 111 - -spec unqualified_fn_a() -> one@one:a(). 112 - unqualified_fn_a() -> 113 - a. 114 - 115 - -file("src/two.gleam", 38). 116 - -spec unqualified_fn_b() -> one@one:b(). 117 - unqualified_fn_b() -> 118 - {b, a, a}. 119 - 120 - -file("src/two.gleam", 46). 121 - -spec aliased_fn_a() -> one@one:a(). 122 - aliased_fn_a() -> 123 - a. 124 - 125 - -file("src/two.gleam", 52). 126 - -spec aliased_fn_b() -> one@one:b(). 127 - aliased_fn_b() -> 128 - {b, a, a}. 129 - 130 - 131 - //// /out/lib/the_package/ebin/importy.app 132 - {application, importy, [ 133 - {vsn, "0.1.0"}, 134 - {applications, []}, 135 - {description, ""}, 136 - {modules, [one@one, 137 - two]}, 138 - {registered, []} 139 - ]}. 140 - 141 - 142 - //// /out/lib/the_package/include/one@one_User.hrl 143 - -record(user, {name :: binary(), score :: integer()}).
-38
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_d_ts.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/javascript_d_ts" 4 - --- 5 - //// /out/lib/the_package/_gleam_artefacts/hello.cache 6 - <.cache binary> 7 - 8 - //// /out/lib/the_package/_gleam_artefacts/hello.cache_meta 9 - <73 byte binary> 10 - 11 - //// /out/lib/the_package/gleam.d.mts 12 - export * from "../prelude.mjs"; 13 - export type * from "../prelude.d.mts"; 14 - 15 - 16 - //// /out/lib/the_package/gleam.mjs 17 - export * from "../prelude.mjs"; 18 - 19 - 20 - //// /out/lib/the_package/hello.d.mts 21 - import type * as _ from "./gleam.d.mts"; 22 - 23 - export class Woo extends _.CustomType {} 24 - 25 - export type Wibble$ = Woo; 26 - 27 - export function wobble(): Wibble$; 28 - 29 - 30 - //// /out/lib/the_package/hello.mjs 31 - /// <reference types="./hello.d.mts" /> 32 - import { CustomType as $CustomType } from "./gleam.mjs"; 33 - 34 - export class Woo extends $CustomType {} 35 - 36 - export function wobble() { 37 - return new Woo(); 38 - }
-16
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_empty.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/javascript_empty" 4 - --- 5 - //// /out/lib/the_package/_gleam_artefacts/empty.cache 6 - <.cache binary> 7 - 8 - //// /out/lib/the_package/_gleam_artefacts/empty.cache_meta 9 - <49 byte binary> 10 - 11 - //// /out/lib/the_package/empty.mjs 12 - export {} 13 - 14 - 15 - //// /out/lib/the_package/gleam.mjs 16 - export * from "../prelude.mjs";
-51
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_import.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/javascript_import" 4 - --- 5 - //// /out/lib/the_package/_gleam_artefacts/one@two.cache 6 - <.cache binary> 7 - 8 - //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta 9 - <57 byte binary> 10 - 11 - //// /out/lib/the_package/_gleam_artefacts/two.cache 12 - <.cache binary> 13 - 14 - //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 15 - <80 byte binary> 16 - 17 - //// /out/lib/the_package/gleam.d.mts 18 - export * from "../prelude.mjs"; 19 - export type * from "../prelude.d.mts"; 20 - 21 - 22 - //// /out/lib/the_package/gleam.mjs 23 - export * from "../prelude.mjs"; 24 - 25 - 26 - //// /out/lib/the_package/one/two.d.mts 27 - import type * as _ from "../gleam.d.mts"; 28 - 29 - export class A extends _.CustomType {} 30 - 31 - export type A$ = A; 32 - 33 - 34 - //// /out/lib/the_package/one/two.mjs 35 - /// <reference types="./two.d.mts" /> 36 - import { CustomType as $CustomType } from "../gleam.mjs"; 37 - 38 - export class A extends $CustomType {} 39 - 40 - 41 - //// /out/lib/the_package/two.d.mts 42 - import type * as $two from "./one/two.d.mts"; 43 - 44 - export const x: $two.A$; 45 - 46 - 47 - //// /out/lib/the_package/two.mjs 48 - /// <reference types="./two.d.mts" /> 49 - import * as $two from "./one/two.mjs"; 50 - 51 - export const x = /* @__PURE__ */ new $two.A();
-23
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__not_overwriting_erlang_module.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 237 4 - expression: "./cases/not_overwriting_erlang_module" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/app@code.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/app@code.cache_meta 10 - <65 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/app@code.erl 13 - -module(app@code). 14 - 15 - 16 - //// /out/lib/the_package/ebin/importy.app 17 - {application, importy, [ 18 - {vsn, "0.1.0"}, 19 - {applications, []}, 20 - {description, ""}, 21 - {modules, [app@code]}, 22 - {registered, []} 23 - ]}.
-27
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_accessor.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/opaque_type_accessor" 4 - --- 5 - error: Unknown record field 6 - ┌─ src/two.gleam:7:18 7 - 8 - 7 │ let name = user.name 9 - │ ^ This field does not exist 10 - 11 - The value being accessed has this type: 12 - 13 - User 14 - 15 - It does not have any fields. 16 - 17 - error: Unknown record field 18 - ┌─ src/two.gleam:8:19 19 - 20 - 8 │ let score = user.score 21 - │ ^ This field does not exist 22 - 23 - The value being accessed has this type: 24 - 25 - User 26 - 27 - It does not have any fields.
-13
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_construct.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 249 4 - expression: "./cases/opaque_type_construct" 5 - --- 6 - error: Unknown variable 7 - ┌─ src/two.gleam:7:3 8 - 9 - 7 │ User(name: "Alim", score: 10) 10 - │ ^ Did you mean `Error`? 11 - 12 - The name `User` is not in scope here. 13 -
-19
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_destructure.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/opaque_type_destructure" 4 - --- 5 - error: Unknown module value 6 - ┌─ src/two.gleam:7:7 7 - 8 - 7 │ let one.User(name: name, score: score) = user 9 - │ ^ 10 - 11 - The module `one` does not have a `User` value. 12 - 13 - error: Unknown variable 14 - ┌─ src/two.gleam:8:5 15 - 16 - 8 │ #(name, score) 17 - │ ^ 18 - 19 - The name `name` is not in scope here.
-14
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__overwriting_erlang_module.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 273 4 - expression: "./cases/overwriting_erlang_module" 5 - --- 6 - error: Erlang module name collision 7 - 8 - The module `src/code.gleam` compiles to an Erlang module named `code`. 9 - 10 - By default Erlang includes a module with the same name so if we were to 11 - compile and load your module it would overwrite the Erlang one, potentially 12 - causing confusing errors and crashes. 13 - 14 - Hint: Rename this module and try again.
-16
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_test.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 273 4 - expression: "./cases/src_importing_test" 5 - --- 6 - error: App importing test module 7 - ┌─ src/one.gleam:3:1 8 - 9 - 3 │ import two 10 - │ ^ Imported here 11 - 12 - The application module `one` is importing the test module `two`. 13 - 14 - Test modules are not included in production builds so test modules cannot 15 - import them. Perhaps move the `two` module to the src directory. 16 -
-11
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_constant.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/unknown_module_field_in_constant" 4 - --- 5 - error: Unknown module value 6 - ┌─ src/two.gleam:3:16 7 - 8 - 3 │ pub const it = one.B 9 - │ ^ Did you mean `A`? 10 - 11 - The module `one` does not have a `B` value.
-11
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_expression.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/unknown_module_field_in_expression" 4 - --- 5 - error: Unknown module value 6 - ┌─ src/two.gleam:4:6 7 - 8 - 4 │ one.B 9 - │ ^ Did you mean `A`? 10 - 11 - The module `one` does not have a `B` value.
-11
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_import.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - expression: "./cases/unknown_module_field_in_import" 4 - --- 5 - error: Unknown module value 6 - ┌─ src/two.gleam:1:13 7 - 8 - 1 │ import one.{B} 9 - │ ^ Did you mean `A`? 10 - 11 - The module `one` does not have a `B` value.
-62
test-project-compiler/src/snapshots/test_package_compiler__generated_tests__variable_or_module.snap
··· 1 - --- 2 - source: test-package-compiler/src/generated_tests.rs 3 - assertion_line: 316 4 - expression: "./cases/variable_or_module" 5 - --- 6 - //// /out/lib/the_package/_gleam_artefacts/main.cache 7 - <.cache binary> 8 - 9 - //// /out/lib/the_package/_gleam_artefacts/main.cache_meta 10 - <118 byte binary> 11 - 12 - //// /out/lib/the_package/_gleam_artefacts/main.erl 13 - -module(main). 14 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 15 - 16 - -export([module_function/1, record_field/1]). 17 - 18 - -file("src/main.gleam", 4). 19 - -spec module_function(power:power()) -> integer(). 20 - module_function(Power) -> 21 - power:to_int(Power). 22 - 23 - -file("src/main.gleam", 10). 24 - -spec record_field(power:power()) -> integer(). 25 - record_field(Power) -> 26 - erlang:element(2, Power). 27 - 28 - 29 - //// /out/lib/the_package/_gleam_artefacts/power.cache 30 - <.cache binary> 31 - 32 - //// /out/lib/the_package/_gleam_artefacts/power.cache_meta 33 - <77 byte binary> 34 - 35 - //// /out/lib/the_package/_gleam_artefacts/power.erl 36 - -module(power). 37 - -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 38 - 39 - -export([to_int/1]). 40 - -export_type([power/0]). 41 - 42 - -type power() :: {power, integer()}. 43 - 44 - -file("src/power.gleam", 6). 45 - -spec to_int(power()) -> integer(). 46 - to_int(P) -> 47 - erlang:element(2, P) * 9000. 48 - 49 - 50 - //// /out/lib/the_package/ebin/importy.app 51 - {application, importy, [ 52 - {vsn, "0.1.0"}, 53 - {applications, []}, 54 - {description, ""}, 55 - {modules, [main, 56 - power]}, 57 - {registered, []} 58 - ]}. 59 - 60 - 61 - //// /out/lib/the_package/include/power_Power.hrl 62 - -record(power, {value :: integer()}).
-1
test-project-compiler/src/snapshots/test_project_compiler__generated_tests__with_dep_dev.snap
··· 1 1 --- 2 2 source: test-project-compiler/src/generated_tests.rs 3 - assertion_line: 10 4 3 expression: "./cases/with_dep" 5 4 --- 6 5 //// with_dep/build/dev/erlang/example/_gleam_artefacts/example@@main.erl
-1
test-project-compiler/src/snapshots/test_project_compiler__generated_tests__with_dep_lsp.snap
··· 1 1 --- 2 2 source: test-project-compiler/src/generated_tests.rs 3 - assertion_line: 32 4 3 expression: "./cases/with_dep" 5 4 --- 6 5 //// with_dep/build/lsp/erlang/example/_gleam_artefacts/example@@main.erl
-1
test-project-compiler/src/snapshots/test_project_compiler__generated_tests__with_dep_prod.snap
··· 1 1 --- 2 2 source: test-project-compiler/src/generated_tests.rs 3 - assertion_line: 21 4 3 expression: "./cases/with_dep" 5 4 --- 6 5 //// with_dep/build/prod/erlang/example/_gleam_artefacts/example@@main.erl
-1
test-project-compiler/src/snapshots/test_project_compiler__generated_tests__with_dev_dep_dev.snap
··· 1 1 --- 2 2 source: test-project-compiler/src/generated_tests.rs 3 - assertion_line: 43 4 3 expression: "./cases/with_dev_dep" 5 4 --- 6 5 //// with_dev_dep/build/dev/erlang/example/_gleam_artefacts/example@@main.erl
-1
test-project-compiler/src/snapshots/test_project_compiler__generated_tests__with_dev_dep_lsp.snap
··· 1 1 --- 2 2 source: test-project-compiler/src/generated_tests.rs 3 - assertion_line: 65 4 3 expression: "./cases/with_dev_dep" 5 4 --- 6 5 //// with_dev_dep/build/lsp/erlang/example/_gleam_artefacts/example@@main.erl
-1
test-project-compiler/src/snapshots/test_project_compiler__generated_tests__with_dev_dep_prod.snap
··· 1 1 --- 2 2 source: test-project-compiler/src/generated_tests.rs 3 - assertion_line: 54 4 3 expression: "./cases/with_dev_dep" 5 4 --- 6 5 //// with_dev_dep/build/prod/erlang/example/_gleam_artefacts/example@@main.erl