⭐️ A friendly language for building type-safe, scalable systems!
1

Configure Feed

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

SPDX licence information comments

Louis Pilfold (Jun 12, 2026, 10:30 AM +0100) bc1d344c a5497d4e

+2822 -609
+5
.github/ISSUE_TEMPLATE/bug_report.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2024 The Gleam contributors 4 + --> 5 + 1 6 --- 2 7 name: Bug report 3 8 about: Something isn't working
+5
.github/ISSUE_TEMPLATE/feature_request.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2024 The Gleam contributors 4 + --> 5 + 1 6 --- 2 7 name: Feature request 3 8 about: Suggest an idea for this project
+3
.github/actions/build-container/action.yml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name: "Build Gleam" 2 5 description: "Build Gleam Container" 3 6 inputs:
+3
.github/actions/build-release/action.yml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name: "Build Gleam" 2 5 description: "Build Gleam Release" 3 6 inputs:
+3
.github/dependabot.yml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 version: 2 2 5 updates: 3 6 - package-ecosystem: github-actions
+5
.github/pull_request_template.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2026 The Gleam contributors 4 + --> 5 + 1 6 - [ ] The changes in this PR have been discussed beforehand in an issue 2 7 - [ ] The issue for this PR has been linked 3 8 - [ ] Tests have been added for new behaviour
+3
.github/workflows/codeql.yml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 name: "CodeQL Advanced" 2 5 3 6 on:
+3
.github/zizmor.yml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 rules: 2 5 # dtolnay/rust-toolchain handles component installation, target addition, and 3 6 # override configuration beyond what a bare `rustup` invocation provides.
+5
CHANGELOG.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## Unreleased
+5
CODE_OF_CONDUCT.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2018 The Gleam contributors 4 + --> 5 + 1 6 2 7 # Contributor Covenant Code of Conduct 3 8
+5
CONTRIBUTING.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2024 The Gleam contributors 4 + --> 5 + 1 6 # Contributing to Gleam 2 7 3 8 Thanks for contributing to Gleam!
+1
Cargo.lock
··· 1222 1222 "hexpm", 1223 1223 "http", 1224 1224 "id-arena", 1225 + "ignore", 1225 1226 "im", 1226 1227 "indexmap", 1227 1228 "insta",
+5
Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 [workspace] 2 5 resolver = "2" 3 6 members = [ ··· 72 75 pubgrub = "0.3" 73 76 # Open the user's web browser 74 77 opener = "0" 78 + # Recursively traversing directories 79 + ignore = "0"
+3
Cross.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 [target.x86_64-unknown-linux-musl] 2 5 image = "clux/muslrust:stable"
+5
README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 <p align="center"> 2 7 <img src="images/lucy.png" alt="Lucy, Gleam's mascot"> 3 8 </p>
+5
RELEASE.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Release checklist 2 7 3 8 1. Write release post on website.
+3
benchmark/list/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "list" 2 5 version = "1.0.0" 3 6 description = "Benchmarks for lists"
+3
benchmark/list/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
benchmark/list/src/list.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 Nil 3 6 }
+3
benchmark/list/test/benchmarks.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleamy/bench 2 5 3 6 import gleam/io
+3
benchmark/list/test/list_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import benchmarks.{print_results} 2 5 import gleam/list 3 6 import gleamy/bench
+3
bin/add-nightly-suffix-to-versions.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 #
+5
changelog/v1.1.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.1.0 - 2024-04-16
+5
changelog/v1.10.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.10.0 - 2025-04-14
+5
changelog/v1.11.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.11.0 - 2025-06-02
+5
changelog/v1.12.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.12.0 - 2025-08-05
+5
changelog/v1.13.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.13.0 - 2025-10-19
+5
changelog/v1.14.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.14.0 - 2025-12-25 🎁
+5
changelog/v1.15.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.15.0 - 2026-03-16
+5
changelog/v1.16.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.16.0 - 2026-04-24
+5
changelog/v1.17.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.17.0 - 2026-06-02
+5
changelog/v1.2.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.2.0 - 2024-05-27
+5
changelog/v1.3.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.3.0 - 2024-07-09
+5
changelog/v1.4.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.4.0 - 2024-08-02
+5
changelog/v1.5.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.5.0 - 2024-09-19
+5
changelog/v1.6.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.6.0 - 2024-11-18
+5
changelog/v1.7.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## 1.7.0 - 2025-01-05
+5
changelog/v1.8.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 Dedicated to the memory of Len Pilfold.
+5
changelog/v1.9.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + --> 5 + 1 6 # Changelog 2 7 3 8 ## v1.9.0 - 2025-03-09
+6 -4
compiler-cli/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 [package] 2 5 name = "gleam-cli" 3 6 version = "1.17.0" ··· 12 15 gleam-language-server = { path = "../language-server" } 13 16 # OS SIGINT and SIGTERM signal handling 14 17 ctrlc = { version = "3", features = ["termination"] } 15 - # Recursively traversing directories 16 - ignore = "0" 17 18 # Allow user to type in sensitive information without showing it in the shell 18 19 rpassword = "7" 19 20 # Async runtime ··· 45 46 flate2.workspace = true 46 47 futures.workspace = true 47 48 hexpm = { path = "../hexpm" } 49 + http-serde.workspace = true 48 50 http.workspace = true 49 - http-serde.workspace = true 51 + ignore.workspace = true 50 52 im.workspace = true 51 53 itertools.workspace = true 52 54 lsp-server.workspace = true 53 55 lsp-types.workspace = true 54 56 opener.workspace = true 57 + pubgrub.workspace = true 55 58 regex.workspace = true 56 59 serde.workspace = true 57 60 serde_json.workspace = true ··· 60 63 termcolor.workspace = true 61 64 toml.workspace = true 62 65 tracing.workspace = true 63 - pubgrub.workspace = true 64 66 65 67 [dev-dependencies] 66 68 # Creation of temporary directories
+3
compiler-cli/clippy.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 disallowed-methods = [ 2 5 { path = "std::path::Path::new", reason = "Manually constructed paths should use camino::Utf8Path" }, 3 6 { path = "std::path::PathBuf::new", reason = "Manually constructed pathbufs should use camino::Utf8Path" },
+3
compiler-cli/src/add.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use camino::{Utf8Path, Utf8PathBuf}; 2 5 3 6 use gleam_core::{
+3
compiler-cli/src/beam_compiler.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use gleam_core::{ 2 5 Result, 3 6 error::{Error, ShellCommandFailureReason},
+3
compiler-cli/src/build.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use std::{rc::Rc, time::Instant}; 2 5 3 6 use gleam_core::{
+3
compiler-cli/src/build_lock.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use camino::Utf8PathBuf; 2 5 use gleam_core::{ 3 6 Error, Result,
+3
compiler-cli/src/cli.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 use gleam_core::{ 3 6 build::Telemetry,
+3
compiler-cli/src/compile_package.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use crate::{ 2 5 CompilePackage, config, 3 6 fs::{self, ConsoleWarningEmitter, ProjectIO},
+3
compiler-cli/src/config.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use camino::Utf8PathBuf; 2 5 3 6 use gleam_core::{
+3
compiler-cli/src/dependencies.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 mod dependency_manager; 2 5 3 6 use std::{
+3
compiler-cli/src/dependencies/dependency_manager.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 use futures::future; 3 6 use gleam_core::{
+3
compiler-cli/src/dependencies/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use std::collections::HashMap; 2 5 3 6 use camino::{Utf8Path, Utf8PathBuf};
+3
compiler-cli/src/docs.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use std::{collections::HashMap, time::SystemTime}; 2 5 3 6 use camino::{Utf8Path, Utf8PathBuf};
+3
compiler-cli/src/export.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::fs::{self, ZipArchive}; 2 5 use camino::Utf8PathBuf; 3 6 use gleam_core::{
+3
compiler-cli/src/fix.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use std::rc::Rc; 2 5 3 6 use gleam_core::{
+3
compiler-cli/src/format.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use gleam_core::{ 2 5 error::{Error, FileIoAction, FileKind, Result, StandardIoAction, Unformatted}, 3 6 io::Content,
+3
compiler-cli/src/fs.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use gleam_core::{ 2 5 Result, Warning, 3 6 build::{NullTelemetry, Target},
+3
compiler-cli/src/fs/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use camino::Utf8Path; 2 5 use itertools::Itertools; 3 6
+3
compiler-cli/src/hex.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 mod auth; 2 5 3 6 use crate::{cli, http::HttpClient};
+3
compiler-cli/src/hex/auth.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::{cli, http::HttpClient}; 2 5 use ecow::EcoString; 3 6 use gleam_core::{
+3
compiler-cli/src/http.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use std::convert::TryInto; 2 5 use std::sync::OnceLock; 3 6
+3
compiler-cli/src/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 #![warn( 2 5 clippy::all, 3 6 clippy::dbg_macro,
+3
compiler-cli/src/lsp.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::{ 2 5 build_lock::{BuildLock, Guard}, 3 6 fs::ProjectIO,
+3
compiler-cli/src/new.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 use camino::{Utf8Path, Utf8PathBuf}; 2 5 use clap::ValueEnum; 3 6 use gleam_core::{
+3
compiler-cli/src/new/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use std::path::PathBuf; 2 5 3 6 use camino::{Utf8Path, Utf8PathBuf};
+3
compiler-cli/src/owner.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::{cli, http::HttpClient}; 2 5 use gleam_core::{Result, hex}; 3 6
+3
compiler-cli/src/panic.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 #![allow(clippy::unwrap_used)] 2 5 use std::panic::PanicHookInfo; 3 6
+3
compiler-cli/src/publish.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use camino::{Utf8Path, Utf8PathBuf}; 2 5 use ecow::EcoString; 3 6 use flate2::{Compression, write::GzEncoder};
+3
compiler-cli/src/remove.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use gleam_core::{ 2 5 Error, Result, 3 6 error::{FileIoAction, FileKind},
+3
compiler-cli/src/run.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use std::sync::OnceLock; 2 5 3 6 use camino::Utf8PathBuf;
+3
compiler-cli/src/shell.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use gleam_core::{ 2 5 analyse::TargetSupport, 3 6 build::{Codegen, Compile, Mode, Options, Target},
+3
compiler-cli/src/text_layout.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 3 6 /// Generates a string delimeted table with 2 spaces between each column, columns padded with
+3
compiler-cli/templates/erlang-shipment-entrypoint.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 set -eu 3 6
+3
compiler-cli/templates/gleam@@compile.erl
··· 1 1 #!/usr/bin/env escript 2 + %% SPDX-License-Identifier: Apache-2.0 3 + %% SPDX-FileCopyrightText: 2022 The Gleam contributors 4 + 2 5 -mode(compile). 3 6 4 7 main(_) ->
+3
compiler-cli/test/hello_world/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 name = "hello_world" 2 5 version = "0.1.0" 3 6
+3
compiler-cli/test/hello_world/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+4
compiler-core/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 [package] 2 5 name = "gleam-core" 3 6 version = "1.17.0" ··· 82 85 rand = "0.9" 83 86 # Time types 84 87 time = "0.3" 88 + ignore.workspace = true 85 89 86 90 [build-dependencies] 87 91 # Data (de)serialisation
+3
compiler-core/clippy.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 disallowed-methods = [ 2 5 { path = "std::env::current_dir", reason = "IO is not permitted in core" }, 3 6 { path = "std::path::Path::canonicalize", reason = "IO is not permitted in core" },
+3
compiler-core/src/analyse.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 mod imports; 2 5 pub mod name; 3 6
+3
compiler-core/src/analyse/imports.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 3 6 use crate::{
+3
compiler-core/src/analyse/name.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use std::sync::OnceLock; 2 5 3 6 use ecow::{EcoString, eco_format};
+3
compiler-core/src/analyse/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use super::*; 2 5 3 6 #[test]
+3
compiler-core/src/ast.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 mod constant; 2 5 mod typed; 3 6 mod untyped;
+3
compiler-core/src/ast/constant.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use super::*; 2 5 use crate::analyse::Inferred; 3 6 use crate::type_::{FieldMap, HasType};
+3
compiler-core/src/ast/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use std::sync::Arc; 2 5 3 6 use camino::Utf8PathBuf;
+3
compiler-core/src/ast/typed.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use type_::{FieldMap, TypedCallArg}; 2 5 3 6 use super::*;
+3
compiler-core/src/ast/untyped.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use vec1::Vec1; 2 5 3 6 use crate::parse::LiteralFloatValue;
+3
compiler-core/src/ast/visit.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 //! AST traversal routines, referenced from [`syn::visit`](https://docs.rs/syn/latest/syn/visit/index.html) 2 5 //! 3 6 //! Each method of the [`Visit`] trait can be overridden to customize the
+3
compiler-core/src/ast_folder.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 use itertools::Itertools; 3 6 use num_bigint::BigInt;
+3
compiler-core/src/bit_array.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 use num_bigint::BigInt; 3 6
+3
compiler-core/src/build.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 #![allow(warnings)] 2 5 3 6 mod elixir_libraries;
+3
compiler-core/src/build/elixir_libraries.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{ 2 5 Error, 3 6 error::ShellCommandFailureReason,
+3
compiler-core/src/build/module_loader.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod tests; 3 6
+3
compiler-core/src/build/module_loader/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use super::*; 2 5 use crate::{ 3 6 build::SourceFingerprint,
+3
compiler-core/src/build/native_file_copier.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod tests; 3 6
+3
compiler-core/src/build/native_file_copier/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use super::NativeFileCopier; 2 5 use crate::{ 3 6 build::{native_file_copier::CopiedNativeFiles, package_compiler::CheckModuleConflicts},
+3
compiler-core/src/build/package_compiler.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod tests; 3 6
+3
compiler-core/src/build/package_compiler/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 use std::collections::HashSet; 2 5 3 6 use camino::Utf8Path;
+3
compiler-core/src/build/package_loader.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod tests; 3 6
+3
compiler-core/src/build/package_loader/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use ecow::{EcoString, eco_format}; 2 5 use hexpm::version::Version; 3 6
+3
compiler-core/src/build/project_compiler.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use crate::{ 2 5 Error, Result, Warning, 3 6 analyse::TargetSupport,
+3
compiler-core/src/build/telemetry.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use std::{ 2 5 fmt::Debug, 3 6 time::{Duration, Instant},
+3
compiler-core/src/build/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::{Error, manifest::ManifestPackage}; 2 5 3 6 use super::project_compiler::{BuildTool, usable_build_tools};
+3
compiler-core/src/call_graph.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 //! Graphs that represent the relationships between entities in a Gleam module, 2 5 //! such as module functions or constants. 3 6
+3
compiler-core/src/call_graph/into_dependency_order_tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use super::*; 2 5 use crate::{ 3 6 ast::{Arg, Function, ModuleConstant, Publicity},
+3
compiler-core/src/codegen.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use crate::{ 2 5 Result, 3 6 build::{
+3
compiler-core/src/config.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 mod stale_package_remover; 2 5 use crate::error::{FileIoAction, FileKind}; 3 6 use crate::io::FileSystemReader;
+3
compiler-core/src/config/stale_package_remover.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::manifest::Manifest; 2 5 use crate::requirement::Requirement; 3 6 use ecow::EcoString;
+3
compiler-core/src/dep_tree.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 use petgraph::{Direction, algo::Cycle, graph::NodeIndex}; 3 6 use std::collections::{HashMap, HashSet};
+3
compiler-core/src/dependency.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use std::{cell::RefCell, cmp::Reverse, collections::HashMap, rc::Rc}; 2 5 3 6 use crate::{Error, Result, manifest};
+3
compiler-core/src/derivation_tree.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::error::wrap; 2 5 use ecow::EcoString; 3 6 use hexpm::version::Version;
+3
compiler-core/src/diagnostic.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use std::collections::HashMap; 2 5 3 6 use camino::Utf8PathBuf;
+3
compiler-core/src/docs.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 mod printer; 2 5 mod source_links; 3 6 #[cfg(test)]
+3
compiler-core/src/docs/printer.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use std::{ 2 5 collections::{HashMap, HashSet}, 3 6 ops::Deref,
+3
compiler-core/src/docs/source_links.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use crate::{ 2 5 ast::SrcSpan, 3 6 build,
+3
compiler-core/src/docs/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use std::{ 2 5 collections::{HashMap, HashSet}, 3 6 time::SystemTime,
+3
compiler-core/src/encryption.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use thiserror::Error; 2 5 3 6 pub fn encrypt_with_passphrase(
+3
compiler-core/src/erlang.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 // TODO: Refactor this module to be methods on structs rather than free 2 5 // functions with a load of arguments. See the JavaScript code generator and the 3 6 // formatter for examples.
+3
compiler-core/src/erlang/pattern.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use ecow::eco_format; 2 5 3 6 use crate::analyse::Inferred;
+3
compiler-core/src/erlang/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 use std::time::SystemTime; 2 5 3 6 use camino::Utf8PathBuf;
+3
compiler-core/src/erlang/tests/assert.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/bit_arrays.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/case.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/1675
+3
compiler-core/src/erlang/tests/conditional_compilation.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/consts.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/2163
+3
compiler-core/src/erlang/tests/custom_types.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/documentation.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/echo.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/external_fn.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::{assert_erl, assert_js_module_error, assert_module_error}; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/functions.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/guards.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/inlining.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 const BOOL_MODULE: &str = "
+3
compiler-core/src/erlang/tests/let_assert.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/numbers.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/panic.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/patterns.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/pipes.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/prelude.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/records.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 use crate::erlang::*; 3 6 use crate::type_;
+3
compiler-core/src/erlang/tests/reserved.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/strings.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/todo.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/type_params.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/use_.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/erlang/tests/variables.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_erl; 2 5 3 6 #[test]
+3
compiler-core/src/error.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2019 The Gleam contributors 3 + 1 4 #![allow(clippy::unwrap_used, clippy::expect_used)] 2 5 use crate::ast::{self, SrcSpan}; 3 6 use crate::bit_array::UnsupportedOption;
+3
compiler-core/src/error/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use super::*; 2 5 use insta::assert_debug_snapshot; 3 6 use insta::assert_snapshot;
+3
compiler-core/src/exhaustiveness.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 //! An implementation of the algorithm described in: 2 5 //! 3 6 //! - How to compile pattern matching, Jules Jacobs.
+3
compiler-core/src/exhaustiveness/missing_patterns.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use super::{CompileCaseResult, Decision, FallbackCheck, RuntimeCheck, Variable, printer::Printer}; 2 5 use crate::type_::environment::Environment; 3 6 use ecow::EcoString;
+3
compiler-core/src/exhaustiveness/printer.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use std::collections::HashMap; 2 5 3 6 use ecow::EcoString;
+3
compiler-core/src/fix.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{ 2 5 Error, Result, 3 6 format::{Formatter, Intermediate},
+3
compiler-core/src/format.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod tests; 3 6
+3
compiler-core/src/format/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use itertools::Itertools; 2 5 use pretty_assertions::assert_eq; 3 6
+3
compiler-core/src/format/tests/asignments.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_format; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/2095
+3
compiler-core/src/format/tests/binary_operators.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_format; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/835
+3
compiler-core/src/format/tests/bit_array.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_format, assert_format_rewrite}; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/blocks.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_format; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/2119
+3
compiler-core/src/format/tests/cases.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::{assert_format, assert_format_rewrite}; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/conditional_compilation.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_format, assert_format_rewrite}; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/constant.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::assert_format; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/5143
+3
compiler-core/src/format/tests/custom_type.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::assert_format; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/echo.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::{assert_format, assert_format_rewrite}; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/external_fn.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_format; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/external_types.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_format; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/function.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_format, assert_format_rewrite}; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/guards.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_format; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/imports.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_format, assert_format_rewrite}; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/lists.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::{assert_format, assert_format_rewrite}; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/pipeline.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::{assert_format, assert_format_rewrite}; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/record_update.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::assert_format; 2 5 3 6 #[test]
+3
compiler-core/src/format/tests/tuple.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_format, assert_format_rewrite}; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/2083
+3
compiler-core/src/format/tests/use_.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::{assert_format, assert_format_rewrite}; 2 5 3 6 #[test]
+3
compiler-core/src/hex.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use camino::Utf8Path; 2 5 use clap::ValueEnum; 3 6 use debug_ignore::DebugIgnore;
+3
compiler-core/src/inline.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 //! This module implements the function inlining optimisation. This allows 2 5 //! function calls to be inlined at the callsite, and replaced with the contents 3 6 //! of the function which is being called.
+3
compiler-core/src/io.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 pub mod memory; 2 5 3 6 use crate::error::{Error, FileIoAction, FileKind, Result};
+3
compiler-core/src/io/memory.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use super::*; 2 5 use std::ops::Deref; 3 6 use std::{
+3
compiler-core/src/javascript.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 mod decision; 2 5 mod expression; 3 6 mod import;
+3
compiler-core/src/javascript/decision.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use super::{ 2 5 INDENT, bit_array_segment_int_value_to_bytes, 3 6 expression::{self, Generator, Ordering, Scope, float, float_from_value},
+3
compiler-core/src/javascript/expression.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use num_bigint::BigInt; 2 5 use vec1::Vec1; 3 6
+3
compiler-core/src/javascript/import.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use std::collections::{HashMap, HashSet}; 2 5 3 6 use ecow::EcoString;
+3
compiler-core/src/javascript/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{ 2 5 analyse::TargetSupport, 3 6 build::{Origin, Target},
+3
compiler-core/src/javascript/tests/assert.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/assignments.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{assert_js, assert_ts_def}; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/bit_arrays.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use hexpm::version::Version; 2 5 use pubgrub::Range; 3 6
+3
compiler-core/src/javascript/tests/blocks.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/bools.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{assert_js, assert_ts_def}; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/case.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/case_clause_guards.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/consts.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/custom_types.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::javascript::tests::CURRENT_PACKAGE; 2 5 use crate::{assert_js, assert_ts_def}; 3 6
+3
compiler-core/src/javascript/tests/echo.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/externals.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{assert_js, assert_module_error, assert_ts_def}; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/functions.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{assert_js, assert_ts_def}; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/generics.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::assert_ts_def; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/inlining.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 const BOOL_MODULE: &str = "
+3
compiler-core/src/javascript/tests/lists.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{assert_js, assert_ts_def}; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/modules.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 use crate::javascript::tests::CURRENT_PACKAGE; 3 6
+3
compiler-core/src/javascript/tests/numbers.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{assert_js, assert_js_module_error}; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/panic.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{assert_js, assert_ts_def}; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/prelude.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{assert_js, assert_ts_def}; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/records.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/recursion.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/results.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/sourcemaps.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::assert_source_map; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/strings.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/todo.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{assert_js, assert_ts_def}; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/tuples.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{assert_js, assert_ts_def}; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/type_alias.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::assert_ts_def; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/tests/use_.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::assert_js; 2 5 3 6 #[test]
+3
compiler-core/src/javascript/typescript.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 //! This module is responsible for generating TypeScript type declaration files. 2 5 //! This code is run during the code generation phase along side the normal 3 6 //! Javascript code emission. Here we walk through the typed AST and translate
+3
compiler-core/src/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 #![warn( 2 5 clippy::all, 3 6 clippy::dbg_macro,
+3
compiler-core/src/line_numbers.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::ast::SrcSpan; 2 5 use lsp_types::Position; 3 6 use std::collections::HashMap;
+3
compiler-core/src/manifest.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use std::collections::HashMap; 2 5 use std::fmt; 3 6
+3
compiler-core/src/metadata.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 //! Seriaisation and deserialisation of Gleam compiler metadata into binary files 2 5 //! using serde. 3 6
+3
compiler-core/src/metadata/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use hexpm::version::Version; 2 5 use rand::Rng; 3 6 use type_::{AccessorsMap, FieldMap, RecordAccessor};
+3
compiler-core/src/package_interface.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use std::{collections::HashMap, ops::Deref}; 2 5 3 6 use ecow::EcoString;
+3
compiler-core/src/package_interface/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use std::time::SystemTime; 2 5 3 6 use camino::Utf8PathBuf;
+3
compiler-core/src/parse.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 // Gleam Parser 2 5 // 3 6 // Terminology:
+3
compiler-core/src/parse/error.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use crate::ast::{SrcSpan, TypeAst}; 2 5 use crate::diagnostic::{ExtraLabel, Label}; 3 6 use crate::error::{wrap, wrap_format};
+3
compiler-core/src/parse/extra.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use std::cmp::Ordering; 2 5 3 6 use ecow::EcoString;
+3
compiler-core/src/parse/lexer.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 3 6 use crate::ast::SrcSpan;
+3
compiler-core/src/parse/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::ast::SrcSpan; 2 5 use crate::parse::error::{ 3 6 InvalidUnicodeEscapeError, LexicalError, LexicalErrorType, ParseError, ParseErrorType,
+3
compiler-core/src/parse/token.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use num_bigint::BigInt; 2 5 use std::fmt; 3 6
+3
compiler-core/src/paths.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::{ 2 5 build::{Mode, Target}, 3 6 manifest::Base16Checksum,
+3
compiler-core/src/pretty.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 //! This module implements the functionality described in 2 5 //! ["Strictly Pretty" (2000) by Christian Lindig][0], with a few 3 6 //! extensions.
+3
compiler-core/src/pretty/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use super::Document::*; 2 5 use super::Mode::*; 3 6 use super::*;
+3
compiler-core/src/reference.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use std::collections::{HashMap, HashSet}; 2 5 3 6 use crate::ast::{Publicity, SrcSpan};
+3
compiler-core/src/requirement.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use std::fmt; 2 5 use std::str::FromStr; 3 6
+3
compiler-core/src/strings.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 use itertools::Itertools; 3 6
+100 -1
compiler-core/src/tests.rs
··· 46 46 All dependency licences must exist in the licences directory. 47 47 These licences are missing their file: 48 48 49 - {licences_missing_licence_file:?}" 49 + - {licences_missing_licence_file:?}" 50 50 ); 51 51 } 52 52 ··· 92 92 ) 93 93 } 94 94 } 95 + 96 + #[test] 97 + fn all_files_have_copyright_notice() { 98 + let paths = ignore::WalkBuilder::new("..") 99 + .follow_links(false) 100 + .git_global(true) 101 + .git_ignore(true) 102 + .hidden(true) 103 + .parents(true) 104 + .build() 105 + .map(|entry| entry.expect("directory traversal succeeds")) 106 + .filter(|entry| { 107 + entry 108 + .file_type() 109 + .map(|type_| type_.is_file()) 110 + .unwrap_or(false) 111 + }) 112 + .map(ignore::DirEntry::into_path) 113 + .filter_map(|path| { 114 + let file_name = path.file_name().and_then(|s| s.to_str())?; 115 + let extension = path.extension()?; 116 + 117 + match extension.to_str().expect("file extension") { 118 + // Test files. 119 + "new" => return None, 120 + "snap" => return None, 121 + "txt" if path.starts_with("../test/") || path.starts_with("../licences/") => { 122 + return None; 123 + } 124 + 125 + // Static assets 126 + "gz" => return None, 127 + "tar" => return None, 128 + "exs" => return None, 129 + "dockerfile" => return None, 130 + "woff2" => return None, 131 + "png" => return None, 132 + "css" if file_name.ends_with(".min.css") => return None, 133 + "js" if file_name.ends_with(".min.js") => return None, 134 + 135 + // Template files to be added to user projects 136 + "ps1" if file_name == "erlang-shipment-entrypoint.ps1" => return None, 137 + "sh" if file_name == "erlang-shipment-entrypoint.sh" => return None, 138 + 139 + // Generated files 140 + "toml" if file_name == "manifest.toml" => return None, 141 + 142 + // Source files 143 + "config" if file_name == "rebar.config" => (), 144 + "css" => (), 145 + "proto" => (), 146 + "ts" => (), 147 + "erl" => (), 148 + "ex" => (), 149 + "gleam" => (), 150 + "hrl" => (), 151 + "js" => (), 152 + "md" => (), 153 + "mjs" => (), 154 + "mts" => (), 155 + "ps1" => (), 156 + "rs" => (), 157 + "sh" => (), 158 + "toml" => (), 159 + 160 + // HTML templates 161 + "html" if path.starts_with("../compiler-core/templates/") => (), 162 + 163 + _ => panic!("Unexpected file extension for {path:?}"), 164 + }; 165 + 166 + let text = std::fs::read_to_string(&path).expect("read file"); 167 + if text.contains("SPDX-License-Identifier: Apache-2.0") 168 + && text.contains("SPDX-FileCopyrightText: 20") 169 + { 170 + // Licence information is present 171 + return None; 172 + } 173 + 174 + Some(path.to_str().unwrap().to_string()) 175 + }) 176 + .join("\n - "); 177 + 178 + if !paths.is_empty() { 179 + panic!( 180 + "Source files missing SPDX licence information! 181 + 182 + Add a comment like this: 183 + 184 + // SPDX-License-Identifier: Apache-2.0 185 + // SPDX-FileCopyrightText: 2016 The Gleam contributors 186 + 187 + To these files: 188 + 189 + {paths} 190 + " 191 + ) 192 + } 193 + }
+3
compiler-core/src/type_.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 pub(crate) mod environment; 2 5 pub mod error; 3 6 pub(crate) mod expression;
+3
compiler-core/src/type_/environment.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use pubgrub::Range; 2 5 3 6 use crate::{
+3
compiler-core/src/type_/error.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use super::{ 2 5 FieldAccessUsage, 3 6 expression::{ArgumentKind, CallKind},
+3
compiler-core/src/type_/expression.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use super::{pipe::PipeTyper, *}; 2 5 use crate::{ 3 6 STDLIB_PACKAGE_NAME,
+3
compiler-core/src/type_/fields.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use super::Error; 2 5 use crate::{ 3 6 ast::{CallArg, SrcSpan},
+3
compiler-core/src/type_/hydrator.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use super::*; 2 5 use crate::{ 3 6 analyse::name::check_name_case,
+3
compiler-core/src/type_/pattern.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use ecow::eco_format; 2 5 use hexpm::version::{LowestVersion, Version}; 3 6 use im::hashmap;
+3
compiler-core/src/type_/pipe.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use self::expression::CallKind; 2 5 3 6 use super::*;
+3
compiler-core/src/type_/prelude.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use hexpm::version::Version; 2 5 use strum::{EnumIter, IntoEnumIterator}; 3 6
+3
compiler-core/src/type_/pretty.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use super::{Type, TypeVar}; 2 5 use crate::{ 3 6 docvec,
+3
compiler-core/src/type_/printer.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use bimap::BiMap; 2 5 use ecow::{EcoString, eco_format}; 3 6 use im::HashMap;
+3
compiler-core/src/type_/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use super::*; 2 5 use crate::{ 3 6 analyse::TargetSupport,
+3
compiler-core/src/type_/tests/accessors.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::assert_module_infer; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/assert.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_error, assert_infer, assert_module_infer, assert_warning}; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/assignments.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::assert_infer; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/conditional_compilation.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use crate::assert_module_infer; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/custom_types.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_module_error, assert_module_infer, assert_warning}; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/2215
+3
compiler-core/src/type_/tests/dead_code_detection.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use crate::{assert_no_warnings, assert_warning}; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/echo.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::assert_module_infer; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/errors.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use crate::{ 2 5 assert_error, assert_internal_module_error, assert_js_module_error, assert_module_error, 3 6 assert_module_syntax_error,
+3
compiler-core/src/type_/tests/exhaustiveness.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_error, assert_module_error, assert_no_warnings, assert_warning}; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/externals.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use crate::{ 2 5 assert_js_module_error, assert_js_module_infer, assert_module_error, assert_module_infer, 3 6 };
+3
compiler-core/src/type_/tests/functions.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_module_error, assert_module_infer}; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/1860
+3
compiler-core/src/type_/tests/guards.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_module_error, assert_module_infer}; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/imports.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::{assert_module_error, assert_module_infer}; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/1760
+3
compiler-core/src/type_/tests/let_assert.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_error, assert_infer}; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/pipes.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_module_error, assert_module_infer, assert_no_warnings}; 2 5 3 6 // https://github.com/gleam-lang/gleam/issues/2392
+3
compiler-core/src/type_/tests/pretty.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use std::sync::Arc; 2 5 3 6 use crate::type_::{
+3
compiler-core/src/type_/tests/target_implementations.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 use itertools::Itertools; 3 6
+3
compiler-core/src/type_/tests/type_alias.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::{assert_module_error, assert_module_infer}; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/use_.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use crate::{assert_error, assert_infer, assert_module_error, assert_module_infer, assert_warning}; 2 5 3 6 #[test]
+3
compiler-core/src/type_/tests/version_inference.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use hexpm::version::Version; 2 5 3 6 use super::compile_module;
+3
compiler-core/src/type_/tests/warnings.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use super::*; 2 5 use crate::{ 3 6 assert_js_no_warnings, assert_js_warning, assert_no_warnings, assert_warning,
+3
compiler-core/src/uid.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use std::sync::{ 2 5 Arc, 3 6 atomic::{AtomicU64, Ordering},
+3
compiler-core/src/version.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 /// The current version of the gleam compiler. If this does not match what is 2 5 /// already in the build folder we will not reuse any cached artifacts and 3 6 /// instead build from scratch
+3
compiler-core/src/warning.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 use crate::{ 2 5 ast::{BitArraySegmentTruncation, SrcSpan, TodoKind}, 3 6 build::Target,
+4
compiler-core/templates/docs-css/atom-one-dark.min.css
··· 1 + /* 2 + * SPDX-License-Identifier: Apache-2.0 3 + * SPDX-FileCopyrightText: 2022 The Gleam contributors 4 + */ 1 5 pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}
+4
compiler-core/templates/docs-css/atom-one-light.min.css
··· 1 + /* 2 + * SPDX-License-Identifier: Apache-2.0 3 + * SPDX-FileCopyrightText: 2022 The Gleam contributors 4 + */ 1 5 pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#c18401}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}
+4
compiler-core/templates/docs-css/index.css
··· 1 + /* 2 + * SPDX-License-Identifier: Apache-2.0 3 + * SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + */ 1 5 /* karla regular latin-ext */ 2 6 @font-face { 3 7 font-family: "Karla";
+3
compiler-core/templates/docs-js/highlight.min.js
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 /*! 2 5 Highlight.js v11.6.0 (git: bed790f3f3) 3 6 (c) 2006-2022 undefined and other contributors
+3
compiler-core/templates/docs-js/highlightjs-elixir.min.js
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 /*! `elixir` grammar compiled for Highlight.js 11.6.0 */ 2 5 (()=>{var e=(()=>{"use strict";return e=>{ 3 6 const n=e.regex,a="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",i={$pattern:a,
+3
compiler-core/templates/docs-js/highlightjs-erlang.min.js
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 /*! `erlang` grammar compiled for Highlight.js 11.6.0 */ 2 5 (()=>{var e=(()=>{"use strict";return e=>{ 3 6 const n="[a-z'][a-zA-Z0-9_']*",r="("+n+":"+n+"|"+n+")",a={
+3
compiler-core/templates/docs-js/highlightjs-gleam.js
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 hljs.registerLanguage("gleam", function (hljs) { 2 5 const KEYWORDS = { 3 6 className: "keyword",
+3
compiler-core/templates/docs-js/highlightjs-javascript.min.js
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 /*! `javascript` grammar compiled for Highlight.js 11.6.0 */ 2 5 (()=>{var e=(()=>{"use strict" 3 6 ;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],t=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","module","global"],i=[].concat(r,t,s)
+3
compiler-core/templates/docs-js/highlightjs-typescript.min.js
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 /*! `typescript` grammar compiled for Highlight.js 11.6.0 */ 2 5 (()=>{var e=(()=>{"use strict" 3 6 ;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],t=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","module","global"],i=[].concat(r,t,s)
+3
compiler-core/templates/docs-js/index.js
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 "use strict"; 2 5 3 6 window.Gleam = (function () {
+3
compiler-core/templates/docs-js/lunr.min.js
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 /** 2 5 * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 3 6 * Copyright (C) 2020 Oliver Nightingale
+4 -1
compiler-core/templates/documentation_layout.html
··· 1 - <!DOCTYPE html> 1 + {# 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + #}<!DOCTYPE html> 2 5 <html> 3 6 <head> 4 7 <meta charset="utf-8"/>
+5 -1
compiler-core/templates/documentation_module.html
··· 1 + {# 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + #} 1 5 {% extends "documentation_layout.html" %} 2 6 3 7 {% block sidebar_content %} ··· 130 134 {% endfor %} 131 135 </section> 132 136 {% endif %} 133 - {% endblock %} 137 + {% endblock %}
+4
compiler-core/templates/documentation_page.html
··· 1 + {# 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2020 The Gleam contributors 4 + #} 1 5 {% extends "documentation_layout.html" %} 2 6 3 7 {% block title %}
+3
compiler-core/templates/echo.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 -define(is_lowercase_char(X), 2 5 (X > 96 andalso X < 123)). 3 6
+3
compiler-core/templates/echo.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 function echo(value, message, file, line) { 2 5 const grey = "\u001b[90m"; 3 6 const reset_color = "\u001b[39m";
-23
compiler-core/templates/ejected.mk
··· 1 - ifndef GLEAM_NO_COMPILE 2 - GLEAM_INSTALLED := $(shell command -v gleam) 3 - endif 4 - 5 - ERLANG_FILES = $(wildcard {src,build}/*.erl) 6 - GLEAM_FILES = $(wildcard {src,build}/**/*.gleam) 7 - 8 - .PHONY: ebin check 9 - 10 - ifdef GLEAM_INSTALLED 11 - ebin: check $(GLEAM_FILES) $(ERLANG_FILES) 12 - gleam compile-package --target erlang 13 - else 14 - ebin: check $(ERLANG_FILES) 15 - @mkdir -p ./ebin 16 - @cp build/*.app ebin/ 17 - @erlc -server -o ebin $(ERLANG_FILES) || (rm -rf ebin && false) 18 - endif 19 - 20 - check: 21 - ifndef ERL_LIBS 22 - $(error "ERL_LIBS environment variable not set") 23 - endif
+3
compiler-core/templates/gleam@@main.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 -module('{{ application }}@@main'). 2 5 -export([run/1, main/1]). 3 6
+3
compiler-core/templates/prelude.d.mts
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 /** @deprecated */ 2 5 export class CustomType { 3 6 /** @deprecated */
+3
compiler-core/templates/prelude.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 export class CustomType { 2 5 withFields(fields) { 3 6 let properties = Object.keys(this).map((label) =>
+3
compiler-wasm/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 [package] 2 5 name = "gleam-wasm" 3 6 version = "1.17.0"
+5
compiler-wasm/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2021 The Gleam contributors 4 + --> 5 + 1 6 # Compiler WASM 2 7 3 8 ```sh
+3
compiler-wasm/src/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod tests; 3 6 mod wasm_filesystem;
+3
compiler-wasm/src/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use super::*; 2 5 3 6 use wasm_bindgen_test::wasm_bindgen_test;
+3
compiler-wasm/src/wasm_filesystem.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 use camino::{Utf8Path, Utf8PathBuf}; 2 5 use gleam_core::{ 3 6 Error, Result,
+3
deny.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 # https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html 2 5 [advisories] 3 6 db-path = "~/.cargo/advisory-db"
+5
docs/annoyances.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2023 The Gleam contributors 4 + --> 5 + 1 6 # Annoyances 2 7 3 8 This document contains a list of issues and annoyances that we have writing
+5
docs/compiler/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2021 The Gleam contributors 4 + --> 5 + 1 6 # Compiler documentation 2 7 3 8 Hello! Welcome to the documentation for the Gleam compiler. I hope you have fun
+5
docs/incident-response-plan.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2026 The Gleam contributors 4 + --> 5 + 1 6 # Incident response plan 2 7 3 8 ## Stages
+5
docs/runtime-errors.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2024 The Gleam contributors 4 + --> 5 + 1 6 # Runtime errors 2 7 3 8 There are several runtime errors that Gleam code can throw. This documentation
+5
docs/threat-model.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2026 The Gleam contributors 4 + --> 5 + 1 6 # Public threat model 2 7 3 8 Last updated: 2026-04-23
+5
docs/v2.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2025 The Gleam contributors 4 + --> 5 + 1 6 # Breaking changes to make for v2 2 7 3 8 ## `[1 ..]` syntax
+3
gleam-bin/.cargo/config.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # Statically link the CRT on Windows with MSVC toolchain 2 5 # (only in release mode) 3 6 [target.'cfg(all(windows, target_env = "msvc"))']
+3
gleam-bin/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 [package] 2 5 name = "gleam" 3 6 version = "1.17.0"
+3
gleam-bin/build.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 fn main() { 2 5 #[cfg(windows)] 3 6 static_vcruntime::metabuild();
+3
gleam-bin/src/main.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 gleam_cli::main(); 3 6 }
+5
hexpm/CONTRIBUTING.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2026 The Gleam contributors 4 + --> 5 + 1 6 # How to Contribute 2 7 3 8 ## Adding a New API Function
+3
hexpm/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 [package] 2 5 name = "hexpm" 3 6 version = "1.17.0"
+3
hexpm/build.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 /// `prost_build` generates files in the output directory, which means that if we want 2 5 /// to use it, we would need the protoc compiler as a build dependency. 3 6 /// To get around this, we need run the build script and manually copy the generated files
+3
hexpm/proto/names.proto
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2014 The Hex Team 3 + 1 4 syntax = "proto2"; 2 5 3 6 package names;
+3
hexpm/proto/package.proto
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2014 The Hex Team 3 + 1 4 syntax = "proto2"; 2 5 3 6 package package;
+3
hexpm/proto/signed.proto
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2014 The Hex Team 3 + 1 4 syntax = "proto2"; 2 5 3 6 package signed;
+3
hexpm/proto/versions.proto
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2014 The Hex Team 3 + 1 4 syntax = "proto2"; 2 5 3 6 package versions;
+3
hexpm/src/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 mod proto; 2 5 3 6 #[cfg(test)]
+3
hexpm/src/proto.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 #![allow(clippy::enum_variant_names)] 2 5 3 6 pub mod package;
+3
hexpm/src/proto/package.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 // This file is @generated by prost-build. 2 5 #[derive(Clone, PartialEq, ::prost::Message)] 3 6 pub struct Package {
+3
hexpm/src/proto/signed.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 // This file is @generated by prost-build. 2 5 #[derive(Clone, PartialEq, ::prost::Message)] 3 6 pub struct Signed {
+3
hexpm/src/proto/versions.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 // This file is @generated by prost-build. 2 5 #[derive(Clone, PartialEq, ::prost::Message)] 3 6 pub struct Versions {
+3
hexpm/src/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 use std::{convert::TryFrom, io::Cursor}; 2 5 3 6 use super::*;
+3
hexpm/src/version.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 //! Functions for parsing and matching versions against requirements, based off 2 5 //! and compatible with the Elixir Version module, which is used by Hex 3 6 //! internally as well as be the Elixir build tool Hex client.
+3
hexpm/src/version/lexer.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 //! Lexer for semver ranges. 2 5 //! 3 6 //! Breaks a string of input into an iterator of tokens that can be used with a parser.
+3
hexpm/src/version/parser.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 // Based off of https://github.com/steveklabnik/semver-parser/blob/bee9de80aaa9653c5eb46a83658606cb21151e65/src/parser.rs 2 5 3 6 use std::fmt;
+3
hexpm/src/version/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 use std::cmp::Ordering::{Equal, Greater, Less}; 2 5 use std::collections::HashMap; 3 6
+3
language-server/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 [package] 2 5 name = "gleam-language-server" 3 6 version = "1.17.0"
+3
language-server/src/code_action.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use std::{collections::HashSet, iter, sync::Arc}; 2 5 3 6 use ecow::{EcoString, eco_format};
+3
language-server/src/compiler.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use debug_ignore::DebugIgnore; 2 5 use ecow::EcoString; 3 6 use itertools::Itertools;
+3
language-server/src/completer.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use std::{collections::HashMap, sync::Arc}; 2 5 3 6 use ecow::{EcoString, eco_format};
+3
language-server/src/edits.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use ecow::EcoString; 2 5 use lsp_types::{Position, Range, TextEdit}; 3 6
+3
language-server/src/engine.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use camino::Utf8PathBuf; 2 5 use ecow::{EcoString, eco_format}; 3 6 use gleam_core::{
+3
language-server/src/feedback.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use gleam_core::{Error, Warning, diagnostic::Diagnostic}; 2 5 use std::collections::{HashMap, HashSet}; 3 6
+3
language-server/src/files.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use std::collections::HashSet; 2 5 use std::time::SystemTime; 3 6
+3
language-server/src/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 #![warn( 2 5 clippy::all, 3 6 clippy::dbg_macro,
+3
language-server/src/messages.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use camino::Utf8PathBuf; 2 5 use lsp::{DefinitionRequest, DidChangeWatchedFilesNotification, DidOpenTextDocumentNotification}; 3 6 use lsp_types::{
+3
language-server/src/progress.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use debug_ignore::DebugIgnore; 2 5 use lsp_types::{ 3 6 InitializeParams, LspAny, ProgressParams, ProgressToken, WorkDoneProgressBegin,
+3
language-server/src/reference.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2019 The Gleam contributors 3 + 1 4 use std::collections::{HashMap, HashSet}; 2 5 3 6 use ecow::EcoString;
+3
language-server/src/rename.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use std::collections::HashMap; 2 5 3 6 use ecow::EcoString;
+3
language-server/src/router.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use gleam_core::{ 2 5 Error, Result, 3 6 build::SourceFingerprint,
+3
language-server/src/server.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use super::{ 2 5 DownloadDependencies, MakeLocker, 3 6 engine::{self, LanguageServerEngine},
+3
language-server/src/signature_help.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use std::{ 2 5 collections::{HashMap, HashSet}, 3 6 sync::Arc,
+3
language-server/src/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 mod action; 2 5 mod compilation; 3 6 mod completion;
+3
language-server/src/tests/action.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use itertools::Itertools; 2 5 use lsp_types::{ 3 6 CodeActionContext, CodeActionParams, DocumentChange, PartialResultParams, Position, Uri as Url,
+3
language-server/src/tests/compilation.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use crate::engine::Compilation; 2 5 3 6 use super::*;
+3
language-server/src/tests/completion.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use insta::assert_debug_snapshot; 2 5 use itertools::Itertools; 3 6 use lsp_types::{CompletionItem, Position};
+3
language-server/src/tests/definition.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use lsp_types::{DefinitionParams, Location, Position, Range, TypeDefinitionParams, Uri as Url}; 2 5 3 6 use super::*;
+3
language-server/src/tests/document_highlight.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use lsp_types::{ 2 5 DocumentHighlightParams, PartialResultParams, Position, Range, TextDocumentPositionParams, 3 6 WorkDoneProgressParams,
+3
language-server/src/tests/document_symbols.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use insta::assert_debug_snapshot; 2 5 use lsp_types::{DocumentSymbol, DocumentSymbolParams}; 3 6
+3
language-server/src/tests/folding_range.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 use lsp_types::{FoldingRange, FoldingRangeKind, FoldingRangeParams}; 2 5 3 6 use super::*;
+3
language-server/src/tests/hover.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 use lsp_types::{Contents, Hover, HoverParams, MarkedString, Position, Range}; 2 5 3 6 use super::*;
+3
language-server/src/tests/reference.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use std::collections::HashMap; 2 5 3 6 use lsp_types::{
+3
language-server/src/tests/rename.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use std::collections::HashMap; 2 5 3 6 use lsp_types::{
+3
language-server/src/tests/router.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use std::time::SystemTime; 2 5 3 6 use gleam_core::{Error, io::FileSystemWriter, paths::ProjectPaths};
+3
language-server/src/tests/signature_help.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use super::*; 2 5 use lsp_types::{ 3 6 ActiveParameter, ParameterInformation, ParameterInformationLabel, SignatureHelp,
+5
licence-bundler/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2026 The Gleam contributors 4 + --> 5 + 1 6 # licence_bundler 2 7 3 8 A small program that creates a `gleam-licences.html` which details all the
+3
licence-bundler/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "licence_bundler" 2 5 version = "1.0.0" 3 6
+3
licence-bundler/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 # Do not manually edit this file, it is managed by Gleam. 2 5 # 3 6 # This file locks the dependency versions used, to make your build
+3
licence-bundler/src/licence_bundler.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import gleam/bool 2 5 import gleam/io 3 6 import gleam/list
+3
licence-bundler/test/licence_bundler_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() -> Nil {
+3
test-commands/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 [package] 2 5 name = "test-commands" 3 6 version = "1.17.0"
+3
test-commands/cases/escript_ok/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "escript_ok" 2 5 version = "1.0.0" 3 6
+3
test-commands/cases/escript_ok/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 # Do not manually edit this file, it is managed by Gleam. 2 5 # 3 6 # This file locks the dependency versions used, to make your build
+3
test-commands/cases/escript_ok/src/escript_ok.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn main() -> Nil { 2 5 print("Hello, Joe!\n") 3 6 Nil
+3
test-commands/cases/escript_with_dependency/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 name = "escript_with_dependency" 2 5 version = "1.0.0" 3 6
+3
test-commands/cases/escript_with_dependency/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 # Do not manually edit this file, it is managed by Gleam. 2 5 # 3 6 # This file locks the dependency versions used, to make your build
+3
test-commands/cases/escript_with_dependency/src/escript_with_dependency.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import argv 2 5 3 6 pub fn main() -> Nil {
+3
test-commands/cases/escript_with_wrong_arity_main_function/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "escript_with_wrong_arity_main_function" 2 5 version = "1.0.0" 3 6
+3
test-commands/cases/escript_with_wrong_arity_main_function/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 # Do not manually edit this file, it is managed by Gleam. 2 5 # 3 6 # This file locks the dependency versions used, to make your build
+3
test-commands/cases/escript_with_wrong_arity_main_function/src/escript_with_wrong_arity_main_function.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 // main must not take an argument 2 5 pub fn main(stuff: List(String)) -> Nil { 3 6 echo stuff
+3
test-commands/cases/escript_without_main_function/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "escript_without_main_function" 2 5 version = "1.0.0" 3 6
+3
test-commands/cases/escript_without_main_function/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 # Do not manually edit this file, it is managed by Gleam. 2 5 # 3 6 # This file locks the dependency versions used, to make your build
+3
test-commands/cases/escript_without_main_function/src/escript_without_main_function.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 // There's no main function here 2 5 pub fn run() -> Nil { 3 6 echo "Hello, world"
+3
test-commands/src/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod tests;
+3
test-commands/src/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 use camino::Utf8PathBuf; 2 5 use gleam_cli::{Command, ExportTarget, fs}; 3 6 use std::process;
+5
test-community-packages/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2024 The Gleam contributors 4 + --> 5 + 1 6 # test_community_packages 2 7 3 8 [![Package Version](https://img.shields.io/hexpm/v/test_community_packages)](https://hex.pm/packages/test_community_packages)
+3
test-community-packages/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "test_community_packages" 2 5 version = "1.0.0" 3 6
+3
test-community-packages/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test-community-packages/src/test_community_packages.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test-community-packages/test/test_community_packages_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 import gleeunit 2 5 import gleeunit/should 3 6
+3
test-helpers-rs/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 [package] 2 5 name = "test-helpers-rs" 3 6 version = "0.1.0"
+3
test-helpers-rs/src/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 use camino::{Utf8Path, Utf8PathBuf}; 2 5 use gleam_core::{ 3 6 io::{Content, FileSystemWriter, memory::InMemoryFileSystem},
+3
test-output/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 [package] 2 5 name = "test-output" 3 6 version = "1.17.0"
+3
test-output/cases/echo_bitarray/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_bitarray" 2 5 version = "1.0.0"
+3
test-output/cases/echo_bitarray/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo <<>> 3 6 echo <<1, 2, 3>>
+3
test-output/cases/echo_bool/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_bool" 2 5 version = "1.0.0"
+3
test-output/cases/echo_bool/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo True 3 6 echo False
+3
test-output/cases/echo_charlist/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "echo_charlist" 2 5 version = "1.0.0"
+3
test-output/cases/echo_charlist/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo [72, 101, 108, 108, 111, 44, 32, 74, 111, 101, 33] 3 6 }
+3
test-output/cases/echo_circular_reference/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "echo_circular_reference" 2 5 version = "1.0.0" 3 6 target = "javascript"
+3
test-output/cases/echo_circular_reference/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo circular_reference() 3 6 Nil
+3
test-output/cases/echo_circular_reference/src/main_ffi.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 export function circular_reference() { 2 5 const x = []; 3 6 x.push(x);
+3
test-output/cases/echo_custom_type/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_custom_type" 2 5 version = "1.0.0"
+3
test-output/cases/echo_custom_type/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub type Wibble { 2 5 Wibble(a: Int, b: String) 3 6 Wobble(a: List(Float))
+3
test-output/cases/echo_dict/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_tuple" 2 5 version = "1.0.0" 3 6
+3
test-output/cases/echo_dict/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 import gleam/dict 2 5 3 6 pub fn main() {
+3
test-output/cases/echo_float/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_float" 2 5 version = "1.0.0"
+3
test-output/cases/echo_float/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo 1.0 3 6 echo 2.1
+3
test-output/cases/echo_function/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_custom_type" 2 5 version = "1.0.0"
+3
test-output/cases/echo_function/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo fn(n) { n + 1 } 3 6 echo private
+3
test-output/cases/echo_importing_module_named_inspect/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_importing_module_named_inspect" 2 5 version = "1.0.0"
+3
test-output/cases/echo_importing_module_named_inspect/src/inspect.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub const x = Nil
+3
test-output/cases/echo_importing_module_named_inspect/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 import inspect 2 5 3 6 pub fn main() {
+3
test-output/cases/echo_int/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "echo_int" 2 5 version = "1.0.0"
+3
test-output/cases/echo_int/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo 1 3 6 echo 2
+3
test-output/cases/echo_list/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_list" 2 5 version = "1.0.0"
+3
test-output/cases/echo_list/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo [] 3 6 echo [1, 2, 3]
+3
test-output/cases/echo_nil/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "echo_nil" 2 5 version = "1.0.0"
+3
test-output/cases/echo_nil/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo Nil 3 6 }
+3
test-output/cases/echo_non_record_atom_tag/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "echo_non_record_atom_tag" 2 5 version = "1.0.0"
+3
test-output/cases/echo_non_record_atom_tag/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo #(to_atom("UP"), 1, 2) 3 6 echo #(to_atom("down"), 12.34)
+3
test-output/cases/echo_singleton/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "echo_circular_reference" 2 5 version = "1.0.0" 3 6 target = "javascript"
+3
test-output/cases/echo_singleton/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import thing 2 5 3 6 pub fn main() {
+3
test-output/cases/echo_singleton/src/main_ffi.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import { Thing } from "./thing.mjs"; 2 5 3 6 const it = new Thing();
+3
test-output/cases/echo_singleton/src/thing.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 pub type Thing { 2 5 Thing 3 6 }
+3
test-output/cases/echo_string/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_string" 2 5 version = "1.0.0"
+3
test-output/cases/echo_string/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo "hello world" 3 6 echo "multiline
+3
test-output/cases/echo_tuple/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_tuple" 2 5 version = "1.0.0"
+3
test-output/cases/echo_tuple/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 echo #() 3 6 echo #(True, 1, "hello")
+3
test-output/cases/echo_with_message/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "echo_bitarray" 2 5 version = "1.0.0"
+3
test-output/cases/echo_with_message/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 let message = "message" 3 6
+3
test-output/cases/linked_process_exit/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 name = "linked_process_exit" 2 5 version = "1.0.0"
+3
test-output/cases/linked_process_exit/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 @external(erlang, "main_ffi", "spawn_and_exit") 2 5 fn spawn_and_exit() -> Nil 3 6
+3
test-output/cases/linked_process_exit/src/main_ffi.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 -module(main_ffi). 2 5 -export([spawn_and_exit/0]). 3 6
+3
test-output/src/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod tests;
+3
test-output/src/tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod echo;
+3
test-output/src/tests/echo.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 use std::{io::Read, process::Stdio}; 2 5 3 6 use camino::{Utf8Path, Utf8PathBuf};
+5 -2
test-output/src/tests/snapshots/test_output__tests__echo__echo_bool.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo True 8 11 echo False ··· 10 13 11 14 12 15 --- gleam run output ---------------- 13 - src/main.gleam:2 16 + src/main.gleam:5 14 17 True 15 - src/main.gleam:3 18 + src/main.gleam:6 16 19 False
+4 -1
test-output/src/tests/snapshots/test_output__tests__echo__echo_charlist.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo [72, 101, 108, 108, 111, 44, 32, 74, 111, 101, 33] 8 11 } 9 12 10 13 11 14 --- gleam run output ---------------- 12 - src/main.gleam:2 15 + src/main.gleam:5 13 16 charlist.from_string("Hello, Joe!")
+5 -2
test-output/src/tests/snapshots/test_output__tests__echo__echo_dict.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 import gleam/dict 7 10 8 11 pub fn main() { ··· 12 15 13 16 14 17 --- gleam run output ---------------- 15 - src/main.gleam:4 18 + src/main.gleam:7 16 19 dict.from_list([]) 17 - src/main.gleam:5 20 + src/main.gleam:8 18 21 dict.from_list([#(1, "hello"), #(2, "world!")])
+5 -2
test-output/src/tests/snapshots/test_output__tests__echo__echo_function.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo fn(n) { n + 1 } 8 11 echo private ··· 14 17 15 18 16 19 --- gleam run output ---------------- 17 - src/main.gleam:2 20 + src/main.gleam:5 18 21 //fn(a) { ... } 19 - src/main.gleam:3 22 + src/main.gleam:6 20 23 //fn() { ... }
+4 -1
test-output/src/tests/snapshots/test_output__tests__echo__echo_importing_module_named_inspect.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 import inspect 7 10 8 11 pub fn main() { ··· 11 14 12 15 13 16 --- gleam run output ---------------- 14 - src/main.gleam:4 17 + src/main.gleam:7 15 18 Nil
+6 -3
test-output/src/tests/snapshots/test_output__tests__echo__echo_int.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo 1 8 11 echo 2 ··· 11 14 12 15 13 16 --- gleam run output ---------------- 14 - src/main.gleam:2 17 + src/main.gleam:5 15 18 1 16 - src/main.gleam:3 19 + src/main.gleam:6 17 20 2 18 - src/main.gleam:4 21 + src/main.gleam:7 19 22 100000
+5 -2
test-output/src/tests/snapshots/test_output__tests__echo__echo_list.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo [] 8 11 echo [1, 2, 3] ··· 10 13 11 14 12 15 --- gleam run output ---------------- 13 - src/main.gleam:2 16 + src/main.gleam:5 14 17 [] 15 - src/main.gleam:3 18 + src/main.gleam:6 16 19 [1, 2, 3]
+4 -1
test-output/src/tests/snapshots/test_output__tests__echo__echo_nil.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo Nil 8 11 } 9 12 10 13 11 14 --- gleam run output ---------------- 12 - src/main.gleam:2 15 + src/main.gleam:5 13 16 Nil
+4 -1
test-output/src/tests/snapshots/test_output__tests__echo__echo_singleton.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 8 + 6 9 import thing 7 10 8 11 pub fn main() { ··· 17 20 18 21 19 22 --- gleam run output ---------------- 20 - src/main.gleam:4 23 + src/main.gleam:7 21 24 #(1, Thing, Thing)
+6 -3
test-output/src/tests/snapshots/test_output__tests__echo__echo_string.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo "hello world" 8 11 echo "multiline ··· 12 15 13 16 14 17 --- gleam run output ---------------- 15 - src/main.gleam:2 18 + src/main.gleam:5 16 19 "hello world" 17 - src/main.gleam:3 20 + src/main.gleam:6 18 21 "multiline\nstring" 19 - src/main.gleam:5 22 + src/main.gleam:8 20 23 "string with\t\r\nescaped chars"
+5 -2
test-output/src/tests/snapshots/test_output__tests__echo__echo_tuple.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo #() 8 11 echo #(True, 1, "hello") ··· 10 13 11 14 12 15 --- gleam run output ---------------- 13 - src/main.gleam:2 16 + src/main.gleam:5 14 17 #() 15 - src/main.gleam:3 18 + src/main.gleam:6 16 19 #(True, 1, "hello")
+6 -3
test-output/src/tests/snapshots/test_output__tests__echo__echo_with_message.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 let message = "message" 8 11 ··· 16 19 17 20 18 21 --- gleam run output ---------------- 19 - src/main.gleam:4 message1 22 + src/main.gleam:7 message1 20 23 1 21 - src/main.gleam:7 message2 24 + src/main.gleam:10 message2 22 25 1 23 - src/main.gleam:9 message3 26 + src/main.gleam:12 message3 24 27 2
+6 -3
test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_bitarray.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo <<>> 8 11 echo <<1, 2, 3>> ··· 11 14 12 15 13 16 --- gleam run output ---------------- 14 - src/main.gleam:2 17 + src/main.gleam:5 15 18 "" 16 - src/main.gleam:3 19 + src/main.gleam:6 17 20 "\u{0001}\u{0002}\u{0003}" 18 - src/main.gleam:4 21 + src/main.gleam:7 19 22 <<1, 2, 3:size(2)>>
+6 -3
test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_custom_type.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub type Wibble { 7 10 Wibble(a: Int, b: String) 8 11 Wobble(a: List(Float)) ··· 17 20 18 21 19 22 --- gleam run output ---------------- 20 - src/main.gleam:8 23 + src/main.gleam:11 21 24 Wibble(1, "hello") 22 - src/main.gleam:9 25 + src/main.gleam:12 23 26 Wobble([1.0, 1.1]) 24 - src/main.gleam:10 27 + src/main.gleam:13 25 28 Woo
+6 -3
test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_float.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo 1.0 8 11 echo 2.1 ··· 11 14 12 15 13 16 --- gleam run output ---------------- 14 - src/main.gleam:2 17 + src/main.gleam:5 15 18 1.0 16 - src/main.gleam:3 19 + src/main.gleam:6 17 20 2.1 18 - src/main.gleam:4 21 + src/main.gleam:7 19 22 11.11
+6 -3
test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_non_record_atom_tag.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo #(to_atom("UP"), 1, 2) 8 11 echo #(to_atom("down"), 12.34) ··· 16 19 17 20 18 21 --- gleam run output ---------------- 19 - src/main.gleam:2 22 + src/main.gleam:5 20 23 #(atom.create("UP"), 1, 2) 21 - src/main.gleam:3 24 + src/main.gleam:6 22 25 Down(12.34) 23 - src/main.gleam:4 26 + src/main.gleam:7 24 27 #(atom.create("Both"), "ok")
+3
test-output/src/tests/snapshots/test_output__tests__echo__erlang-linked_process_exit.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 8 + 6 9 @external(erlang, "main_ffi", "spawn_and_exit") 7 10 fn spawn_and_exit() -> Nil 8 11
+6 -3
test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_bitarray.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo <<>> 8 11 echo <<1, 2, 3>> ··· 11 14 12 15 13 16 --- gleam run output ---------------- 14 - src/main.gleam:2 17 + src/main.gleam:5 15 18 <<>> 16 - src/main.gleam:3 19 + src/main.gleam:6 17 20 <<1, 2, 3>> 18 - src/main.gleam:4 21 + src/main.gleam:7 19 22 <<1, 2, 3:size(2)>>
+4 -1
test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_circular_reference.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo circular_reference() 8 11 Nil ··· 15 18 16 19 17 20 --- gleam run output ---------------- 18 - src/main.gleam:2 21 + src/main.gleam:5 19 22 #(//js(circular reference))
+6 -3
test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_custom_type.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub type Wibble { 7 10 Wibble(a: Int, b: String) 8 11 Wobble(a: List(Float)) ··· 17 20 18 21 19 22 --- gleam run output ---------------- 20 - src/main.gleam:8 23 + src/main.gleam:11 21 24 Wibble(a: 1, b: "hello") 22 - src/main.gleam:9 25 + src/main.gleam:12 23 26 Wobble(a: [1, 1.1]) 24 - src/main.gleam:10 27 + src/main.gleam:13 25 28 Woo
+6 -3
test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_float.snap
··· 3 3 expression: output 4 4 --- 5 5 --- main.gleam ---------------------- 6 + // SPDX-License-Identifier: Apache-2.0 7 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 8 + 6 9 pub fn main() { 7 10 echo 1.0 8 11 echo 2.1 ··· 11 14 12 15 13 16 --- gleam run output ---------------- 14 - src/main.gleam:2 17 + src/main.gleam:5 15 18 1 16 - src/main.gleam:3 19 + src/main.gleam:6 17 20 2.1 18 - src/main.gleam:4 21 + src/main.gleam:7 19 22 11.11
+3
test-package-compiler/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 [package] 2 5 name = "test-package-compiler" 3 6 version = "1.17.0"
+7 -1
test-package-compiler/build.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use std::path::PathBuf; 2 5 3 6 pub fn main() { 4 7 println!("cargo:rerun-if-changed=cases"); 5 8 6 - let mut module = "//! This file is generated by build.rs 9 + let mut module = "// SPDX-License-Identifier: Apache-2.0 10 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 11 + 12 + //! This file is generated by build.rs 7 13 //! Do not edit it directly, instead add new test cases to ./cases 8 14 " 9 15 .to_string();
+3
test-package-compiler/cases/alias_unqualified_import/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 # https://github.com/gleam-lang/gleam/issues/303 2 5 name = "importy" 3 6 version = "0.1.0"
+3
test-package-compiler/cases/alias_unqualified_import/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // https://github.com/gleam-lang/gleam/issues/303 2 5 pub fn id(x) { 3 6 x
+3
test-package-compiler/cases/alias_unqualified_import/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // https://github.com/gleam-lang/gleam/issues/303 2 5 import one.{Empty as E, id as i} 3 6
+3
test-package-compiler/cases/dev_importing_test/dev/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // This import will fail because the `two` module is in the `test` directory and 2 5 // as such isn't permitted to be imported into the `dev` directory. 3 6 import two
+3
test-package-compiler/cases/dev_importing_test/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/dev_importing_test/test/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4
+3
test-package-compiler/cases/duplicate_module/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "duplicate_module_dev" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/duplicate_module/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // There is another module with the same name in the `test` directory. 2 5 pub fn main() { 3 6 "Hello, Joe!"
+3
test-package-compiler/cases/duplicate_module/test/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // There is another module with the same name in the `src` directory. 2 5 pub fn main() { 3 6 "Hello, Joe!"
+3
test-package-compiler/cases/duplicate_module_dev/dev/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // There is another module with the same name in the `src` directory. 2 5 pub fn main() { 3 6 "Hello, Joe!"
+3
test-package-compiler/cases/duplicate_module_dev/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/duplicate_module_dev/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 // There is another module with the same name in the `dev` directory. 2 5 pub fn main() { 3 6 "Hello, Joe!"
+3
test-package-compiler/cases/duplicate_module_test_dev/dev/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // There is another module with the same name in the `test` directory. 2 5 pub fn main() { 3 6 "Hello, Joe!"
+3
test-package-compiler/cases/duplicate_module_test_dev/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "duplicate_module" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/duplicate_module_test_dev/test/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 // There is another module with the same name in the `dev` directory. 2 5 pub fn main() { 3 6 "Hello, Joe!"
+3
test-package-compiler/cases/empty_module_warning/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "empty_module_warning" 2 5 version = "1.0.0" 3 6 description = "Test package with empty modules"
+3
test-package-compiler/cases/empty_module_warning/src/empty.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 // This is an empty module
+3
test-package-compiler/cases/empty_module_warning/src/internal.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 @internal 2 5 pub fn private_function() -> Nil { 3 6 Nil
+3
test-package-compiler/cases/empty_module_warning/src/private.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 fn private_function() -> Nil { 2 5 Nil 3 6 }
+3
test-package-compiler/cases/empty_module_warning/src/public.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 "This module has public definitions" 3 6 }
+3
test-package-compiler/cases/erlang_app_generation/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 # This config file has a bunch of properties that will be entered into the 2 5 # Erlang .app file 3 6
+3
test-package-compiler/cases/erlang_app_generation/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4
+3
test-package-compiler/cases/erlang_app_generation_with_argument/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 # This config file has a bunch of properties that will be entered into the 2 5 # Erlang .app file 3 6
+3
test-package-compiler/cases/erlang_app_generation_with_argument/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4
+3
test-package-compiler/cases/erlang_bug_752/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 # https://github.com/gleam-lang/gleam/issues/752 2 5 name = "importy" 3 6 version = "0.1.0"
+3
test-package-compiler/cases/erlang_bug_752/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type One(a) { 2 5 One(a) 3 6 }
+3
test-package-compiler/cases/erlang_bug_752/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one.{type One} 2 5 3 6 pub type Two(b) {
+3
test-package-compiler/cases/erlang_empty/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "hello_joe" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/erlang_empty/src/empty.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4
+3
test-package-compiler/cases/erlang_escape_names/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 # https://github.com/gleam-lang/gleam/issues/340 2 5 name = "importy" 3 6 version = "0.1.0"
+3
test-package-compiler/cases/erlang_escape_names/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // https://github.com/gleam-lang/gleam/issues/340 2 5 pub fn receive(x) { 3 6 x
+3
test-package-compiler/cases/erlang_escape_names/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // https://github.com/gleam-lang/gleam/issues/340 2 5 import one.{receive} 3 6
+3
test-package-compiler/cases/erlang_import/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/erlang_import/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import two 2 5 3 6 pub fn unbox(x) {
+3
test-package-compiler/cases/erlang_import/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type Box { 2 5 Box(Int) 3 6 }
+3
test-package-compiler/cases/erlang_import_shadowing_prelude/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 # https://github.com/gleam-lang/gleam/issues/1495 2 5 name = "importy" 3 6 version = "0.1.0"
+3
test-package-compiler/cases/erlang_import_shadowing_prelude/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type Error { 2 5 // This constructor shadows the Error constructor in the prelude. 3 6 Error
+3
test-package-compiler/cases/erlang_import_shadowing_prelude/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // This import shadows the Error type in the prelude. 2 5 import one.{Error} 3 6
+3
test-package-compiler/cases/erlang_nested/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/erlang_nested/src/one/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 "Hi there" 3 6 }
+3
test-package-compiler/cases/erlang_nested_qualified_constant/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 # https://github.com/gleam-lang/gleam/issues/922#issuecomment-803272624 2 5 name = "importy" 3 6 version = "0.1.0"
+3
test-package-compiler/cases/erlang_nested_qualified_constant/src/one/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type A { 2 5 A 3 6 }
+3
test-package-compiler/cases/erlang_nested_qualified_constant/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // This module uses imports in a way which previously failed to compile due a 2 5 // compiler bug. 3 6 //
+3
test-package-compiler/cases/errors_from_unrelated_modules/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 name = "errors_from_unrelated_modules" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/errors_from_unrelated_modules/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn one_error() { 2 5 1 + True 3 6 }
+3
test-package-compiler/cases/errors_from_unrelated_modules/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import one 2 5 3 6 pub fn two_error() {
+3
test-package-compiler/cases/hello_joe/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "hello_joe" 2 5 version = "0.1.0"
+3
test-package-compiler/cases/hello_joe/src/hello_joe.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 "Hello, Joe!" 3 6 }
+3
test-package-compiler/cases/import_cycle/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/import_cycle/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one
+3
test-package-compiler/cases/import_cycle_multi/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/import_cycle_multi/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 import two
+3
test-package-compiler/cases/import_cycle_multi/src/three.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one
+3
test-package-compiler/cases/import_cycle_multi/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import three
+3
test-package-compiler/cases/import_shadowed_name_warning/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 # This should emit no warnings. 2 5 # https://github.com/gleam-lang/otp/pull/22 3 6 name = "importy"
+3
test-package-compiler/cases/import_shadowed_name_warning/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // https://github.com/gleam-lang/otp/pull/22 2 5 3 6 pub type Port
+3
test-package-compiler/cases/import_shadowed_name_warning/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 //// https://github.com/gleam-lang/otp/pull/22 2 5 3 6 // No warning should be emitted about this imported type. The compiler does not
+3
test-package-compiler/cases/imported_constants/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/imported_constants/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type A { 2 5 A 3 6 }
+3
test-package-compiler/cases/imported_constants/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one.{A, A as C, B, B as D, User, User as XUser} 2 5 3 6 /// For these statements we use the records in a qualified fashion
+3
test-package-compiler/cases/imported_external_fns/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/imported_external_fns/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 @external(erlang, "thing", "new") 2 5 pub fn thing() -> Nil 3 6
+3
test-package-compiler/cases/imported_external_fns/src/three.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 @external(erlang, "thing", "new") 2 5 pub fn thing() -> Nil 3 6
+3
test-package-compiler/cases/imported_external_fns/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one.{ 2 5 escaped_thing, escaped_thing as xescaped_thing, thing, thing as xthing, 3 6 }
+3
test-package-compiler/cases/imported_record_constructors/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/imported_record_constructors/src/one/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type A { 2 5 A 3 6 }
+3
test-package-compiler/cases/imported_record_constructors/src/one/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type A { 2 5 A 3 6 }
+3
test-package-compiler/cases/imported_record_constructors/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one/one.{A, A as C, B, B as D, User, User as XUser} 2 5 import one/two as aliased 3 6
+3
test-package-compiler/cases/javascript_d_ts/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "hello" 2 5 version = "0.1.0" 3 6 target = "javascript"
+3
test-package-compiler/cases/javascript_d_ts/src/hello.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type Wibble { 2 5 Woo 3 6 }
+3
test-package-compiler/cases/javascript_empty/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "hello_joe" 2 5 version = "0.1.0" 3 6 target = "javascript"
+3
test-package-compiler/cases/javascript_empty/src/empty.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4
+3
test-package-compiler/cases/javascript_import/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "javascript"
+3
test-package-compiler/cases/javascript_import/src/one/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type A { 2 5 A 3 6 }
+3
test-package-compiler/cases/javascript_import/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one/two 2 5 3 6 pub const x = two.A
+3
test-package-compiler/cases/javascript_sourcemaps/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "hello" 2 5 version = "0.1.0" 3 6 target = "javascript"
+3
test-package-compiler/cases/javascript_sourcemaps/src/hello.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type Wibble { 2 5 Woo 3 6 }
+3
test-package-compiler/cases/not_overwriting_erlang_module/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/not_overwriting_erlang_module/src/app/code.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 // This module is named "app/code". 2 5 // 3 6 // The last segment is the same as a built in Erlang module, but it is in the
+3
test-package-compiler/cases/opaque_type_accessor/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/opaque_type_accessor/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub opaque type User { 2 5 User(name: String, score: Int) 3 6 }
+3
test-package-compiler/cases/opaque_type_accessor/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one.{type User} 2 5 3 6 // This operation is not permitted because the type is opaque and this module
+3
test-package-compiler/cases/opaque_type_destructure/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/opaque_type_destructure/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub opaque type User { 2 5 User(name: String, score: Int) 3 6 }
+3
test-package-compiler/cases/opaque_type_destructure/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one 2 5 3 6 // This operation is not permitted because the type is opaque and this module
+3
test-package-compiler/cases/overwriting_erlang_module/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/overwriting_erlang_module/src/code.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 // This module is named "code". 2 5 // 3 6 // If you were to compile this and load it into the Erlang virtual machine it
+3
test-package-compiler/cases/src_importing_dev/dev/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4
+3
test-package-compiler/cases/src_importing_dev/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/src_importing_dev/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 // This import will fail because the `two` module is in the `dev` directory and 2 5 // as such isn't permitted to be imported into the `src` directory. 3 6 import two
+3
test-package-compiler/cases/src_importing_test/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/src_importing_test/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // This import will fail because the `two` module is in the `test` directory and 2 5 // as such isn't permitted to be imported into the `src` directory. 3 6 import two
+3
test-package-compiler/cases/src_importing_test/test/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4
+3
test-package-compiler/cases/unknown_module_field_in_constant/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/unknown_module_field_in_constant/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type A { 2 5 A 3 6 }
+3
test-package-compiler/cases/unknown_module_field_in_constant/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one 2 5 3 6 pub const it = one.B
+3
test-package-compiler/cases/unknown_module_field_in_expression/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/unknown_module_field_in_expression/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type A { 2 5 A 3 6 }
+3
test-package-compiler/cases/unknown_module_field_in_expression/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one 2 5 3 6 pub fn it() {
+3
test-package-compiler/cases/unknown_module_field_in_import/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 name = "importy" 2 5 version = "0.1.0" 3 6 target = "erlang"
+3
test-package-compiler/cases/unknown_module_field_in_import/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub type A { 2 5 A 3 6 }
+3
test-package-compiler/cases/unknown_module_field_in_import/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 import one.{B}
+3
test-package-compiler/cases/variable_or_module/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 # Distinguish between a module and a value with the same local name. 2 5 # https://github.com/gleam-lang/gleam/issues/807 3 6 name = "importy"
+3
test-package-compiler/cases/variable_or_module/src/main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // https://github.com/gleam-lang/gleam/issues/807 2 5 import power.{type Power} 3 6
+3
test-package-compiler/cases/variable_or_module/src/power.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 // https://github.com/gleam-lang/gleam/issues/807 2 5 pub type Power { 3 6 Power(value: Int)
+3
test-package-compiler/src/generated_tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 //! This file is generated by build.rs 2 5 //! Do not edit it directly, instead add new test cases to ./cases 3 6
+3
test-package-compiler/src/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod generated_tests; 3 6
+4 -4
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__alias_unqualified_import.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 9 - <85 byte binary> 9 + <97 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one.erl 12 12 -module(one). ··· 17 17 18 18 -type empty() :: empty. 19 19 20 - -file("src/one.gleam", 2). 20 + -file("src/one.gleam", 5). 21 21 -spec id(I) -> I. 22 22 id(X) -> 23 23 X. ··· 27 27 <.cache binary> 28 28 29 29 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 30 - <96 byte binary> 30 + <108 byte binary> 31 31 32 32 //// /out/lib/the_package/_gleam_artefacts/two.erl 33 33 -module(two). ··· 35 35 -define(FILEPATH, "src/two.gleam"). 36 36 -export([make/0]). 37 37 38 - -file("src/two.gleam", 4). 38 + -file("src/two.gleam", 7). 39 39 -spec make() -> one:empty(). 40 40 make() -> 41 41 one:id(empty).
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__dev_importing_test.snap
··· 3 3 expression: "./cases/dev_importing_test" 4 4 --- 5 5 error: Dev importing test module 6 - ┌─ dev/one.gleam:3:1 6 + ┌─ dev/one.gleam:6:1 7 7 8 - 3 │ import two 8 + 6 │ import two 9 9 │ ^ Imported here 10 10 11 11 The development module `one` is importing the test module `two`.
+8 -8
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__empty_module_warning.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/empty.cache_meta 9 - <53 byte binary> 9 + <65 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/empty.erl 12 12 -module(empty). ··· 16 16 <.cache binary> 17 17 18 18 //// /out/lib/the_package/_gleam_artefacts/internal.cache_meta 19 - <69 byte binary> 19 + <81 byte binary> 20 20 21 21 //// /out/lib/the_package/_gleam_artefacts/internal.erl 22 22 -module(internal). ··· 32 32 -define(DOC(Str), -compile([])). 33 33 -endif. 34 34 35 - -file("src/internal.gleam", 2). 35 + -file("src/internal.gleam", 5). 36 36 ?DOC(false). 37 37 -spec private_function() -> nil. 38 38 private_function() -> ··· 43 43 <.cache binary> 44 44 45 45 //// /out/lib/the_package/_gleam_artefacts/private.cache_meta 46 - <65 byte binary> 46 + <77 byte binary> 47 47 48 48 //// /out/lib/the_package/_gleam_artefacts/private.erl 49 49 -module(private). ··· 53 53 <.cache binary> 54 54 55 55 //// /out/lib/the_package/_gleam_artefacts/public.cache_meta 56 - <65 byte binary> 56 + <77 byte binary> 57 57 58 58 //// /out/lib/the_package/_gleam_artefacts/public.erl 59 59 -module(public). ··· 61 61 -define(FILEPATH, "src/public.gleam"). 62 62 -export([main/0]). 63 63 64 - -file("src/public.gleam", 1). 64 + -file("src/public.gleam", 4). 65 65 -spec main() -> binary(). 66 66 main() -> 67 67 <<"This module has public definitions"/utf8>>. ··· 91 91 92 92 //// Warning 93 93 warning: Unused private function 94 - ┌─ src/private.gleam:1:1 94 + ┌─ src/private.gleam:4:1 95 95 96 - 1 │ fn private_function() -> Nil { 96 + 4 │ fn private_function() -> Nil { 97 97 │ ^ This private function is never used 98 98 99 99 Hint: You can safely remove it.
+1 -1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/main.cache_meta 9 - <57 byte binary> 9 + <69 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/main.erl 12 12 -module(main).
+1 -1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation_with_argument.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/main.cache_meta 9 - <57 byte binary> 9 + <69 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/main.erl 12 12 -module(main).
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_bug_752.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 9 - <65 byte binary> 9 + <77 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one.erl 12 12 -module(one). ··· 23 23 <.cache binary> 24 24 25 25 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 26 - <92 byte binary> 26 + <104 byte binary> 27 27 28 28 //// /out/lib/the_package/_gleam_artefacts/two.erl 29 29 -module(two).
+1 -1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_empty.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/empty.cache_meta 9 - <57 byte binary> 9 + <69 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/empty.erl 12 12 -module(empty).
+7 -7
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_escape_names.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 9 - <69 byte binary> 9 + <81 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one.erl 12 12 -module(one). ··· 14 14 -define(FILEPATH, "src/one.gleam"). 15 15 -export(['receive'/1]). 16 16 17 - -file("src/one.gleam", 2). 17 + -file("src/one.gleam", 5). 18 18 -spec 'receive'(I) -> I. 19 19 'receive'(X) -> 20 20 X. ··· 24 24 <.cache binary> 25 25 26 26 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 27 - <144 byte binary> 27 + <156 byte binary> 28 28 29 29 //// /out/lib/the_package/_gleam_artefacts/two.erl 30 30 -module(two). ··· 32 32 -define(FILEPATH, "src/two.gleam"). 33 33 -export([qualified_call/0, qualified_value/0, unqualified_call/0, unqualified_value/0]). 34 34 35 - -file("src/two.gleam", 4). 35 + -file("src/two.gleam", 7). 36 36 -spec qualified_call() -> integer(). 37 37 qualified_call() -> 38 38 one:'receive'(1). 39 39 40 - -file("src/two.gleam", 8). 40 + -file("src/two.gleam", 11). 41 41 -spec qualified_value() -> fun((Q) -> Q). 42 42 qualified_value() -> 43 43 fun one:'receive'/1. 44 44 45 - -file("src/two.gleam", 12). 45 + -file("src/two.gleam", 15). 46 46 -spec unqualified_call() -> integer(). 47 47 unqualified_call() -> 48 48 one:'receive'(1). 49 49 50 - -file("src/two.gleam", 16). 50 + -file("src/two.gleam", 19). 51 51 -spec unqualified_value() -> fun((S) -> S). 52 52 unqualified_value() -> 53 53 fun one:'receive'/1.
+3 -3
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 9 - <96 byte binary> 9 + <108 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one.erl 12 12 -module(one). ··· 14 14 -define(FILEPATH, "src/one.gleam"). 15 15 -export([unbox/1]). 16 16 17 - -file("src/one.gleam", 3). 17 + -file("src/one.gleam", 6). 18 18 -spec unbox(two:box()) -> integer(). 19 19 unbox(X) -> 20 20 {box, I} = X, ··· 25 25 <.cache binary> 26 26 27 27 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 28 - <65 byte binary> 28 + <77 byte binary> 29 29 30 30 //// /out/lib/the_package/_gleam_artefacts/two.erl 31 31 -module(two).
+3 -3
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import_shadowing_prelude.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 9 - <69 byte binary> 9 + <81 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one.erl 12 12 -module(one). ··· 23 23 <.cache binary> 24 24 25 25 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 26 - <96 byte binary> 26 + <108 byte binary> 27 27 28 28 //// /out/lib/the_package/_gleam_artefacts/two.erl 29 29 -module(two). ··· 31 31 -define(FILEPATH, "src/two.gleam"). 32 32 -export([main/0]). 33 33 34 - -file("src/two.gleam", 4). 34 + -file("src/two.gleam", 7). 35 35 -spec main() -> one:error(). 36 36 main() -> 37 37 error.
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta 9 - <65 byte binary> 9 + <77 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one@two.erl 12 12 -module(one@two). ··· 14 14 -define(FILEPATH, "src/one/two.gleam"). 15 15 -export([main/0]). 16 16 17 - -file("src/one/two.gleam", 1). 17 + -file("src/one/two.gleam", 4). 18 18 -spec main() -> binary(). 19 19 main() -> 20 20 <<"Hi there"/utf8>>.
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested_qualified_constant.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta 9 - <65 byte binary> 9 + <77 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one@two.erl 12 12 -module(one@two). ··· 23 23 <.cache binary> 24 24 25 25 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 26 - <108 byte binary> 26 + <120 byte binary> 27 27 28 28 //// /out/lib/the_package/_gleam_artefacts/two.erl 29 29 -module(two).
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_unrelated_modules.snap
··· 3 3 expression: "./cases/errors_from_unrelated_modules" 4 4 --- 5 5 error: Type mismatch 6 - ┌─ src/one.gleam:2:7 6 + ┌─ src/one.gleam:5:7 7 7 8 - 2 │ 1 + True 8 + 5 │ 1 + True 9 9 │ ^ 10 10 11 11 The + operator expects arguments of this type:
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__hello_joe.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/hello_joe.cache_meta 9 - <65 byte binary> 9 + <77 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/hello_joe.erl 12 12 -module(hello_joe). ··· 14 14 -define(FILEPATH, "src/hello_joe.gleam"). 15 15 -export([main/0]). 16 16 17 - -file("src/hello_joe.gleam", 1). 17 + -file("src/hello_joe.gleam", 4). 18 18 -spec main() -> binary(). 19 19 main() -> 20 20 <<"Hello, Joe!"/utf8>>.
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle.snap
··· 3 3 expression: "./cases/import_cycle" 4 4 --- 5 5 error: Import cycle 6 - ┌─ src/one.gleam:1:1 6 + ┌─ src/one.gleam:4:1 7 7 8 - 1 │ import one 8 + 4 │ import one 9 9 │ ^ Imported here 10 10 11 11 The import statements for these modules form a cycle:
+6 -6
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle_multi.snap
··· 3 3 expression: "./cases/import_cycle_multi" 4 4 --- 5 5 error: Import cycle 6 - ┌─ src/three.gleam:1:1 6 + ┌─ src/three.gleam:4:1 7 7 8 - 1 │ import one 8 + 4 │ import one 9 9 │ ^ Imported here 10 10 11 - ┌─ src/two.gleam:1:1 11 + ┌─ src/two.gleam:4:1 12 12 13 - 1 │ import three 13 + 4 │ import three 14 14 │ ------------ Imported here 15 15 16 - ┌─ src/one.gleam:1:1 16 + ┌─ src/one.gleam:4:1 17 17 18 - 1 │ import two 18 + 4 │ import two 19 19 │ ---------- Imported here 20 20 21 21 The import statements for these modules form a cycle:
+11 -11
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_shadowed_name_warning.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 9 - <65 byte binary> 9 + <77 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one.erl 12 12 -module(one). ··· 23 23 <.cache binary> 24 24 25 25 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 26 - <128 byte binary> 26 + <140 byte binary> 27 27 28 28 //// /out/lib/the_package/_gleam_artefacts/two.erl 29 29 -module(two). ··· 44 44 45 45 -type shadowing() :: port. 46 46 47 - -file("src/two.gleam", 14). 47 + -file("src/two.gleam", 17). 48 48 -spec use_type(one:port_()) -> nil. 49 49 use_type(Port) -> 50 50 wibble:wobble(Port). ··· 63 63 64 64 //// Warning 65 65 warning: Unused private constructor 66 - ┌─ src/two.gleam:9:3 67 - 68 - 9 │ Port 69 - │ ^ This private constructor is never used 66 + ┌─ src/two.gleam:12:3 67 + 68 + 12 │ Port 69 + │ ^ This private constructor is never used 70 70 71 71 Hint: You can safely remove it. 72 72 ··· 74 74 75 75 //// Warning 76 76 warning: Unused private type 77 - ┌─ src/two.gleam:7:1 78 - 79 - 7 │ type Shadowing { 80 - │ ^ This private type is never used 77 + ┌─ src/two.gleam:10:1 78 + 79 + 10 │ type Shadowing { 80 + │ ^ This private type is never used 81 81 82 82 Hint: You can safely remove it.
+12 -12
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_constants.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 9 - <97 byte binary> 9 + <109 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one.erl 12 12 -module(one). ··· 27 27 <.cache binary> 28 28 29 29 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 30 - <332 byte binary> 30 + <344 byte binary> 31 31 32 32 //// /out/lib/the_package/_gleam_artefacts/two.erl 33 33 -module(two). ··· 43 43 -define(DOC(Str), -compile([])). 44 44 -endif. 45 45 46 - -file("src/two.gleam", 6). 46 + -file("src/two.gleam", 9). 47 47 -spec qualified_fn_a() -> one:a(). 48 48 qualified_fn_a() -> 49 49 a. 50 50 51 - -file("src/two.gleam", 12). 51 + -file("src/two.gleam", 15). 52 52 -spec qualified_fn_b() -> one:b(). 53 53 qualified_fn_b() -> 54 54 {b, a, a}. 55 55 56 - -file("src/two.gleam", 19). 56 + -file("src/two.gleam", 22). 57 57 -spec unqualified_fn_a() -> one:a(). 58 58 unqualified_fn_a() -> 59 59 a. 60 60 61 - -file("src/two.gleam", 25). 61 + -file("src/two.gleam", 28). 62 62 -spec unqualified_fn_b() -> one:b(). 63 63 unqualified_fn_b() -> 64 64 {b, a, a}. 65 65 66 - -file("src/two.gleam", 33). 66 + -file("src/two.gleam", 36). 67 67 -spec aliased_fn_a() -> one:a(). 68 68 aliased_fn_a() -> 69 69 a. 70 70 71 - -file("src/two.gleam", 39). 71 + -file("src/two.gleam", 42). 72 72 -spec aliased_fn_b() -> one:b(). 73 73 aliased_fn_b() -> 74 74 {b, a, a}. 75 75 76 - -file("src/two.gleam", 45). 76 + -file("src/two.gleam", 48). 77 77 ?DOC( 78 78 " For these statements we use the accessors for the record from the other\n" 79 79 " module\n" ··· 84 84 Score = erlang:element(3, User), 85 85 {Name, Score}. 86 86 87 - -file("src/two.gleam", 52). 87 + -file("src/two.gleam", 55). 88 88 ?DOC(" For these statements we use destructure the record\n"). 89 89 -spec destructure_qualified(one:user()) -> {binary(), integer()}. 90 90 destructure_qualified(User) -> 91 91 {user, Name, Score} = User, 92 92 {Name, Score}. 93 93 94 - -file("src/two.gleam", 57). 94 + -file("src/two.gleam", 60). 95 95 -spec destructure_unqualified(one:user()) -> {binary(), integer()}. 96 96 destructure_unqualified(User) -> 97 97 {user, Name, Score} = User, 98 98 {Name, Score}. 99 99 100 - -file("src/two.gleam", 62). 100 + -file("src/two.gleam", 65). 101 101 -spec destructure_aliased(one:user()) -> {binary(), integer()}. 102 102 destructure_aliased(User) -> 103 103 {user, Name, Score} = User,
+21 -21
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_external_fns.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one.cache_meta 9 - <77 byte binary> 9 + <89 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one.erl 12 12 -module(one). ··· 14 14 -define(FILEPATH, "src/one.gleam"). 15 15 -export([thing/0, escaped_thing/0]). 16 16 17 - -file("src/one.gleam", 2). 17 + -file("src/one.gleam", 5). 18 18 -spec thing() -> nil. 19 19 thing() -> 20 20 thing:new(). 21 21 22 - -file("src/one.gleam", 6). 22 + -file("src/one.gleam", 9). 23 23 -spec escaped_thing() -> nil. 24 24 escaped_thing() -> 25 25 'the.thing':'make.new'(). ··· 29 29 <.cache binary> 30 30 31 31 //// /out/lib/the_package/_gleam_artefacts/three.cache_meta 32 - <77 byte binary> 32 + <89 byte binary> 33 33 34 34 //// /out/lib/the_package/_gleam_artefacts/three.erl 35 35 -module(three). ··· 37 37 -define(FILEPATH, "src/three.gleam"). 38 38 -export([thing/0, escaped_thing/0]). 39 39 40 - -file("src/three.gleam", 2). 40 + -file("src/three.gleam", 5). 41 41 -spec thing() -> nil. 42 42 thing() -> 43 43 thing:new(). 44 44 45 - -file("src/three.gleam", 6). 45 + -file("src/three.gleam", 9). 46 46 -spec escaped_thing() -> nil. 47 47 escaped_thing() -> 48 48 'the.thing':'make.new'(). ··· 52 52 <.cache binary> 53 53 54 54 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 55 - <489 byte binary> 55 + <501 byte binary> 56 56 57 57 //// /out/lib/the_package/_gleam_artefacts/two.erl 58 58 -module(two). ··· 60 60 -define(FILEPATH, "src/two.gleam"). 61 61 -export([the_consts/0, 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, argument_reference_qualified/0, argument_reference_qualified_aliased/0, argument_reference_unqualified/0, argument_reference_unqualified_aliased/0]). 62 62 63 - -file("src/two.gleam", 24). 63 + -file("src/two.gleam", 27). 64 64 -spec the_consts() -> nil. 65 65 the_consts() -> 66 66 _ = fun thing:new/0, ··· 80 80 'the.thing':'make.new'(), 81 81 'the.thing':'make.new'(). 82 82 83 - -file("src/two.gleam", 45). 83 + -file("src/two.gleam", 48). 84 84 -spec fn_reference_qualified() -> fun(() -> nil). 85 85 fn_reference_qualified() -> 86 86 fun thing:new/0. 87 87 88 - -file("src/two.gleam", 49). 88 + -file("src/two.gleam", 52). 89 89 -spec fn_reference_qualified_aliased() -> fun(() -> nil). 90 90 fn_reference_qualified_aliased() -> 91 91 fun thing:new/0. 92 92 93 - -file("src/two.gleam", 53). 93 + -file("src/two.gleam", 56). 94 94 -spec fn_reference_unqualified() -> fun(() -> nil). 95 95 fn_reference_unqualified() -> 96 96 fun thing:new/0. 97 97 98 - -file("src/two.gleam", 57). 98 + -file("src/two.gleam", 60). 99 99 -spec fn_reference_unqualified_aliased() -> fun(() -> nil). 100 100 fn_reference_unqualified_aliased() -> 101 101 fun thing:new/0. 102 102 103 - -file("src/two.gleam", 63). 103 + -file("src/two.gleam", 66). 104 104 -spec fn_call_qualified() -> nil. 105 105 fn_call_qualified() -> 106 106 thing:new(). 107 107 108 - -file("src/two.gleam", 67). 108 + -file("src/two.gleam", 70). 109 109 -spec fn_call_qualified_aliased() -> nil. 110 110 fn_call_qualified_aliased() -> 111 111 thing:new(). 112 112 113 - -file("src/two.gleam", 71). 113 + -file("src/two.gleam", 74). 114 114 -spec fn_call_unqualified() -> nil. 115 115 fn_call_unqualified() -> 116 116 thing:new(). 117 117 118 - -file("src/two.gleam", 75). 118 + -file("src/two.gleam", 78). 119 119 -spec fn_call_unqualified_aliased() -> nil. 120 120 fn_call_unqualified_aliased() -> 121 121 thing:new(). 122 122 123 - -file("src/two.gleam", 97). 123 + -file("src/two.gleam", 100). 124 124 -spec x(any()) -> nil. 125 125 x(_) -> 126 126 nil. 127 127 128 - -file("src/two.gleam", 81). 128 + -file("src/two.gleam", 84). 129 129 -spec argument_reference_qualified() -> nil. 130 130 argument_reference_qualified() -> 131 131 x(fun 'the.thing':'make.new'/0). 132 132 133 - -file("src/two.gleam", 85). 133 + -file("src/two.gleam", 88). 134 134 -spec argument_reference_qualified_aliased() -> nil. 135 135 argument_reference_qualified_aliased() -> 136 136 x(fun 'the.thing':'make.new'/0). 137 137 138 - -file("src/two.gleam", 89). 138 + -file("src/two.gleam", 92). 139 139 -spec argument_reference_unqualified() -> nil. 140 140 argument_reference_unqualified() -> 141 141 x(fun 'the.thing':'make.new'/0). 142 142 143 - -file("src/two.gleam", 93). 143 + -file("src/two.gleam", 96). 144 144 -spec argument_reference_unqualified_aliased() -> nil. 145 145 argument_reference_unqualified_aliased() -> 146 146 x(fun 'the.thing':'make.new'/0).
+20 -20
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_record_constructors.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one@one.cache_meta 9 - <97 byte binary> 9 + <109 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/one@one.erl 12 12 -module(one@one). ··· 27 27 <.cache binary> 28 28 29 29 //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta 30 - <97 byte binary> 30 + <109 byte binary> 31 31 32 32 //// /out/lib/the_package/_gleam_artefacts/one@two.erl 33 33 -module(one@two). ··· 48 48 <.cache binary> 49 49 50 50 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 51 - <499 byte binary> 51 + <511 byte binary> 52 52 53 53 //// /out/lib/the_package/_gleam_artefacts/two.erl 54 54 -module(two). ··· 64 64 -define(DOC(Str), -compile([])). 65 65 -endif. 66 66 67 - -file("src/two.gleam", 7). 67 + -file("src/two.gleam", 10). 68 68 -spec qualified_fn_a() -> one@one:a(). 69 69 qualified_fn_a() -> 70 70 a. 71 71 72 - -file("src/two.gleam", 13). 72 + -file("src/two.gleam", 16). 73 73 -spec qualified_fn_b() -> one@one:b(). 74 74 qualified_fn_b() -> 75 75 {b, a, a}. 76 76 77 - -file("src/two.gleam", 19). 77 + -file("src/two.gleam", 22). 78 78 -spec qualified_aliased_fn_a() -> one@two:a(). 79 79 qualified_aliased_fn_a() -> 80 80 a. 81 81 82 - -file("src/two.gleam", 25). 82 + -file("src/two.gleam", 28). 83 83 -spec qualified_aliased_fn_b() -> one@two:b(). 84 84 qualified_aliased_fn_b() -> 85 85 {b, a, a}. 86 86 87 - -file("src/two.gleam", 32). 87 + -file("src/two.gleam", 35). 88 88 -spec unqualified_fn_a() -> one@one:a(). 89 89 unqualified_fn_a() -> 90 90 a. 91 91 92 - -file("src/two.gleam", 38). 92 + -file("src/two.gleam", 41). 93 93 -spec unqualified_fn_b() -> one@one:b(). 94 94 unqualified_fn_b() -> 95 95 {b, a, a}. 96 96 97 - -file("src/two.gleam", 46). 97 + -file("src/two.gleam", 49). 98 98 -spec aliased_fn_a() -> one@one:a(). 99 99 aliased_fn_a() -> 100 100 a. 101 101 102 - -file("src/two.gleam", 52). 102 + -file("src/two.gleam", 55). 103 103 -spec aliased_fn_b() -> one@one:b(). 104 104 aliased_fn_b() -> 105 105 {b, a, a}. 106 106 107 - -file("src/two.gleam", 58). 107 + -file("src/two.gleam", 61). 108 108 ?DOC( 109 109 " For these statements we use the accessors for the record from the other\n" 110 110 " module\n" ··· 115 115 Score = erlang:element(3, User), 116 116 {Name, Score}. 117 117 118 - -file("src/two.gleam", 65). 118 + -file("src/two.gleam", 68). 119 119 ?DOC(" For these statements we use destructure the record\n"). 120 120 -spec destructure_qualified(one@one:user()) -> {binary(), integer()}. 121 121 destructure_qualified(User) -> 122 122 {user, Name, Score} = User, 123 123 {Name, Score}. 124 124 125 - -file("src/two.gleam", 70). 125 + -file("src/two.gleam", 73). 126 126 -spec destructure_qualified_aliased(one@two:user()) -> {binary(), integer()}. 127 127 destructure_qualified_aliased(User) -> 128 128 {user, Name, Score} = User, 129 129 {Name, Score}. 130 130 131 - -file("src/two.gleam", 75). 131 + -file("src/two.gleam", 78). 132 132 -spec destructure_unqualified(one@one:user()) -> {binary(), integer()}. 133 133 destructure_unqualified(User) -> 134 134 {user, Name, Score} = User, 135 135 {Name, Score}. 136 136 137 - -file("src/two.gleam", 80). 137 + -file("src/two.gleam", 83). 138 138 -spec destructure_aliased(one@one:user()) -> {binary(), integer()}. 139 139 destructure_aliased(User) -> 140 140 {user, Name, Score} = User, 141 141 {Name, Score}. 142 142 143 - -file("src/two.gleam", 86). 143 + -file("src/two.gleam", 89). 144 144 ?DOC(" For these statements we use update the record\n"). 145 145 -spec update_qualified(one@one:user()) -> one@one:user(). 146 146 update_qualified(User) -> 147 147 {user, <<"wibble"/utf8>>, erlang:element(3, User)}. 148 148 149 - -file("src/two.gleam", 90). 149 + -file("src/two.gleam", 93). 150 150 -spec update_qualified_aliased(one@two:user()) -> one@two:user(). 151 151 update_qualified_aliased(User) -> 152 152 {user, <<"wibble"/utf8>>, erlang:element(3, User)}. 153 153 154 - -file("src/two.gleam", 94). 154 + -file("src/two.gleam", 97). 155 155 -spec update_unqualified(one@one:user()) -> one@one:user(). 156 156 update_unqualified(User) -> 157 157 {user, <<"wibble"/utf8>>, erlang:element(3, User)}. 158 158 159 - -file("src/two.gleam", 98). 159 + -file("src/two.gleam", 101). 160 160 -spec update_aliased(one@one:user()) -> one@one:user(). 161 161 update_aliased(User) -> 162 162 {user, <<"wibble"/utf8>>, erlang:element(3, User)}.
+1 -1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_d_ts.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/hello.cache_meta 9 - <81 byte binary> 9 + <93 byte binary> 10 10 11 11 //// /out/lib/the_package/gleam.d.mts 12 12 export * from "../prelude.mjs";
+1 -1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_empty.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/empty.cache_meta 9 - <57 byte binary> 9 + <69 byte binary> 10 10 11 11 //// /out/lib/the_package/empty.mjs 12 12 export {}
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_import.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta 9 - <65 byte binary> 9 + <77 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/two.cache 12 12 <.cache binary> 13 13 14 14 //// /out/lib/the_package/_gleam_artefacts/two.cache_meta 15 - <88 byte binary> 15 + <100 byte binary> 16 16 17 17 //// /out/lib/the_package/gleam.d.mts 18 18 export * from "../prelude.mjs";
+5 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_sourcemaps.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/hello.cache_meta 9 - <81 byte binary> 9 + <93 byte binary> 10 10 11 11 //// /out/lib/the_package/gleam.mjs 12 12 export * from "../prelude.mjs"; 13 13 14 14 15 15 //// /out/lib/the_package/hello.gleam 16 + // SPDX-License-Identifier: Apache-2.0 17 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 18 + 16 19 pub type Wibble { 17 20 Woo 18 21 } ··· 37 40 38 41 39 42 //// /out/lib/the_package/hello.mjs.map 40 - {"version":3,"file":"hello.mjs","sources":["hello.gleam"],"names":[],"mappings":";;;AAAA,AACE;AAAA;;AAAA,4DACD;;AAED;EACE;CACD"} 43 + {"version":3,"file":"hello.mjs","sources":["hello.gleam"],"names":[],"mappings":";;;AAGA,AACE;AAAA;;AAAA,4DACD;;AAED;EACE;CACD"}
+1 -1
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__not_overwriting_erlang_module.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/app@code.cache_meta 9 - <73 byte binary> 9 + <85 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/app@code.erl 12 12 -module(app@code).
+8 -8
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_accessor.snap
··· 3 3 expression: "./cases/opaque_type_accessor" 4 4 --- 5 5 error: Unknown record field 6 - ┌─ src/two.gleam:7:19 7 - 8 - 7 │ let name = user.name 9 - │ ^ This field does not exist 6 + ┌─ src/two.gleam:10:19 7 + 8 + 10 │ let name = user.name 9 + │ ^ This field does not exist 10 10 11 11 The value being accessed has this type: 12 12 ··· 15 15 It does not have any fields. 16 16 17 17 error: Unknown record field 18 - ┌─ src/two.gleam:8:20 19 - 20 - 8 │ let score = user.score 21 - │ ^ This field does not exist 18 + ┌─ src/two.gleam:11:20 19 + 20 + 11 │ let score = user.score 21 + │ ^ This field does not exist 22 22 23 23 The value being accessed has this type: 24 24
+4 -4
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_destructure.snap
··· 3 3 expression: "./cases/opaque_type_destructure" 4 4 --- 5 5 error: Unknown module value 6 - ┌─ src/two.gleam:7:7 7 - 8 - 7 │ let one.User(name: name, score: score) = user 9 - │ ^ 6 + ┌─ src/two.gleam:10:7 7 + 8 + 10 │ let one.User(name: name, score: score) = user 9 + │ ^ 10 10 11 11 The module `one` does not have a `User` value.
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_dev.snap
··· 3 3 expression: "./cases/src_importing_dev" 4 4 --- 5 5 error: App importing dev module 6 - ┌─ src/one.gleam:3:1 6 + ┌─ src/one.gleam:6:1 7 7 8 - 3 │ import two 8 + 6 │ import two 9 9 │ ^ Imported here 10 10 11 11 The application module `one` is importing the development module `two`.
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_test.snap
··· 3 3 expression: "./cases/src_importing_test" 4 4 --- 5 5 error: App importing test module 6 - ┌─ src/one.gleam:3:1 6 + ┌─ src/one.gleam:6:1 7 7 8 - 3 │ import two 8 + 6 │ import two 9 9 │ ^ Imported here 10 10 11 11 The application module `one` is importing the test module `two`.
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_constant.snap
··· 3 3 expression: "./cases/unknown_module_field_in_constant" 4 4 --- 5 5 error: Unknown module value 6 - ┌─ src/two.gleam:3:16 6 + ┌─ src/two.gleam:6:16 7 7 8 - 3 │ pub const it = one.B 8 + 6 │ pub const it = one.B 9 9 │ ^ Did you mean `A`? 10 10 11 11 The module `one` does not have a `B` value.
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_expression.snap
··· 3 3 expression: "./cases/unknown_module_field_in_expression" 4 4 --- 5 5 error: Unknown module value 6 - ┌─ src/two.gleam:4:7 6 + ┌─ src/two.gleam:7:7 7 7 8 - 4 │ one.B 8 + 7 │ one.B 9 9 │ ^ Did you mean `A`? 10 10 11 11 The module `one` does not have a `B` value.
+2 -2
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_import.snap
··· 3 3 expression: "./cases/unknown_module_field_in_import" 4 4 --- 5 5 error: Unknown module value 6 - ┌─ src/two.gleam:1:13 6 + ┌─ src/two.gleam:4:13 7 7 8 - 1 │ import one.{B} 8 + 4 │ import one.{B} 9 9 │ ^ Did you mean `A`? 10 10 11 11 The module `one` does not have a `B` value.
+5 -5
test-package-compiler/src/snapshots/test_package_compiler__generated_tests__variable_or_module.snap
··· 6 6 <.cache binary> 7 7 8 8 //// /out/lib/the_package/_gleam_artefacts/main.cache_meta 9 - <126 byte binary> 9 + <138 byte binary> 10 10 11 11 //// /out/lib/the_package/_gleam_artefacts/main.erl 12 12 -module(main). ··· 14 14 -define(FILEPATH, "src/main.gleam"). 15 15 -export([module_function/1, record_field/1]). 16 16 17 - -file("src/main.gleam", 4). 17 + -file("src/main.gleam", 7). 18 18 -spec module_function(power:power()) -> integer(). 19 19 module_function(Power) -> 20 20 power:to_int(Power). 21 21 22 - -file("src/main.gleam", 10). 22 + -file("src/main.gleam", 13). 23 23 -spec record_field(power:power()) -> integer(). 24 24 record_field(Power) -> 25 25 erlang:element(2, Power). ··· 29 29 <.cache binary> 30 30 31 31 //// /out/lib/the_package/_gleam_artefacts/power.cache_meta 32 - <85 byte binary> 32 + <97 byte binary> 33 33 34 34 //// /out/lib/the_package/_gleam_artefacts/power.erl 35 35 -module(power). ··· 40 40 41 41 -type power() :: {power, integer()}. 42 42 43 - -file("src/power.gleam", 6). 43 + -file("src/power.gleam", 9). 44 44 -spec to_int(power()) -> integer(). 45 45 to_int(P) -> 46 46 erlang:element(2, P) * 9000.
+3
test-project-compiler/Cargo.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 [package] 2 5 name = "test-project-compiler" 3 6 version = "1.17.0"
+7 -1
test-project-compiler/build.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 use std::path::PathBuf; 2 5 3 6 pub fn main() { 4 7 println!("cargo:rerun-if-changed=cases"); 5 8 6 - let mut module = "//! This file is generated by build.rs 9 + let mut module = "// SPDX-License-Identifier: Apache-2.0 10 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 11 + 12 + //! This file is generated by build.rs 7 13 //! Do not edit it directly, instead add new test cases to ./cases 8 14 9 15 use gleam_core::build::Mode;
+3
test-project-compiler/cases/erlang_source_maps/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "example" 2 5 version = "1.0.0" 3 6 target = "erlang"
+3
test-project-compiler/cases/erlang_source_maps/src/example.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 0 3 6 }
+3
test-project-compiler/cases/erlang_typescript_declarations/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 name = "example" 2 5 version = "1.0.0" 3 6 target = "erlang"
+3
test-project-compiler/cases/erlang_typescript_declarations/src/example.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 0 3 6 }
+3
test-project-compiler/cases/javascript_source_maps/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "example" 2 5 version = "1.0.0" 3 6 target = "javascript"
+3
test-project-compiler/cases/javascript_source_maps/src/example.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 0 3 6 }
+3
test-project-compiler/cases/javascript_typescript_declarations/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "example" 2 5 version = "1.0.0" 3 6 target = "javascript"
+3
test-project-compiler/cases/javascript_typescript_declarations/src/example.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 0 3 6 }
+3
test-project-compiler/cases/with_dep/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "example" 2 5 version = "1.0.0" 3 6
+3
test-project-compiler/cases/with_dep/src/example.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 0 3 6 }
+3
test-project-compiler/cases/with_dev_dep/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "example" 2 5 version = "1.0.0" 3 6
+3
test-project-compiler/cases/with_dev_dep/src/example.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 0 3 6 }
+3
test-project-compiler/src/generated_tests.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 //! This file is generated by build.rs 2 5 //! Do not edit it directly, instead add new test cases to ./cases 3 6
+3
test-project-compiler/src/lib.rs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 #[cfg(test)] 2 5 mod generated_tests; 3 6
+3
test-project-compiler/support/package_a/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "package_a" 2 5 version = "1.0.0" 3 6
+3
test-project-compiler/support/package_a/src/package_a.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 "package_a" 3 6 }
+3
test/assert/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "project" 2 5 version = "1.0.0" 3 6 description = "A Gleam project"
+3
test/assert/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/assert/run_tests.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 #/usr/bin/env sh 2 5 3 6 set -eu
+3
test/assert/src/failing1.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 let x = True 3 6 assert !x
+3
test/assert/src/failing2.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/int 2 5 3 6 pub fn main() {
+3
test/assert/src/failing3.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/bool 2 5 import gleam/result 3 6
+3
test/assert/src/failing4.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/int 2 5 3 6 pub fn main() {
+3
test/assert/src/passing.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/bool 2 5 import gleam/int 3 6 import gleam/result
+3
test/compile_package0/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "package" 2 5 version = "1.0.0"
+3
test/compile_package0/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/compile_package0/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 pub fn hello() -> String { 2 5 "Hello" 3 6 }
+3
test/compile_package0/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import one 2 5 3 6 pub fn main() -> String {
+3
test/compile_package0/test/three.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import one 2 5 import two 3 6
+3
test/compile_package1/app1/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "app1" 2 5 version = "1.0.0"
+3
test/compile_package1/app1/src/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 pub fn hello() -> String { 2 5 "Hello" 3 6 }
+3
test/compile_package1/app1/src/one/nested.gleam
··· 1 1 //// This module is used to test resolution of nested modules 2 2 3 + // SPDX-License-Identifier: Apache-2.0 4 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 5 + 3 6 pub fn id(a) { 4 7 a 5 8 }
+3
test/compile_package1/app2/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "app2" 2 5 version = "1.0.0"
+3
test/compile_package1/app2/src/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import one 2 5 import one/nested 3 6
+3
test/erlang_shipment_no_dev_deps/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 name = "shipment_test" 2 5 version = "0.1.0" 3 6
+3
test/erlang_shipment_no_dev_deps/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/erlang_shipment_no_dev_deps/src/shipment_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test/erlang_shipment_no_dev_deps/test.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 set -eu
+3
test/errors/type_unify_int_string/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "type_unify_int_string" 2 5 3 6 # [docs]
+3
test/errors/type_unify_int_string/src/type_unify_int_string.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 pub fn hello_world() { 2 5 let x: Int = "Eh?" 3 6 x
+5
test/external_only_erlang/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2024 The Gleam contributors 4 + --> 5 + 1 6 # external_only_erlang 2 7 3 8 A project that can only be run on Erlang due to an external function.
+3
test/external_only_erlang/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "external_only_erlang" 2 5 version = "1.0.0" 3 6 target = "erlang"
+3
test/external_only_erlang/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/external_only_erlang/src/external_only_erlang.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 // This function is only implemented for Erlang, so if we try and call it from 2 5 // JavaScript, or build this package for JavaScript, then the compiler will 3 6 // (should) emit an error.
+3
test/external_only_erlang/src/external_only_erlang_ffi.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 -module(external_only_erlang_ffi). 2 5 -export([main/0]). 3 6
+3
test/external_only_erlang/test.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 set -eu
+5
test/external_only_javascript/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2024 The Gleam contributors 4 + --> 5 + 1 6 # external_only_javascript 2 7 3 8 A project that can only be run on JavaScript due to an external function.
+3
test/external_only_javascript/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "external_only_javascript" 2 5 version = "1.0.0" 3 6 target = "javascript"
+3
test/external_only_javascript/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/external_only_javascript/src/external_only_javascript.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 // This function is only implemented for JavaScript, so if we try and call it 2 5 // from Erlang, or build this package for Erlang, then the compiler will 3 6 // (should) emit an error.
+3
test/external_only_javascript/src/external_only_javascript_ffi.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 export function main() { 2 5 console.log("Hello"); 3 6 }
+3
test/external_only_javascript/test.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 set -eu
-191
test/hello_world/LICENSE
··· 1 - Apache License 2 - Version 2.0, January 2004 3 - http://www.apache.org/licenses/ 4 - 5 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 - 7 - 1. Definitions. 8 - 9 - "License" shall mean the terms and conditions for use, reproduction, 10 - and distribution as defined by Sections 1 through 9 of this document. 11 - 12 - "Licensor" shall mean the copyright owner or entity authorized by 13 - the copyright owner that is granting the License. 14 - 15 - "Legal Entity" shall mean the union of the acting entity and all 16 - other entities that control, are controlled by, or are under common 17 - control with that entity. For the purposes of this definition, 18 - "control" means (i) the power, direct or indirect, to cause the 19 - direction or management of such entity, whether by contract or 20 - otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 - outstanding shares, or (iii) beneficial ownership of such entity. 22 - 23 - "You" (or "Your") shall mean an individual or Legal Entity 24 - exercising permissions granted by this License. 25 - 26 - "Source" form shall mean the preferred form for making modifications, 27 - including but not limited to software source code, documentation 28 - source, and configuration files. 29 - 30 - "Object" form shall mean any form resulting from mechanical 31 - transformation or translation of a Source form, including but 32 - not limited to compiled object code, generated documentation, 33 - and conversions to other media types. 34 - 35 - "Work" shall mean the work of authorship, whether in Source or 36 - Object form, made available under the License, as indicated by a 37 - copyright notice that is included in or attached to the work 38 - (an example is provided in the Appendix below). 39 - 40 - "Derivative Works" shall mean any work, whether in Source or Object 41 - form, that is based on (or derived from) the Work and for which the 42 - editorial revisions, annotations, elaborations, or other modifications 43 - represent, as a whole, an original work of authorship. For the purposes 44 - of this License, Derivative Works shall not include works that remain 45 - separable from, or merely link (or bind by name) to the interfaces of, 46 - the Work and Derivative Works thereof. 47 - 48 - "Contribution" shall mean any work of authorship, including 49 - the original version of the Work and any modifications or additions 50 - to that Work or Derivative Works thereof, that is intentionally 51 - submitted to Licensor for inclusion in the Work by the copyright owner 52 - or by an individual or Legal Entity authorized to submit on behalf of 53 - the copyright owner. For the purposes of this definition, "submitted" 54 - means any form of electronic, verbal, or written communication sent 55 - to the Licensor or its representatives, including but not limited to 56 - communication on electronic mailing lists, source code control systems, 57 - and issue tracking systems that are managed by, or on behalf of, the 58 - Licensor for the purpose of discussing and improving the Work, but 59 - excluding communication that is conspicuously marked or otherwise 60 - designated in writing by the copyright owner as "Not a Contribution." 61 - 62 - "Contributor" shall mean Licensor and any individual or Legal Entity 63 - on behalf of whom a Contribution has been received by Licensor and 64 - subsequently incorporated within the Work. 65 - 66 - 2. Grant of Copyright License. Subject to the terms and conditions of 67 - this License, each Contributor hereby grants to You a perpetual, 68 - worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 - copyright license to reproduce, prepare Derivative Works of, 70 - publicly display, publicly perform, sublicense, and distribute the 71 - Work and such Derivative Works in Source or Object form. 72 - 73 - 3. Grant of Patent License. Subject to the terms and conditions of 74 - this License, each Contributor hereby grants to You a perpetual, 75 - worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 - (except as stated in this section) patent license to make, have made, 77 - use, offer to sell, sell, import, and otherwise transfer the Work, 78 - where such license applies only to those patent claims licensable 79 - by such Contributor that are necessarily infringed by their 80 - Contribution(s) alone or by combination of their Contribution(s) 81 - with the Work to which such Contribution(s) was submitted. If You 82 - institute patent litigation against any entity (including a 83 - cross-claim or counterclaim in a lawsuit) alleging that the Work 84 - or a Contribution incorporated within the Work constitutes direct 85 - or contributory patent infringement, then any patent licenses 86 - granted to You under this License for that Work shall terminate 87 - as of the date such litigation is filed. 88 - 89 - 4. Redistribution. You may reproduce and distribute copies of the 90 - Work or Derivative Works thereof in any medium, with or without 91 - modifications, and in Source or Object form, provided that You 92 - meet the following conditions: 93 - 94 - (a) You must give any other recipients of the Work or 95 - Derivative Works a copy of this License; and 96 - 97 - (b) You must cause any modified files to carry prominent notices 98 - stating that You changed the files; and 99 - 100 - (c) You must retain, in the Source form of any Derivative Works 101 - that You distribute, all copyright, patent, trademark, and 102 - attribution notices from the Source form of the Work, 103 - excluding those notices that do not pertain to any part of 104 - the Derivative Works; and 105 - 106 - (d) If the Work includes a "NOTICE" text file as part of its 107 - distribution, then any Derivative Works that You distribute must 108 - include a readable copy of the attribution notices contained 109 - within such NOTICE file, excluding those notices that do not 110 - pertain to any part of the Derivative Works, in at least one 111 - of the following places: within a NOTICE text file distributed 112 - as part of the Derivative Works; within the Source form or 113 - documentation, if provided along with the Derivative Works; or, 114 - within a display generated by the Derivative Works, if and 115 - wherever such third-party notices normally appear. The contents 116 - of the NOTICE file are for informational purposes only and 117 - do not modify the License. You may add Your own attribution 118 - notices within Derivative Works that You distribute, alongside 119 - or as an addendum to the NOTICE text from the Work, provided 120 - that such additional attribution notices cannot be construed 121 - as modifying the License. 122 - 123 - You may add Your own copyright statement to Your modifications and 124 - may provide additional or different license terms and conditions 125 - for use, reproduction, or distribution of Your modifications, or 126 - for any such Derivative Works as a whole, provided Your use, 127 - reproduction, and distribution of the Work otherwise complies with 128 - the conditions stated in this License. 129 - 130 - 5. Submission of Contributions. Unless You explicitly state otherwise, 131 - any Contribution intentionally submitted for inclusion in the Work 132 - by You to the Licensor shall be under the terms and conditions of 133 - this License, without any additional terms or conditions. 134 - Notwithstanding the above, nothing herein shall supersede or modify 135 - the terms of any separate license agreement you may have executed 136 - with Licensor regarding such Contributions. 137 - 138 - 6. Trademarks. This License does not grant permission to use the trade 139 - names, trademarks, service marks, or product names of the Licensor, 140 - except as required for reasonable and customary use in describing the 141 - origin of the Work and reproducing the content of the NOTICE file. 142 - 143 - 7. Disclaimer of Warranty. Unless required by applicable law or 144 - agreed to in writing, Licensor provides the Work (and each 145 - Contributor provides its Contributions) on an "AS IS" BASIS, 146 - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 - implied, including, without limitation, any warranties or conditions 148 - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 - PARTICULAR PURPOSE. You are solely responsible for determining the 150 - appropriateness of using or redistributing the Work and assume any 151 - risks associated with Your exercise of permissions under this License. 152 - 153 - 8. Limitation of Liability. In no event and under no legal theory, 154 - whether in tort (including negligence), contract, or otherwise, 155 - unless required by applicable law (such as deliberate and grossly 156 - negligent acts) or agreed to in writing, shall any Contributor be 157 - liable to You for damages, including any direct, indirect, special, 158 - incidental, or consequential damages of any character arising as a 159 - result of this License or out of the use or inability to use the 160 - Work (including but not limited to damages for loss of goodwill, 161 - work stoppage, computer failure or malfunction, or any and all 162 - other commercial damages or losses), even if such Contributor 163 - has been advised of the possibility of such damages. 164 - 165 - 9. Accepting Warranty or Additional Liability. While redistributing 166 - the Work or Derivative Works thereof, You may choose to offer, 167 - and charge a fee for, acceptance of support, warranty, indemnity, 168 - or other liability obligations and/or rights consistent with this 169 - License. However, in accepting such obligations, You may act only 170 - on Your own behalf and on Your sole responsibility, not on behalf 171 - of any other Contributor, and only if You agree to indemnify, 172 - defend, and hold each Contributor harmless for any liability 173 - incurred by, or claims asserted against, such Contributor by reason 174 - of your accepting any such warranty or additional liability. 175 - 176 - END OF TERMS AND CONDITIONS 177 - 178 - Copyright 2018, Louis Pilfold <louis@lpil.uk>. 179 - 180 - Licensed under the Apache License, Version 2.0 (the "License"); 181 - you may not use this file except in compliance with the License. 182 - You may obtain a copy of the License at 183 - 184 - http://www.apache.org/licenses/LICENSE-2.0 185 - 186 - Unless required by applicable law or agreed to in writing, software 187 - distributed under the License is distributed on an "AS IS" BASIS, 188 - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 189 - See the License for the specific language governing permissions and 190 - limitations under the License. 191 -
+5
test/hello_world/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2018 The Gleam contributors 4 + --> 5 + 1 6 hello_world 2 7 ===== 3 8
+3
test/hello_world/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2019 The Gleam contributors 3 + 1 4 name = "hello_world" 2 5 tool = "other"
+3
test/hello_world/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
-11
test/hello_world/rebar.config
··· 1 - {erl_opts, [debug_info]}. 2 - {src_dirs, ["src", "gen/src"]}. 3 - 4 - {profiles, [ 5 - {test, [ 6 - {src_dirs, ["src", "test", "gen/src", "gen/test"]} 7 - ]} 8 - ]}. 9 - 10 - {deps, [ 11 - ]}.
-1
test/hello_world/rebar.lock
··· 1 - [].
-15
test/hello_world/src/hello_world.app.src
··· 1 - {application, hello_world, 2 - [{description, "An OTP library"}, 3 - {vsn, "0.1.0"}, 4 - {registered, []}, 5 - {applications, 6 - [kernel, 7 - stdlib 8 - ]}, 9 - {env,[]}, 10 - {modules, []}, 11 - 12 - {maintainers, []}, 13 - {licenses, ["Apache 2.0"]}, 14 - {links, []} 15 - ]}.
+2 -1
test/hello_world/src/hello_world.gleam
··· 1 - 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors
+3
test/hello_world/src/nest/bird!.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2019 The Gleam contributors 3 + 1 4
+2 -1
test/hello_world/src/nest/bird.gleam
··· 1 - 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2019 The Gleam contributors
+3
test/hello_world/src/nest/bird.js
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2019 The Gleam contributors 3 +
+3
test/hello_world/src/other.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2019 The Gleam contributors 3 + 1 4 pub fn add(a, b) { 2 5 a + b 3 6 }
+3
test/hello_world/test/hello_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2019 The Gleam contributors 3 + 1 4 import hello_world 2 5 3 6 fn run(x, y) {
+3
test/hextarball/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 name = "hextarball" 2 5 version = "0.1.0" 3 6 description = "Test project to construct a hex tarball"
+3
test/hextarball/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/hextarball/src/external_module.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 -module(external_module). 2 5 -export([hello/0]). 3 6
+3
test/hextarball/src/hextarball.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 pub fn something() { 2 5 "Just a thing to export" 3 6 }
+3
test/javascript_prelude/main.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import { 2 5 BitArray, 3 6 BitArray$BitArray,
+3
test/language/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "language" 2 5 version = "1.0.0" 3 6
+3
test/language/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/language/src/language.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 Nil 3 6 }
+3
test/language/test/ffi.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 pub type Dynamic 2 5 3 6 @external(erlang, "ffi_erlang", "print")
+3
test/language/test/ffi_erlang.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 -module(ffi_erlang). 2 5 3 6 -export([
+3
test/language/test/ffi_javascript.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import { UtfCodepoint, BitArray$BitArray$data } from "./gleam.mjs"; 2 5 3 6 let fs;
+3
test/language/test/ffi_typescript.ts
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 export function append(a: string, b: string) { 2 5 return a + b; 3 6 }
+3
test/language/test/importable.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 pub type NoFields { 2 5 NoFields 3 6 }
+3
test/language/test/language/alternative_pattern.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 fn make_int_zero() { 2 5 0 3 6 }
+3
test/language/test/language/anonymous_function_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 // https://github.com/gleam-lang/gleam/issues/1637 2 5 pub fn anonymous_function_test() { 3 6 let f = fn(x) {
+3
test/language/test/language/assertion_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn let_assert_ok_discard_test() { 2 5 let result = { 3 6 let x = ok_one()
+3
test/language/test/language/bit_array_dynamic_size_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn dynamic_size_1_test() { 2 5 let size = 8 3 6 let assert <<value:size(size)>> = <<42>>
+3
test/language/test/language/bit_array_match_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import importable 2 5 3 6 pub fn match_1_test() {
+3
test/language/test/language/bit_array_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import ffi 2 5 import gleam/bit_array 3 6
+3
test/language/test/language/block_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 // https://github.com/gleam-lang/gleam/issues/1991 2 5 pub fn block_scoping_test() { 3 6 let x = 1
+3
test/language/test/language/bool_negation_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn negation_true_test() { 2 5 assert !True == False 3 6 }
+3
test/language/test/language/build_files_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import ffi 2 5 3 6 @target(javascript)
+3
test/language/test/language/clause_guard_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import importable 2 5 3 6 // Constructor functions are used rather than literals to stop the Erlang
+3
test/language/test/language/constant_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 const const_int = 5 2 5 3 6 const const_float = 1.0
+3
test/language/test/language/directly_matching_case_subject_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 fn identity(x: a) -> a { 2 5 x 3 6 }
+3
test/language/test/language/equality_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn list_eq_1_test() { 2 5 let left = [] 3 6 let right = []
+3
test/language/test/language/float_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn addition_1_test() { 2 5 assert 0.0 +. 0.0 == 0.0 3 6 }
+3
test/language/test/language/imported_custom_type_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import importable.{NoFields} 2 5 3 6 pub fn no_fields_qualified_and_unqualified_test() {
+3
test/language/test/language/importing_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import mod_with_numbers_0123456789 2 5 import shadowed_module.{ShadowPerson} 3 6
+3
test/language/test/language/int_negation_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn negation_1_test() { 2 5 let a = 3 3 6 let b = -a
+3
test/language/test/language/int_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn addition_1_test() { 2 5 assert 0 + 0 == 0 3 6 }
+3
test/language/test/language/list_prepend_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn prepend_1_test() { 2 5 let left = [1, ..[]] 3 6 let right = [1]
+3
test/language/test/language/mixed_arg_match_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 type Cat { 2 5 Cat(String, cuteness: Int) 3 6 }
+3
test/language/test/language/multiple_case_subject_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn wildcard_test() { 2 5 let x = true() 3 6 let y = false()
+3
test/language/test/language/non_utf8_string_bit_array_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import ffi 2 5 3 6 pub fn utf16_pattern_match_test() {
+3
test/language/test/language/pipe_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 fn identity(x: a) -> a { 2 5 x 3 6 }
+3
test/language/test/language/precedence_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn precedence_1_test() { 2 5 assert 7 == 1 + 2 * 3 3 6 }
+3
test/language/test/language/prelude_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import gleam 2 5 3 6 pub fn gleam_ok_test() {
+3
test/language/test/language/record_access_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 type Person { 2 5 Person(name: String, age: Int, country: String) 3 6 }
+3
test/language/test/language/record_update_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import record_update 2 5 3 6 type Person {
+3
test/language/test/language/record_with_field_named_constructor.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub type Box { 2 5 Box(constructor: Int) 3 6 }
+3
test/language/test/language/remainder_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn remainder_1_test() { 2 5 assert 1 % 1 == 0 3 6 }
+3
test/language/test/language/sized_bit_array_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn size_8_literal_test() { 2 5 let left = <<257:size(8)>> 3 6 let right = <<1>>
+3
test/language/test/language/string_pattern_matching_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn case_string_prefix_match_test() { 2 5 let string = "12345" 3 6 let string_2 = case string {
+3
test/language/test/language/string_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn empty_strings_equal_test() { 2 5 assert "" == "" 3 6 }
+3
test/language/test/language/tail_call_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 fn count_down(from i) { 2 5 case i { 3 6 0 -> Nil
+3
test/language/test/language/tuple_access_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 type ContainsTuple { 2 5 ContainsTuple(data: #(Int, #(Int, Person))) 3 6 }
+3
test/language/test/language/unaligned_bit_array_expression_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn unaligned_1_test() { 2 5 let left = <<0xFF:6, 0:2>> 3 6 let right = <<0xFC>>
+3
test/language/test/language/unaligned_bit_array_pattern_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn unaligned_1_test() { 2 5 let assert <<a:4, b:4, c:3, d:4, e:1>> = <<0xAB, 0b11010101>> 3 6 assert #(a, b, c, d, e) == #(0xA, 0xB, 0b110, 0b1010, 0b1)
+3
test/language/test/language/utf_bit_array_string_segment_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 pub fn literal_utf8_string_segment_test() { 2 5 let bit_array = <<"abc":utf8>> 3 6 assert bit_array == <<97, 98, 99>>
+3
test/language/test/language_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import gleeunit 2 5 3 6 pub fn main() {
+3
test/language/test/mod_with_numbers_0123456789.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 pub fn hello() { 2 5 "world" 3 6 }
+3
test/language/test/port.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 pub type Port
+3
test/language/test/record_update.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2020 The Gleam contributors 3 + 1 4 pub type Box(a) { 2 5 Box(tag: String, value: a) 3 6 }
+3
test/language/test/shadowed_module.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 pub type ShadowPerson { 2 5 ShadowPerson(age: Int) 3 6 }
+5
test/multi_namespace/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2026 The Gleam contributors 4 + --> 5 + 1 6 # Multi namespace project 2 7 3 8 should not be published!
+3
test/multi_namespace/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "multi_namespace" 2 5 version = "1.0.0" 3 6 description = "Test project for multi namespace"
+3
test/multi_namespace/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/multi_namespace/src/multi_namespace.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 "Hello from multi_namespace!" 3 6 }
+3
test/multi_namespace/src/second.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 "Hello from second!" 3 6 }
+3
test/multi_namespace/test.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 set -eu
+5
test/multi_namespace_not_top_level/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2026 The Gleam contributors 4 + --> 5 + 1 6 # Multi namespace project 2 7 3 8 should not be published!
+3
test/multi_namespace_not_top_level/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "multi_namespace" 2 5 version = "1.0.0" 3 6 description = "Test project for multi namespace"
+3
test/multi_namespace_not_top_level/src/module1/sub.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 "Hello from multi_namespace!" 3 6 }
+3
test/multi_namespace_not_top_level/src/module2/sub.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 "Hello from second!" 3 6 }
+3
test/multi_namespace_not_top_level/test.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 # https://github.com/gleam-lang/gleam/pull/4445
-152
test/package.jsonc
··· 1 - // An idea for how generated docs could contain information on modules within 2 - // the package in a machine readable format. 3 - { 4 - "publishing-gleam-version": "0.20.0", 5 - "name": "my_package", 6 - "modules": { 7 - "my_module": { 8 - "documentation": "...", 9 - "types": { 10 - // pub type MyType1 { One Two(String) } 11 - "MyType1": { 12 - "documentation": "...", 13 - "parameters": 0, 14 - "constructors": ["One", "Two"] 15 - }, 16 - // pub type MyType2 17 - "MyType2": { 18 - "documentation": "...", 19 - "parameters": 0, 20 - "constructors": [] 21 - }, 22 - // pub type MyType3(a) { One(a, Int) } 23 - "MyType3": { 24 - "documentation": "...", 25 - "parameters": 1, 26 - "constructors": ["One"] 27 - }, 28 - // pub type MyType4(a, b) 29 - "MyType4": { 30 - "documentation": "...", 31 - "parameters": 2, 32 - "constructors": [] 33 - }, 34 - // pub opaque type MyType5(a, b) { One Two } 35 - "MyType5": { 36 - "documentation": "...", 37 - "parameters": 2, 38 - "constructors": [] 39 - } 40 - }, 41 - "values": { 42 - // pub const nil_constant = Nil 43 - "nil_constant": { 44 - "documentation": "...", 45 - "type": { "kind": "Nil" } 46 - }, 47 - // pub const tuple_constant = #(1, "2", 3.0) 48 - "tuple_constant": { 49 - "documentation": "...", 50 - "type": { 51 - "kind": "Tuple", 52 - "elements": [ 53 - { "kind": "Int" }, 54 - { "kind": "String" }, 55 - { "kind": "Float" } 56 - ] 57 - } 58 - }, 59 - // pub const ok_constant = Ok(1) 60 - "ok_constant": { 61 - "documentation": "...", 62 - "type": { 63 - "kind": "Result", 64 - "ok": { "kind": "Int" }, 65 - "error": { "kind": "Variable", "id": 0 } 66 - } 67 - }, 68 - // pub const error_constant = Error(Nil) 69 - "error_constant": { 70 - "documentation": "...", 71 - "type": { 72 - "kind": "Result", 73 - "ok": { "kind": "Nil" }, 74 - "error": { "kind": "Variable", "id": 0 } 75 - } 76 - }, 77 - // pub const empty_list_constant = [] 78 - "empty_list_constant": { 79 - "documentation": "...", 80 - "type": { 81 - "kind": "List", 82 - "elements": { "kind": "Variable", "id": 0 } 83 - } 84 - }, 85 - // pub const int_list_constant = [1, 2, 3] 86 - "int_list_constant": { 87 - "documentation": "...", 88 - "type": { 89 - "kind": "List", 90 - "elements": { "kind": "Int" } 91 - } 92 - }, 93 - // pub type Wibble { Wobble(String) } 94 - // pub const custom_type_constant1 = Wobble("Hi") 95 - "custom_type_constant1": { 96 - "documentation": "...", 97 - "type": { 98 - "kind": "Named", 99 - "package": "my_package", 100 - "module": "my_module", 101 - "parameters": [] 102 - } 103 - }, 104 - // pub type Blip(a) { Blap(a) } 105 - // pub const custom_type_constant2 = Blap(1) 106 - "custom_type_constant2": { 107 - "documentation": "...", 108 - "type": { 109 - "kind": "Named", 110 - "package": "my_package", 111 - "module": "my_module", 112 - "parameters": [ 113 - { "kind": "Int" } 114 - ] 115 - } 116 - }, 117 - // import some/module 118 - // pub const imported_custom_type: module.Something = module.SomethingConstructor 119 - "imported_custom_type": { 120 - "documentation": "...", 121 - "type": { 122 - "kind": "Named", 123 - "package": "other_package", 124 - "module": "some/module", 125 - "parameters": [] 126 - } 127 - }, 128 - // pub fn main() -> Nil { ... } 129 - "main": { 130 - "documentation": "...", 131 - "type": { 132 - "kind": "Fn", 133 - "parameters": [], 134 - "return": { "kind": "Nil" } 135 - } 136 - }, 137 - // pub fn multiply(x: Int, x: Int) -> Int { ... } 138 - "multiply": { 139 - "documentation": "...", 140 - "type": { 141 - "kind": "Fn", 142 - "parameters": [ 143 - { "kind": "Int" }, 144 - { "kind": "Int" } 145 - ], 146 - "return": { "kind": "Int" } 147 - } 148 - } 149 - } 150 - } 151 - } 152 - }
+5
test/project_deno/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2021 The Gleam contributors 4 + --> 5 + 1 6 # Project 2 7 3 8 A test Gleam project using the Deno runtime.
+3
test/project_deno/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "project" 2 5 version = "0.1.0" 3 6 target = "javascript"
+3
test/project_deno/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/project_deno/src/project.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 pub type Location { 2 5 Location( 3 6 href: String,
+3
test/project_deno/src/project_ffi.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 export function location() { 2 5 return globalThis.location; 3 6 }
+3
test/project_deno/test/project_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import project 2 5 3 6 pub fn main() {
+5
test/project_erlang/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2021 The Gleam contributors 4 + --> 5 + 1 6 # Project 2 7 3 8 A test Gleam project.
+3
test/project_erlang/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "project" 2 5 version = "0.1.0" 3 6
+3
test/project_erlang/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/project_erlang/src/elixir_file.ex
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 defmodule ElixirFile do 2 5 def main() do 3 6 "Hello, from the Elixir module!"
+3
test/project_erlang/src/erlang_file.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 -module(erlang_file). 2 5 3 6 -export([main/0]).
+3
test/project_erlang/src/erlang_header.hrl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 header_function() -> 2 5 <<"Hello, from the Erlang header!">>.
+3
test/project_erlang/src/project.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test/project_erlang/test/elixir_test_file.ex
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 defmodule ElixirTestFile do 2 5 def main() do 3 6 "Hello, from the Elixir test module!"
+3
test/project_erlang/test/erlang_test_file.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 -module(erlang_test_file). 2 5 3 6 -export([main/0]).
+3
test/project_erlang/test/erlang_test_header.hrl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 header_function() -> 2 5 <<"Hello, from the Erlang test header!">>.
+6 -3
test/project_erlang/test/project_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 4 + import gleam/dynamic.{type Dynamic} 5 + import gleam/erlang/atom.{from_string as atom_from_string} 1 6 import gleam/io 2 - import gleam/dynamic.{type Dynamic} 3 - import project 4 7 import gleeunit 5 - import gleam/erlang/atom.{from_string as atom_from_string} 8 + import project 6 9 7 10 pub fn main() { 8 11 project.main()
+3
test/project_erlang_windows/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 name = "project" 2 5 version = "0.1.0" 3 6
+3
test/project_erlang_windows/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/project_erlang_windows/src/elixir_file.ex
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 defmodule ElixirFile do 2 5 def main() do 3 6 "Hello, from the Elixir module!"
+3
test/project_erlang_windows/src/erlang_file.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 -module(erlang_file). 2 5 3 6 -export([main/0]).
+3
test/project_erlang_windows/src/erlang_header.hrl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 header_function() -> 2 5 <<"Hello, from the Erlang header!">>.
+3
test/project_erlang_windows/src/project.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test/project_erlang_windows/test/elixir_test_file.ex
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 defmodule ElixirTestFile do 2 5 def main() do 3 6 "Hello, from the Elixir test module!"
+3
test/project_erlang_windows/test/erlang_test_file.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 -module(erlang_test_file). 2 5 3 6 -export([main/0]).
+3
test/project_erlang_windows/test/erlang_test_header.hrl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 header_function() -> 2 5 <<"Hello, from the Erlang test header!">>.
+6 -3
test/project_erlang_windows/test/project_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 4 + import gleam/dynamic.{type Dynamic} 5 + import gleam/erlang/atom.{from_string as atom_from_string} 1 6 import gleam/io 2 - import gleam/dynamic.{type Dynamic} 3 - import project 4 7 import gleeunit 5 - import gleam/erlang/atom.{from_string as atom_from_string} 8 + import project 6 9 7 10 pub fn main() { 8 11 project.main()
+3
test/project_git_deps/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "git_deps" 2 5 version = "0.1.0" 3 6 description = "Test project to test git dependencies"
+3
test/project_git_deps/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/project_git_deps/src/git_deps.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+5
test/project_javascript/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2021 The Gleam contributors 4 + --> 5 + 1 6 # Project 2 7 3 8 A test Gleam project.
+3
test/project_javascript/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 name = "project" 2 5 version = "0.1.0" 3 6 target = "javascript"
+3
test/project_javascript/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/project_javascript/src/project.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 println("Hello, from project_javascript!") 3 6 }
+3
test/project_javascript/src/project_ffi.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 export function log(x) { 2 5 console.log(x); 3 6 }
+3
test/project_javascript/test/project_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import project 2 5 3 6 pub fn main() {
+5
test/project_path_deps/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2023 The Gleam contributors 4 + --> 5 + 1 6 This directory contains four projects used in CI test `test/project_path_deps`. 2 7 3 8 The dependency graph of these projects is as follows:
+3
test/project_path_deps/project_a/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 name = "project_a" 2 5 version = "0.1.0" 3 6
+3
test/project_path_deps/project_a/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/project_path_deps/project_a/src/project_a.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 import project_b 2 5 import project_c 3 6
+3
test/project_path_deps/project_a/test/project_a_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 import gleeunit 2 5 import gleeunit/should 3 6
+3
test/project_path_deps/project_b/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 name = "project_b" 2 5 version = "0.1.0" 3 6 description = "A Gleam project"
+3
test/project_path_deps/project_b/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/project_path_deps/project_b/src/project_b.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 import project_d 2 5 3 6 pub type TypeB {
+3
test/project_path_deps/project_c/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 name = "project_c" 2 5 version = "0.1.0" 3 6
+3
test/project_path_deps/project_c/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/project_path_deps/project_c/src/project_c.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 import project_d 2 5 3 6 pub type TypeC {
+3
test/project_path_deps/project_d/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 name = "project_d" 2 5 version = "1.0.0" 3 6
+3
test/project_path_deps/project_d/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/project_path_deps/project_d/src/project_d.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 pub type TypeD { 2 5 ConstructorD(String) 3 6 }
+3
test/project_path_deps/project_d/test/project_d_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 import gleam/bitwise 2 5 3 6 pub fn main() {
+3
test/publishing_default_main/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "default_main" 2 5 version = "1.0.0" 3 6 description = "Test project for default main"
+3
test/publishing_default_main/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/publishing_default_main/src/default_main.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() -> Nil {
+3
test/publishing_default_main/src/default_main/one.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 pub fn one() { 2 5 "hello from one!" 3 6 }
+3
test/publishing_default_main/src/default_main/two.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 pub fn two() { 2 5 "hello from two!" 3 6 }
+3
test/publishing_default_main/test.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 set -eu
+5
test/publishing_default_readme/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2026 The Gleam contributors 4 + --> 5 + 1 6 # default_readme 2 7 3 8 [![Package Version](https://img.shields.io/hexpm/v/default_readme)](https://hex.pm/packages/default_readme)
+3
test/publishing_default_readme/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "default_readme" 2 5 version = "1.0.0" 3 6 description = "Test project for default readme"
+3
test/publishing_default_readme/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/publishing_default_readme/src/default_readme.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 /// This tests that a project with a default readme doesn't get published.
+3
test/publishing_default_readme/test.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 set -eu
+5
test/publishing_empty_readme/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2019 The Gleam contributors 4 + --> 5 +
+3
test/publishing_empty_readme/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "empty_readme" 2 5 version = "1.0.0" 3 6 description = "Test project for empty readme"
+3
test/publishing_empty_readme/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/publishing_empty_readme/src/empty_readme.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 /// This tests that a project with an empty readme doesn't get published.
+3
test/publishing_empty_readme/test.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 set -eu
+3
test/publishing_no_readme/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 name = "no_readme" 2 5 version = "1.0.0" 3 6 description = "Test project for no readme"
+3
test/publishing_no_readme/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/publishing_no_readme/src/no_readme.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2026 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 /// This tests that a project with no readme doesn't get published.
+3
test/publishing_no_readme/test.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 set -eu
+5
test/root_package_not_compiled_when_running_dep/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2024 The Gleam contributors 4 + --> 5 + 1 6 # root_package_not_compiled_when_running_dep 2 7 3 8 This package is used to check that the compiler can compile and run a dependency
+3
test/root_package_not_compiled_when_running_dep/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "root_package_not_compiled_when_running_dep" 2 5 version = "1.0.0" 3 6
+3
test/root_package_not_compiled_when_running_dep/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/root_package_not_compiled_when_running_dep/src/root_package_not_compiled_when_running_dep.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 compilation_error 3 6 }
+3
test/root_package_not_compiled_when_running_dep/test.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 #!/bin/sh 2 5 3 6 set -eu
+5
test/running_modules/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2023 The Gleam contributors 4 + --> 5 + 1 6 # Running Modules 2 7 3 8 Tests running modules with the `gleam run -m` command on all targets and runtimes.
+3
test/running_modules/dev/module_dev.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test/running_modules/dev/module_in_dev.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test/running_modules/dev/nested/module_in_dev.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test/running_modules/dev/wrong_dev_arity.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main(something) {
+3
test/running_modules/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 name = "module" 2 5 version = "0.1.0" 3 6 description = "A Gleam project"
+3
test/running_modules/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/running_modules/run_tests.sh
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 #/usr/bin/env sh 2 5 3 6 set -eu
+3
test/running_modules/src/module.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+2 -1
test/running_modules/src/module/no_main_function.gleam
··· 1 - 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2018 The Gleam contributors
+3
test/running_modules/src/module/sub_module.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test/running_modules/src/module/wrong_arity.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 pub fn main(arg: Int) -> Nil { 2 5 Nil 3 6 }
+3
test/running_modules/test/module_in_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test/running_modules/test/module_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test/running_modules/test/nested/module_in_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main() {
+3
test/running_modules/test/wrong_test_arity.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2025 The Gleam contributors 3 + 1 4 import gleam/io 2 5 3 6 pub fn main(something) {
+5
test/subdir_ffi/README.md
··· 1 + <!-- 2 + SPDX-License-Identifier: Apache-2.0 3 + SPDX-FileCopyrightText: 2024 The Gleam contributors 4 + --> 5 + 1 6 # subdir_ffi 2 7 3 8 This package is used to check if the compiler properly supports FFI files (such
+3
test/subdir_ffi/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 name = "subdir_ffi" 2 5 version = "1.0.0" 3 6
+3
test/subdir_ffi/manifest.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 # This file was generated by Gleam 2 5 # You typically do not need to edit this file 3 6
+3
test/subdir_ffi/src/headers/submodule_ffi_header.hrl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 header_function() -> 2 5 <<"Hello, from the nested Erlang header!">>.
+3
test/subdir_ffi/src/nested/submodule.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 pub fn submodule_main() { 2 5 parent_println(message()) 3 6 parent_println(elixir_message())
+3
test/subdir_ffi/src/nested/submodule_ffi.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 -module(submodule_ffi). 2 5 3 6 -export([main/0, main2/0]).
+3
test/subdir_ffi/src/nested/submodule_ffi.ex
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2022 The Gleam contributors 3 + 1 4 defmodule ElixirFile do 2 5 def main() do 3 6 "Hello, from the Elixir module!"
+3
test/subdir_ffi/src/nested/submodule_ffi.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 export function main(x) { 2 5 return "Hello from the nested JavaScript native module!"; 3 6 }
+3
test/subdir_ffi/src/project.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 import nested/submodule 2 5 3 6 pub fn main() {
+3
test/subdir_ffi/src/project_ffi.erl
··· 1 + %% SPDX-License-Identifier: Apache-2.0 2 + %% SPDX-FileCopyrightText: 2024 The Gleam contributors 3 + 1 4 -module(project_ffi). 2 5 3 6 -export([log/1]).
+3
test/subdir_ffi/src/project_ffi.mjs
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 export function log(x) { 2 5 console.log(x); 3 6 }
+3
test/subdir_ffi/test/subdir_ffi_test.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2021 The Gleam contributors 3 + 1 4 import project 2 5 3 6 pub fn main() {
+3
test/unicode_path ⭐/Makefile
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 .PHONY: build 2 5 build: 3 6 rm -fr build
+4 -1
test/unicode_path ⭐/gleam.toml
··· 1 + # SPDX-License-Identifier: Apache-2.0 2 + # SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 name = "unicode_path" 2 - version = "1.0.0" 5 + version = "1.0.0"
+3
test/unicode_path ⭐/src/unicode_path.gleam
··· 1 + // SPDX-License-Identifier: Apache-2.0 2 + // SPDX-FileCopyrightText: 2023 The Gleam contributors 3 + 1 4 pub fn main() { 2 5 Nil 3 6 }