···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2024 The Gleam contributors
44+-->
55+16---
27name: Bug report
38about: Something isn't working
+5
.github/ISSUE_TEMPLATE/feature_request.md
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2024 The Gleam contributors
44+-->
55+16---
27name: Feature request
38about: Suggest an idea for this project
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2026 The Gleam contributors
44+-->
55+16- [ ] The changes in this PR have been discussed beforehand in an issue
27- [ ] The issue for this PR has been linked
38- [ ] Tests have been added for new behaviour
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2018 The Gleam contributors
44+-->
55+1627# Contributor Covenant Code of Conduct
38
+5
CONTRIBUTING.md
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2024 The Gleam contributors
44+-->
55+16# Contributing to Gleam
2738Thanks for contributing to Gleam!
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2020 The Gleam contributors
44+-->
55+16# Release checklist
27381. Write release post on website.
+3
benchmark/list/gleam.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14name = "list"
25version = "1.0.0"
36description = "Benchmarks for lists"
+3
benchmark/list/manifest.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2020 The Gleam contributors
44+-->
55+16# Changelog
2738Dedicated to the memory of Len Pilfold.
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14use ecow::EcoString;
2536/// Generates a string delimeted table with 2 spaces between each column, columns padded with
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14//! AST traversal routines, referenced from [`syn::visit`](https://docs.rs/syn/latest/syn/visit/index.html)
25//!
36//! Each method of the [`Visit`] trait can be overridden to customize the
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14//! Graphs that represent the relationships between entities in a Gleam module,
25//! such as module functions or constants.
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2018 The Gleam contributors
33+14// TODO: Refactor this module to be methods on structs rather than free
25// functions with a load of arguments. See the JavaScript code generator and the
36// formatter for examples.
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14//! An implementation of the algorithm described in:
25//!
36//! - How to compile pattern matching, Jules Jacobs.
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14//! This module implements the function inlining optimisation. This allows
25//! function calls to be inlined at the callsite, and replaced with the contents
36//! of the function which is being called.
+3
compiler-core/src/io.rs
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14pub mod memory;
2536use crate::error::{Error, FileIoAction, FileKind, Result};
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14//! This module is responsible for generating TypeScript type declaration files.
25//! This code is run during the code generation phase along side the normal
36//! Javascript code emission. Here we walk through the typed AST and translate
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2020 The Gleam contributors
33+14//! Seriaisation and deserialisation of Gleam compiler metadata into binary files
25//! using serde.
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2018 The Gleam contributors
33+14//! This module implements the functionality described in
25//! ["Strictly Pretty" (2000) by Christian Lindig][0], with a few
36//! extensions.
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2018 The Gleam contributors
33+14pub(crate) mod environment;
25pub mod error;
36pub(crate) mod expression;
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14/// The current version of the gleam compiler. If this does not match what is
25/// already in the build folder we will not reuse any cached artifacts and
36/// instead build from scratch
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14/**
25 * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9
36 * Copyright (C) 2020 Oliver Nightingale
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2023 The Gleam contributors
44+-->
55+16# Annoyances
2738This document contains a list of issues and annoyances that we have writing
+5
docs/compiler/README.md
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2021 The Gleam contributors
44+-->
55+16# Compiler documentation
2738Hello! Welcome to the documentation for the Gleam compiler. I hope you have fun
+5
docs/incident-response-plan.md
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2026 The Gleam contributors
44+-->
55+16# Incident response plan
2738## Stages
+5
docs/runtime-errors.md
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2024 The Gleam contributors
44+-->
55+16# Runtime errors
2738There are several runtime errors that Gleam code can throw. This documentation
+5
docs/threat-model.md
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2026 The Gleam contributors
44+-->
55+16# Public threat model
2738Last updated: 2026-04-23
+5
docs/v2.md
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2025 The Gleam contributors
44+-->
55+16# Breaking changes to make for v2
2738## `[1 ..]` syntax
+3
gleam-bin/.cargo/config.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# Statically link the CRT on Windows with MSVC toolchain
25# (only in release mode)
36[target.'cfg(all(windows, target_env = "msvc"))']
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2026 The Gleam contributors
44+-->
55+16# How to Contribute
2738## Adding a New API Function
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14/// `prost_build` generates files in the output directory, which means that if we want
25/// to use it, we would need the protoc compiler as a build dependency.
36/// To get around this, we need run the build script and manually copy the generated files
+3
hexpm/proto/names.proto
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2014 The Hex Team
33+14syntax = "proto2";
2536package names;
+3
hexpm/proto/package.proto
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2014 The Hex Team
33+14syntax = "proto2";
2536package package;
+3
hexpm/proto/signed.proto
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2014 The Hex Team
33+14syntax = "proto2";
2536package signed;
+3
hexpm/proto/versions.proto
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2014 The Hex Team
33+14syntax = "proto2";
2536package versions;
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14#![allow(clippy::enum_variant_names)]
2536pub mod package;
+3
hexpm/src/proto/package.rs
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14// This file is @generated by prost-build.
25#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct Package {
+3
hexpm/src/proto/signed.rs
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14// This file is @generated by prost-build.
25#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct Signed {
+3
hexpm/src/proto/versions.rs
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14// This file is @generated by prost-build.
25#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct Versions {
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14//! Functions for parsing and matching versions against requirements, based off
25//! and compatible with the Elixir Version module, which is used by Hex
36//! internally as well as be the Elixir build tool Hex client.
+3
hexpm/src/version/lexer.rs
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14//! Lexer for semver ranges.
25//!
36//! Breaks a string of input into an iterator of tokens that can be used with a parser.
+3
hexpm/src/version/parser.rs
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14// Based off of https://github.com/steveklabnik/semver-parser/blob/bee9de80aaa9653c5eb46a83658606cb21151e65/src/parser.rs
2536use std::fmt;
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2026 The Gleam contributors
44+-->
55+16# licence_bundler
2738A small program that creates a `gleam-licences.html` which details all the
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14# Do not manually edit this file, it is managed by Gleam.
25#
36# This file locks the dependency versions used, to make your build
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14# Do not manually edit this file, it is managed by Gleam.
25#
36# This file locks the dependency versions used, to make your build
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14# Do not manually edit this file, it is managed by Gleam.
25#
36# This file locks the dependency versions used, to make your build
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14# Do not manually edit this file, it is managed by Gleam.
25#
36# This file locks the dependency versions used, to make your build
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14// main must not take an argument
25pub fn main(stuff: List(String)) -> Nil {
36 echo stuff
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14# Do not manually edit this file, it is managed by Gleam.
25#
36# This file locks the dependency versions used, to make your build
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14// There's no main function here
25pub fn run() -> Nil {
36 echo "Hello, world"
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14import { Thing } from "./thing.mjs";
2536const it = new Thing();
+3
test-output/cases/echo_singleton/src/thing.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14pub type Thing {
25 Thing
36}
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14use std::path::PathBuf;
2536pub fn main() {
47 println!("cargo:rerun-if-changed=cases");
5866- let mut module = "//! This file is generated by build.rs
99+ let mut module = "// SPDX-License-Identifier: Apache-2.0
1010+// SPDX-FileCopyrightText: 2024 The Gleam contributors
1111+1212+//! This file is generated by build.rs
713//! Do not edit it directly, instead add new test cases to ./cases
814"
915 .to_string();
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// https://github.com/gleam-lang/gleam/issues/303
25import one.{Empty as E, id as i}
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// This import will fail because the `two` module is in the `test` directory and
25// as such isn't permitted to be imported into the `dev` directory.
36import two
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// There is another module with the same name in the `test` directory.
25pub fn main() {
36 "Hello, Joe!"
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// There is another module with the same name in the `src` directory.
25pub fn main() {
36 "Hello, Joe!"
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// There is another module with the same name in the `src` directory.
25pub fn main() {
36 "Hello, Joe!"
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14// There is another module with the same name in the `dev` directory.
25pub fn main() {
36 "Hello, Joe!"
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// There is another module with the same name in the `test` directory.
25pub fn main() {
36 "Hello, Joe!"
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14// There is another module with the same name in the `dev` directory.
25pub fn main() {
36 "Hello, Joe!"
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14# This config file has a bunch of properties that will be entered into the
25# Erlang .app file
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14# This config file has a bunch of properties that will be entered into the
25# Erlang .app file
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14pub type Error {
25 // This constructor shadows the Error constructor in the prelude.
36 Error
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// This import shadows the Error type in the prelude.
25import one.{Error}
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// This module uses imports in a way which previously failed to compile due a
25// compiler bug.
36//
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14//// This module depends on two, that doesn't have any errors but it should be
25//// skipped anyway as it depends on a module that does have errors.
36//// So this module has to be skipped as well!!
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14//// This module doesn't have any errors, but will be skipped because it depends
25//// on module one which has errors!
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14# This should emit no warnings.
25# https://github.com/gleam-lang/otp/pull/22
36name = "importy"
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// https://github.com/gleam-lang/otp/pull/22
2536pub type Port
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14//// https://github.com/gleam-lang/otp/pull/22
2536// No warning should be emitted about this imported type. The compiler does not
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14import one.{A, A as C, B, B as D, User, User as XUser}
2536/// For these statements we use the records in a qualified fashion
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14import one/one.{A, A as C, B, B as D, User, User as XUser}
25import one/two as aliased
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14// This module is named "app/code".
25//
36// The last segment is the same as a built in Erlang module, but it is in the
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14import one.{type User}
2536// This operation is not permitted because the type is opaque and this module
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14import one
2536// This operation is not permitted because the type is opaque and this module
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14// This module is named "code".
25//
36// If you were to compile this and load it into the Erlang virtual machine it
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14// This import will fail because the `two` module is in the `dev` directory and
25// as such isn't permitted to be imported into the `src` directory.
36import two
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// This import will fail because the `two` module is in the `test` directory and
25// as such isn't permitted to be imported into the `src` directory.
36import two
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14# Distinguish between a module and a value with the same local name.
25# https://github.com/gleam-lang/gleam/issues/807
36name = "importy"
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14// https://github.com/gleam-lang/gleam/issues/807
25pub type Power {
36 Power(value: Int)
+3
test-package-compiler/src/generated_tests.rs
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14//! This file is generated by build.rs
25//! Do not edit it directly, instead add new test cases to ./cases
36
···33expression: "./cases/dev_importing_test"
44---
55error: Dev importing test module
66- ┌─ dev/one.gleam:3:1
66+ ┌─ dev/one.gleam:6:1
77 │
88-3 │ import two
88+6 │ import two
99 │ ^ Imported here
10101111The development module `one` is importing the test module `two`.
···66<.cache binary>
7788//// /out/lib/the_package/_gleam_artefacts/one.cache_meta
99-<65 byte binary>
99+<77 byte binary>
10101111//// /out/lib/the_package/_gleam_artefacts/one.erl
1212-module(one).
···2323<.cache binary>
24242525//// /out/lib/the_package/_gleam_artefacts/two.cache_meta
2626-<128 byte binary>
2626+<140 byte binary>
27272828//// /out/lib/the_package/_gleam_artefacts/two.erl
2929-module(two).
···44444545-type shadowing() :: port.
46464747--file("src/two.gleam", 14).
4747+-file("src/two.gleam", 17).
4848-spec use_type(one:port_()) -> nil.
4949use_type(Port) ->
5050 wibble:wobble(Port).
···63636464//// Warning
6565warning: Unused private constructor
6666- ┌─ src/two.gleam:9:3
6767- │
6868-9 │ Port
6969- │ ^ This private constructor is never used
6666+ ┌─ src/two.gleam:12:3
6767+ │
6868+12 │ Port
6969+ │ ^ This private constructor is never used
70707171Hint: You can safely remove it.
7272···74747575//// Warning
7676warning: Unused private type
7777- ┌─ src/two.gleam:7:1
7878- │
7979-7 │ type Shadowing {
8080- │ ^ This private type is never used
7777+ ┌─ src/two.gleam:10:1
7878+ │
7979+10 │ type Shadowing {
8080+ │ ^ This private type is never used
81818282Hint: You can safely remove it.
···33expression: "./cases/opaque_type_accessor"
44---
55error: Unknown record field
66- ┌─ src/two.gleam:7:19
77- │
88-7 │ let name = user.name
99- │ ^ This field does not exist
66+ ┌─ src/two.gleam:10:19
77+ │
88+10 │ let name = user.name
99+ │ ^ This field does not exist
10101111The value being accessed has this type:
1212···1515It does not have any fields.
16161717error: Unknown record field
1818- ┌─ src/two.gleam:8:20
1919- │
2020-8 │ let score = user.score
2121- │ ^ This field does not exist
1818+ ┌─ src/two.gleam:11:20
1919+ │
2020+11 │ let score = user.score
2121+ │ ^ This field does not exist
22222323The value being accessed has this type:
2424
···33expression: "./cases/unknown_module_field_in_constant"
44---
55error: Unknown module value
66- ┌─ src/two.gleam:3:16
66+ ┌─ src/two.gleam:6:16
77 │
88-3 │ pub const it = one.B
88+6 │ pub const it = one.B
99 │ ^ Did you mean `A`?
10101111The module `one` does not have a `B` value.
···33expression: "./cases/unknown_module_field_in_expression"
44---
55error: Unknown module value
66- ┌─ src/two.gleam:4:7
66+ ┌─ src/two.gleam:7:7
77 │
88-4 │ one.B
88+7 │ one.B
99 │ ^ Did you mean `A`?
10101111The module `one` does not have a `B` value.
···33expression: "./cases/unknown_module_field_in_import"
44---
55error: Unknown module value
66- ┌─ src/two.gleam:1:13
66+ ┌─ src/two.gleam:4:13
77 │
88-1 │ import one.{B}
88+4 │ import one.{B}
99 │ ^ Did you mean `A`?
10101111The module `one` does not have a `B` value.
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14use std::path::PathBuf;
2536pub fn main() {
47 println!("cargo:rerun-if-changed=cases");
5866- let mut module = "//! This file is generated by build.rs
99+ let mut module = "// SPDX-License-Identifier: Apache-2.0
1010+// SPDX-FileCopyrightText: 2024 The Gleam contributors
1111+1212+//! This file is generated by build.rs
713//! Do not edit it directly, instead add new test cases to ./cases
814915use gleam_core::build::Mode;
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14//! This file is generated by build.rs
25//! Do not edit it directly, instead add new test cases to ./cases
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14name = "project"
25version = "1.0.0"
36description = "A Gleam project"
+3
test/assert/manifest.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
+3
test/assert/run_tests.sh
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14#/usr/bin/env sh
2536set -eu
+3
test/assert/src/failing1.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14pub fn main() {
25 let x = True
36 assert !x
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11//// This module is used to test resolution of nested modules
2233+// SPDX-License-Identifier: Apache-2.0
44+// SPDX-FileCopyrightText: 2021 The Gleam contributors
55+36pub fn id(a) {
47 a
58}
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14pub fn hello_world() {
25 let x: Int = "Eh?"
36 x
+5
test/external_only_erlang/README.md
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2024 The Gleam contributors
44+-->
55+16# external_only_erlang
2738A project that can only be run on Erlang due to an external function.
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14// This function is only implemented for Erlang, so if we try and call it from
25// JavaScript, or build this package for JavaScript, then the compiler will
36// (should) emit an error.
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2024 The Gleam contributors
44+-->
55+16# external_only_javascript
2738A project that can only be run on JavaScript due to an external function.
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14// This function is only implemented for JavaScript, so if we try and call it
25// from Erlang, or build this package for Erlang, then the compiler will
36// (should) emit an error.
···11- Apache License
22- Version 2.0, January 2004
33- http://www.apache.org/licenses/
44-55- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
66-77- 1. Definitions.
88-99- "License" shall mean the terms and conditions for use, reproduction,
1010- and distribution as defined by Sections 1 through 9 of this document.
1111-1212- "Licensor" shall mean the copyright owner or entity authorized by
1313- the copyright owner that is granting the License.
1414-1515- "Legal Entity" shall mean the union of the acting entity and all
1616- other entities that control, are controlled by, or are under common
1717- control with that entity. For the purposes of this definition,
1818- "control" means (i) the power, direct or indirect, to cause the
1919- direction or management of such entity, whether by contract or
2020- otherwise, or (ii) ownership of fifty percent (50%) or more of the
2121- outstanding shares, or (iii) beneficial ownership of such entity.
2222-2323- "You" (or "Your") shall mean an individual or Legal Entity
2424- exercising permissions granted by this License.
2525-2626- "Source" form shall mean the preferred form for making modifications,
2727- including but not limited to software source code, documentation
2828- source, and configuration files.
2929-3030- "Object" form shall mean any form resulting from mechanical
3131- transformation or translation of a Source form, including but
3232- not limited to compiled object code, generated documentation,
3333- and conversions to other media types.
3434-3535- "Work" shall mean the work of authorship, whether in Source or
3636- Object form, made available under the License, as indicated by a
3737- copyright notice that is included in or attached to the work
3838- (an example is provided in the Appendix below).
3939-4040- "Derivative Works" shall mean any work, whether in Source or Object
4141- form, that is based on (or derived from) the Work and for which the
4242- editorial revisions, annotations, elaborations, or other modifications
4343- represent, as a whole, an original work of authorship. For the purposes
4444- of this License, Derivative Works shall not include works that remain
4545- separable from, or merely link (or bind by name) to the interfaces of,
4646- the Work and Derivative Works thereof.
4747-4848- "Contribution" shall mean any work of authorship, including
4949- the original version of the Work and any modifications or additions
5050- to that Work or Derivative Works thereof, that is intentionally
5151- submitted to Licensor for inclusion in the Work by the copyright owner
5252- or by an individual or Legal Entity authorized to submit on behalf of
5353- the copyright owner. For the purposes of this definition, "submitted"
5454- means any form of electronic, verbal, or written communication sent
5555- to the Licensor or its representatives, including but not limited to
5656- communication on electronic mailing lists, source code control systems,
5757- and issue tracking systems that are managed by, or on behalf of, the
5858- Licensor for the purpose of discussing and improving the Work, but
5959- excluding communication that is conspicuously marked or otherwise
6060- designated in writing by the copyright owner as "Not a Contribution."
6161-6262- "Contributor" shall mean Licensor and any individual or Legal Entity
6363- on behalf of whom a Contribution has been received by Licensor and
6464- subsequently incorporated within the Work.
6565-6666- 2. Grant of Copyright License. Subject to the terms and conditions of
6767- this License, each Contributor hereby grants to You a perpetual,
6868- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6969- copyright license to reproduce, prepare Derivative Works of,
7070- publicly display, publicly perform, sublicense, and distribute the
7171- Work and such Derivative Works in Source or Object form.
7272-7373- 3. Grant of Patent License. Subject to the terms and conditions of
7474- this License, each Contributor hereby grants to You a perpetual,
7575- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
7676- (except as stated in this section) patent license to make, have made,
7777- use, offer to sell, sell, import, and otherwise transfer the Work,
7878- where such license applies only to those patent claims licensable
7979- by such Contributor that are necessarily infringed by their
8080- Contribution(s) alone or by combination of their Contribution(s)
8181- with the Work to which such Contribution(s) was submitted. If You
8282- institute patent litigation against any entity (including a
8383- cross-claim or counterclaim in a lawsuit) alleging that the Work
8484- or a Contribution incorporated within the Work constitutes direct
8585- or contributory patent infringement, then any patent licenses
8686- granted to You under this License for that Work shall terminate
8787- as of the date such litigation is filed.
8888-8989- 4. Redistribution. You may reproduce and distribute copies of the
9090- Work or Derivative Works thereof in any medium, with or without
9191- modifications, and in Source or Object form, provided that You
9292- meet the following conditions:
9393-9494- (a) You must give any other recipients of the Work or
9595- Derivative Works a copy of this License; and
9696-9797- (b) You must cause any modified files to carry prominent notices
9898- stating that You changed the files; and
9999-100100- (c) You must retain, in the Source form of any Derivative Works
101101- that You distribute, all copyright, patent, trademark, and
102102- attribution notices from the Source form of the Work,
103103- excluding those notices that do not pertain to any part of
104104- the Derivative Works; and
105105-106106- (d) If the Work includes a "NOTICE" text file as part of its
107107- distribution, then any Derivative Works that You distribute must
108108- include a readable copy of the attribution notices contained
109109- within such NOTICE file, excluding those notices that do not
110110- pertain to any part of the Derivative Works, in at least one
111111- of the following places: within a NOTICE text file distributed
112112- as part of the Derivative Works; within the Source form or
113113- documentation, if provided along with the Derivative Works; or,
114114- within a display generated by the Derivative Works, if and
115115- wherever such third-party notices normally appear. The contents
116116- of the NOTICE file are for informational purposes only and
117117- do not modify the License. You may add Your own attribution
118118- notices within Derivative Works that You distribute, alongside
119119- or as an addendum to the NOTICE text from the Work, provided
120120- that such additional attribution notices cannot be construed
121121- as modifying the License.
122122-123123- You may add Your own copyright statement to Your modifications and
124124- may provide additional or different license terms and conditions
125125- for use, reproduction, or distribution of Your modifications, or
126126- for any such Derivative Works as a whole, provided Your use,
127127- reproduction, and distribution of the Work otherwise complies with
128128- the conditions stated in this License.
129129-130130- 5. Submission of Contributions. Unless You explicitly state otherwise,
131131- any Contribution intentionally submitted for inclusion in the Work
132132- by You to the Licensor shall be under the terms and conditions of
133133- this License, without any additional terms or conditions.
134134- Notwithstanding the above, nothing herein shall supersede or modify
135135- the terms of any separate license agreement you may have executed
136136- with Licensor regarding such Contributions.
137137-138138- 6. Trademarks. This License does not grant permission to use the trade
139139- names, trademarks, service marks, or product names of the Licensor,
140140- except as required for reasonable and customary use in describing the
141141- origin of the Work and reproducing the content of the NOTICE file.
142142-143143- 7. Disclaimer of Warranty. Unless required by applicable law or
144144- agreed to in writing, Licensor provides the Work (and each
145145- Contributor provides its Contributions) on an "AS IS" BASIS,
146146- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147147- implied, including, without limitation, any warranties or conditions
148148- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149149- PARTICULAR PURPOSE. You are solely responsible for determining the
150150- appropriateness of using or redistributing the Work and assume any
151151- risks associated with Your exercise of permissions under this License.
152152-153153- 8. Limitation of Liability. In no event and under no legal theory,
154154- whether in tort (including negligence), contract, or otherwise,
155155- unless required by applicable law (such as deliberate and grossly
156156- negligent acts) or agreed to in writing, shall any Contributor be
157157- liable to You for damages, including any direct, indirect, special,
158158- incidental, or consequential damages of any character arising as a
159159- result of this License or out of the use or inability to use the
160160- Work (including but not limited to damages for loss of goodwill,
161161- work stoppage, computer failure or malfunction, or any and all
162162- other commercial damages or losses), even if such Contributor
163163- has been advised of the possibility of such damages.
164164-165165- 9. Accepting Warranty or Additional Liability. While redistributing
166166- the Work or Derivative Works thereof, You may choose to offer,
167167- and charge a fee for, acceptance of support, warranty, indemnity,
168168- or other liability obligations and/or rights consistent with this
169169- License. However, in accepting such obligations, You may act only
170170- on Your own behalf and on Your sole responsibility, not on behalf
171171- of any other Contributor, and only if You agree to indemnify,
172172- defend, and hold each Contributor harmless for any liability
173173- incurred by, or claims asserted against, such Contributor by reason
174174- of your accepting any such warranty or additional liability.
175175-176176- END OF TERMS AND CONDITIONS
177177-178178- Copyright 2018, Louis Pilfold <louis@lpil.uk>.
179179-180180- Licensed under the Apache License, Version 2.0 (the "License");
181181- you may not use this file except in compliance with the License.
182182- You may obtain a copy of the License at
183183-184184- http://www.apache.org/licenses/LICENSE-2.0
185185-186186- Unless required by applicable law or agreed to in writing, software
187187- distributed under the License is distributed on an "AS IS" BASIS,
188188- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189189- See the License for the specific language governing permissions and
190190- limitations under the License.
191191-
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14name = "hextarball"
25version = "0.1.0"
36description = "Test project to construct a hex tarball"
+3
test/hextarball/manifest.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14// https://github.com/gleam-lang/gleam/issues/1637
25pub fn anonymous_function_test() {
36 let f = fn(x) {
+3
test/language/test/language/assertion_test.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14pub fn let_assert_ok_discard_test() {
25 let result = {
36 let x = ok_one()
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14import importable
2536// Constructor functions are used rather than literals to stop the Erlang
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14fn identity(x: a) -> a {
25 x
36}
+3
test/language/test/language/equality_test.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14pub fn list_eq_1_test() {
25 let left = []
36 let right = []
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14pub fn negation_1_test() {
25 let a = 3
36 let b = -a
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14pub fn prepend_1_test() {
25 let left = [1, ..[]]
36 let right = [1]
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14pub fn wildcard_test() {
25 let x = true()
36 let y = false()
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14pub fn size_8_literal_test() {
25 let left = <<257:size(8)>>
36 let right = <<1>>
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14pub fn unaligned_1_test() {
25 let left = <<0xFF:6, 0:2>>
36 let right = <<0xFC>>
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14pub type Port
+3
test/language/test/record_update.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2020 The Gleam contributors
33+14pub type Box(a) {
25 Box(tag: String, value: a)
36}
+3
test/language/test/shadowed_module.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14pub type ShadowPerson {
25 ShadowPerson(age: Int)
36}
+5
test/multi_namespace/README.md
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2026 The Gleam contributors
44+-->
55+16# Multi namespace project
2738should not be published!
+3
test/multi_namespace/gleam.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14name = "multi_namespace"
25version = "1.0.0"
36description = "Test project for multi namespace"
+3
test/multi_namespace/manifest.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
+3
test/multi_namespace/src/multi_namespace.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14pub fn main() {
25 "Hello from multi_namespace!"
36}
+3
test/multi_namespace/src/second.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14pub fn main() {
25 "Hello from second!"
36}
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2026 The Gleam contributors
44+-->
55+16# Multi namespace project
2738should not be published!
+3
test/multi_namespace_not_top_level/gleam.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14name = "multi_namespace"
25version = "1.0.0"
36description = "Test project for multi namespace"
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
+3
test/project_deno/src/project.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14pub type Location {
25 Location(
36 href: String,
+3
test/project_deno/src/project_ffi.mjs
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14export function location() {
25 return globalThis.location;
36}
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
+3
test/project_erlang/src/elixir_file.ex
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14defmodule ElixirFile do
25 def main() do
36 "Hello, from the Elixir module!"
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14defmodule ElixirTestFile do
25 def main() do
36 "Hello, from the Elixir test module!"
···11+%% SPDX-License-Identifier: Apache-2.0
22+%% SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14header_function() ->
25 <<"Hello, from the Erlang test header!">>.
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
+3
test/project_erlang_windows/src/elixir_file.ex
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14defmodule ElixirFile do
25 def main() do
36 "Hello, from the Elixir module!"
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14defmodule ElixirTestFile do
25 def main() do
36 "Hello, from the Elixir test module!"
···11+%% SPDX-License-Identifier: Apache-2.0
22+%% SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14header_function() ->
25 <<"Hello, from the Erlang test header!">>.
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14name = "git_deps"
25version = "0.1.0"
36description = "Test project to test git dependencies"
+3
test/project_git_deps/manifest.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
+3
test/project_javascript/src/project.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14pub fn main() {
25 println("Hello, from project_javascript!")
36}
+3
test/project_javascript/src/project_ffi.mjs
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14export function log(x) {
25 console.log(x);
36}
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2023 The Gleam contributors
44+-->
55+16This directory contains four projects used in CI test `test/project_path_deps`.
2738The dependency graph of these projects is as follows:
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14name = "project_b"
25version = "0.1.0"
36description = "A Gleam project"
+3
test/project_path_deps/project_b/manifest.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14import gleam/io
2536/// This tests that a project with a default readme doesn't get published.
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14import gleam/io
2536/// This tests that a project with an empty readme doesn't get published.
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14name = "no_readme"
25version = "1.0.0"
36description = "Test project for no readme"
+3
test/publishing_no_readme/manifest.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2025 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
+3
test/publishing_no_readme/src/no_readme.gleam
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2026 The Gleam contributors
33+14import gleam/io
2536/// This tests that a project with no readme doesn't get published.
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2026 The Gleam contributors
44+-->
55+16# Symlink escape
2738The file in the src directory is a symlink that points outside the package.
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2026 The Gleam contributors
44+-->
55+16# Symlink escape
2738The file in the priv directory is a symlink that points outside the package.
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2024 The Gleam contributors
44+-->
55+16# root_package_not_compiled_when_running_dep
2738This package is used to check that the compiler can compile and run a dependency
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2023 The Gleam contributors
44+-->
55+16# Running Modules
2738Tests running modules with the `gleam run -m` command on all targets and runtimes.
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14name = "module"
25version = "0.1.0"
36description = "A Gleam project"
+3
test/running_modules/manifest.toml
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2021 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
+3
test/running_modules/run_tests.sh
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2023 The Gleam contributors
33+14#/usr/bin/env sh
2536set -eu
···11+<!--
22+ SPDX-License-Identifier: Apache-2.0
33+ SPDX-FileCopyrightText: 2024 The Gleam contributors
44+-->
55+16# subdir_ffi
2738This package is used to check if the compiler properly supports FFI files (such
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14# This file was generated by Gleam
25# You typically do not need to edit this file
36
···11+# SPDX-License-Identifier: Apache-2.0
22+# SPDX-FileCopyrightText: 2022 The Gleam contributors
33+14defmodule ElixirFile do
25 def main() do
36 "Hello, from the Elixir module!"
+3
test/subdir_ffi/src/nested/submodule_ffi.mjs
···11+// SPDX-License-Identifier: Apache-2.0
22+// SPDX-FileCopyrightText: 2024 The Gleam contributors
33+14export function main(x) {
25 return "Hello from the nested JavaScript native module!";
36}