diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 43763dd33..99b997ef6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,3 +1,8 @@ + + --- name: Bug report about: Something isn't working diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 30fbebf28..a760a3ecc 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,3 +1,8 @@ + + --- name: Feature request about: Suggest an idea for this project diff --git a/.github/actions/build-container/action.yml b/.github/actions/build-container/action.yml index 6bd717caf..6cf1ed5f0 100644 --- a/.github/actions/build-container/action.yml +++ b/.github/actions/build-container/action.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name: "Build Gleam" description: "Build Gleam Container" inputs: diff --git a/.github/actions/build-release/action.yml b/.github/actions/build-release/action.yml index 2bc6b35ca..4d7c39b6d 100644 --- a/.github/actions/build-release/action.yml +++ b/.github/actions/build-release/action.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name: "Build Gleam" description: "Build Gleam Release" inputs: diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f654e74f9..c05fdc04a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + version: 2 updates: - package-ecosystem: github-actions diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ec2aaa337..e200b7404 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,3 +1,8 @@ + + - [ ] The changes in this PR have been discussed beforehand in an issue - [ ] The issue for this PR has been linked - [ ] Tests have been added for new behaviour diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3e3069d6a..f231b0ef0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + name: "CodeQL Advanced" on: diff --git a/.github/zizmor.yml b/.github/zizmor.yml index 9e7e81123..bb2fc44cb 100644 --- a/.github/zizmor.yml +++ b/.github/zizmor.yml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + rules: # dtolnay/rust-toolchain handles component installation, target addition, and # override configuration beyond what a bare `rustup` invocation provides. diff --git a/CHANGELOG.md b/CHANGELOG.md index ec0460d43..5c0aa6e5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ + + # Changelog ## Unreleased diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6e0ed7a74..daefb897a 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,8 @@ + + # Contributor Covenant Code of Conduct diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8c36fd91c..654716104 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,8 @@ + + # Contributing to Gleam Thanks for contributing to Gleam! diff --git a/Cargo.lock b/Cargo.lock index b14b89171..b576dec80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1222,6 +1222,7 @@ dependencies = [ "hexpm", "http", "id-arena", + "ignore", "im", "indexmap", "insta", diff --git a/Cargo.toml b/Cargo.toml index 2ae2e03b4..6d689d5b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2020 The Gleam contributors + [workspace] resolver = "2" members = [ @@ -72,3 +75,5 @@ vec1 = "1" pubgrub = "0.3" # Open the user's web browser opener = "0" +# Recursively traversing directories +ignore = "0" diff --git a/Cross.toml b/Cross.toml index b538ced32..1c22a331e 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2020 The Gleam contributors + [target.x86_64-unknown-linux-musl] image = "clux/muslrust:stable" diff --git a/README.md b/README.md index 43d20ba8c..8230d3432 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + +

Lucy, Gleam's mascot

diff --git a/RELEASE.md b/RELEASE.md index 8b188c28b..416ee11d9 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,3 +1,8 @@ + + # Release checklist 1. Write release post on website. diff --git a/benchmark/list/gleam.toml b/benchmark/list/gleam.toml index ef8feff60..5d53cba1b 100644 --- a/benchmark/list/gleam.toml +++ b/benchmark/list/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "list" version = "1.0.0" description = "Benchmarks for lists" diff --git a/benchmark/list/manifest.toml b/benchmark/list/manifest.toml index 602ed7017..81484ef90 100644 --- a/benchmark/list/manifest.toml +++ b/benchmark/list/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/benchmark/list/src/list.gleam b/benchmark/list/src/list.gleam index 4ead3b10c..056a95137 100644 --- a/benchmark/list/src/list.gleam +++ b/benchmark/list/src/list.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub fn main() { Nil } diff --git a/benchmark/list/test/benchmarks.gleam b/benchmark/list/test/benchmarks.gleam index 0fa0c9f55..6f4451844 100644 --- a/benchmark/list/test/benchmarks.gleam +++ b/benchmark/list/test/benchmarks.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleamy/bench import gleam/io diff --git a/benchmark/list/test/list_test.gleam b/benchmark/list/test/list_test.gleam index 90746b3a3..d0af368a9 100644 --- a/benchmark/list/test/list_test.gleam +++ b/benchmark/list/test/list_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import benchmarks.{print_results} import gleam/list import gleamy/bench diff --git a/bin/add-nightly-suffix-to-versions.sh b/bin/add-nightly-suffix-to-versions.sh index d439dbd46..6cf3313b6 100755 --- a/bin/add-nightly-suffix-to-versions.sh +++ b/bin/add-nightly-suffix-to-versions.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + #!/bin/sh # diff --git a/changelog/v1.1.md b/changelog/v1.1.md index 232a68c6b..ead51a709 100644 --- a/changelog/v1.1.md +++ b/changelog/v1.1.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.1.0 - 2024-04-16 diff --git a/changelog/v1.10.md b/changelog/v1.10.md index 9266b3fbe..12ef46df5 100644 --- a/changelog/v1.10.md +++ b/changelog/v1.10.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.10.0 - 2025-04-14 diff --git a/changelog/v1.11.md b/changelog/v1.11.md index f8a62c47a..feee9cb9b 100644 --- a/changelog/v1.11.md +++ b/changelog/v1.11.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.11.0 - 2025-06-02 diff --git a/changelog/v1.12.md b/changelog/v1.12.md index f2fd000f1..1a2655036 100644 --- a/changelog/v1.12.md +++ b/changelog/v1.12.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.12.0 - 2025-08-05 diff --git a/changelog/v1.13.md b/changelog/v1.13.md index aa82c3d94..81724d707 100644 --- a/changelog/v1.13.md +++ b/changelog/v1.13.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.13.0 - 2025-10-19 diff --git a/changelog/v1.14.md b/changelog/v1.14.md index 81b92d3d5..a4e779398 100644 --- a/changelog/v1.14.md +++ b/changelog/v1.14.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.14.0 - 2025-12-25 🎁 diff --git a/changelog/v1.15.md b/changelog/v1.15.md index dca815b69..55bce76c1 100644 --- a/changelog/v1.15.md +++ b/changelog/v1.15.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.15.0 - 2026-03-16 diff --git a/changelog/v1.16.md b/changelog/v1.16.md index bde80edab..f49b068eb 100644 --- a/changelog/v1.16.md +++ b/changelog/v1.16.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.16.0 - 2026-04-24 diff --git a/changelog/v1.17.md b/changelog/v1.17.md index 4073490c8..11c95789b 100644 --- a/changelog/v1.17.md +++ b/changelog/v1.17.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.17.0 - 2026-06-02 diff --git a/changelog/v1.2.md b/changelog/v1.2.md index 5b193a348..eed8a67c7 100644 --- a/changelog/v1.2.md +++ b/changelog/v1.2.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.2.0 - 2024-05-27 diff --git a/changelog/v1.3.md b/changelog/v1.3.md index 5adcc50da..2344a600b 100644 --- a/changelog/v1.3.md +++ b/changelog/v1.3.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.3.0 - 2024-07-09 diff --git a/changelog/v1.4.md b/changelog/v1.4.md index c9a901841..f90b1af7b 100644 --- a/changelog/v1.4.md +++ b/changelog/v1.4.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.4.0 - 2024-08-02 diff --git a/changelog/v1.5.md b/changelog/v1.5.md index 953f24657..5bf23e262 100644 --- a/changelog/v1.5.md +++ b/changelog/v1.5.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.5.0 - 2024-09-19 diff --git a/changelog/v1.6.md b/changelog/v1.6.md index 916ce6339..bc86adc43 100644 --- a/changelog/v1.6.md +++ b/changelog/v1.6.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.6.0 - 2024-11-18 diff --git a/changelog/v1.7.md b/changelog/v1.7.md index 576533507..c16335ba8 100644 --- a/changelog/v1.7.md +++ b/changelog/v1.7.md @@ -1,3 +1,8 @@ + + # Changelog ## 1.7.0 - 2025-01-05 diff --git a/changelog/v1.8.md b/changelog/v1.8.md index 47eda63c7..99f53838f 100644 --- a/changelog/v1.8.md +++ b/changelog/v1.8.md @@ -1,3 +1,8 @@ + + # Changelog Dedicated to the memory of Len Pilfold. diff --git a/changelog/v1.9.md b/changelog/v1.9.md index f62fbaa8c..314e95287 100644 --- a/changelog/v1.9.md +++ b/changelog/v1.9.md @@ -1,3 +1,8 @@ + + # Changelog ## v1.9.0 - 2025-03-09 diff --git a/compiler-cli/Cargo.toml b/compiler-cli/Cargo.toml index 902a5fa7f..9fa0ee286 100644 --- a/compiler-cli/Cargo.toml +++ b/compiler-cli/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2020 The Gleam contributors + [package] name = "gleam-cli" version = "1.17.0" @@ -12,8 +15,6 @@ gleam-core = { path = "../compiler-core" } gleam-language-server = { path = "../language-server" } # OS SIGINT and SIGTERM signal handling ctrlc = { version = "3", features = ["termination"] } -# Recursively traversing directories -ignore = "0" # Allow user to type in sensitive information without showing it in the shell rpassword = "7" # Async runtime @@ -45,13 +46,15 @@ ecow.workspace = true flate2.workspace = true futures.workspace = true hexpm = { path = "../hexpm" } -http.workspace = true http-serde.workspace = true +http.workspace = true +ignore.workspace = true im.workspace = true itertools.workspace = true lsp-server.workspace = true lsp-types.workspace = true opener.workspace = true +pubgrub.workspace = true regex.workspace = true serde.workspace = true serde_json.workspace = true @@ -60,7 +63,6 @@ tar.workspace = true termcolor.workspace = true toml.workspace = true tracing.workspace = true -pubgrub.workspace = true [dev-dependencies] # Creation of temporary directories diff --git a/compiler-cli/clippy.toml b/compiler-cli/clippy.toml index 14bd5669f..8e81ea0f0 100644 --- a/compiler-cli/clippy.toml +++ b/compiler-cli/clippy.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + disallowed-methods = [ { path = "std::path::Path::new", reason = "Manually constructed paths should use camino::Utf8Path" }, { path = "std::path::PathBuf::new", reason = "Manually constructed pathbufs should use camino::Utf8Path" }, diff --git a/compiler-cli/src/add.rs b/compiler-cli/src/add.rs index 837ee112d..62625b313 100644 --- a/compiler-cli/src/add.rs +++ b/compiler-cli/src/add.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use camino::{Utf8Path, Utf8PathBuf}; use gleam_core::{ diff --git a/compiler-cli/src/beam_compiler.rs b/compiler-cli/src/beam_compiler.rs index 65e6a59d5..31d776393 100644 --- a/compiler-cli/src/beam_compiler.rs +++ b/compiler-cli/src/beam_compiler.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use gleam_core::{ Result, error::{Error, ShellCommandFailureReason}, diff --git a/compiler-cli/src/build.rs b/compiler-cli/src/build.rs index 6c72ced81..839a18629 100644 --- a/compiler-cli/src/build.rs +++ b/compiler-cli/src/build.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use std::{rc::Rc, time::Instant}; use gleam_core::{ diff --git a/compiler-cli/src/build_lock.rs b/compiler-cli/src/build_lock.rs index df6949204..1b0019fa9 100644 --- a/compiler-cli/src/build_lock.rs +++ b/compiler-cli/src/build_lock.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use camino::Utf8PathBuf; use gleam_core::{ Error, Result, diff --git a/compiler-cli/src/cli.rs b/compiler-cli/src/cli.rs index d74a1454f..7676defe3 100644 --- a/compiler-cli/src/cli.rs +++ b/compiler-cli/src/cli.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use ecow::EcoString; use gleam_core::{ build::Telemetry, diff --git a/compiler-cli/src/compile_package.rs b/compiler-cli/src/compile_package.rs index 18f85c1e0..c18b195b7 100644 --- a/compiler-cli/src/compile_package.rs +++ b/compiler-cli/src/compile_package.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use crate::{ CompilePackage, config, fs::{self, ConsoleWarningEmitter, ProjectIO}, diff --git a/compiler-cli/src/config.rs b/compiler-cli/src/config.rs index 5425d8eeb..b3d446d22 100644 --- a/compiler-cli/src/config.rs +++ b/compiler-cli/src/config.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use camino::Utf8PathBuf; use gleam_core::{ diff --git a/compiler-cli/src/dependencies.rs b/compiler-cli/src/dependencies.rs index 30d13383d..ef317a02f 100644 --- a/compiler-cli/src/dependencies.rs +++ b/compiler-cli/src/dependencies.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + mod dependency_manager; use std::{ diff --git a/compiler-cli/src/dependencies/dependency_manager.rs b/compiler-cli/src/dependencies/dependency_manager.rs index 0dd7c8366..59fefa0a9 100644 --- a/compiler-cli/src/dependencies/dependency_manager.rs +++ b/compiler-cli/src/dependencies/dependency_manager.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use ecow::EcoString; use futures::future; use gleam_core::{ diff --git a/compiler-cli/src/dependencies/tests.rs b/compiler-cli/src/dependencies/tests.rs index 6be8a4bca..787a3395a 100644 --- a/compiler-cli/src/dependencies/tests.rs +++ b/compiler-cli/src/dependencies/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use std::collections::HashMap; use camino::{Utf8Path, Utf8PathBuf}; diff --git a/compiler-cli/src/docs.rs b/compiler-cli/src/docs.rs index 64b632a83..b9d1efffb 100644 --- a/compiler-cli/src/docs.rs +++ b/compiler-cli/src/docs.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use std::{collections::HashMap, time::SystemTime}; use camino::{Utf8Path, Utf8PathBuf}; diff --git a/compiler-cli/src/export.rs b/compiler-cli/src/export.rs index 51bea2a18..807822c15 100644 --- a/compiler-cli/src/export.rs +++ b/compiler-cli/src/export.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::fs::{self, ZipArchive}; use camino::Utf8PathBuf; use gleam_core::{ diff --git a/compiler-cli/src/fix.rs b/compiler-cli/src/fix.rs index 98af108f3..bddf6650f 100644 --- a/compiler-cli/src/fix.rs +++ b/compiler-cli/src/fix.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use std::rc::Rc; use gleam_core::{ diff --git a/compiler-cli/src/format.rs b/compiler-cli/src/format.rs index 07cac7370..3d7543148 100644 --- a/compiler-cli/src/format.rs +++ b/compiler-cli/src/format.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use gleam_core::{ error::{Error, FileIoAction, FileKind, Result, StandardIoAction, Unformatted}, io::Content, diff --git a/compiler-cli/src/fs.rs b/compiler-cli/src/fs.rs index 198b6bfc2..e27220b63 100644 --- a/compiler-cli/src/fs.rs +++ b/compiler-cli/src/fs.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use gleam_core::{ Result, Warning, build::{NullTelemetry, Target}, diff --git a/compiler-cli/src/fs/tests.rs b/compiler-cli/src/fs/tests.rs index 73039d32d..f7aacbc43 100644 --- a/compiler-cli/src/fs/tests.rs +++ b/compiler-cli/src/fs/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use camino::Utf8Path; use itertools::Itertools; diff --git a/compiler-cli/src/hex.rs b/compiler-cli/src/hex.rs index b223ec769..ec8c4cd68 100644 --- a/compiler-cli/src/hex.rs +++ b/compiler-cli/src/hex.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + mod auth; use crate::{cli, http::HttpClient}; diff --git a/compiler-cli/src/hex/auth.rs b/compiler-cli/src/hex/auth.rs index a943749a8..7ceeb8fa7 100644 --- a/compiler-cli/src/hex/auth.rs +++ b/compiler-cli/src/hex/auth.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::{cli, http::HttpClient}; use ecow::EcoString; use gleam_core::{ diff --git a/compiler-cli/src/http.rs b/compiler-cli/src/http.rs index 5f010871f..cc8c88265 100644 --- a/compiler-cli/src/http.rs +++ b/compiler-cli/src/http.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use std::convert::TryInto; use std::sync::OnceLock; diff --git a/compiler-cli/src/lib.rs b/compiler-cli/src/lib.rs index b21eca09e..e097c076e 100644 --- a/compiler-cli/src/lib.rs +++ b/compiler-cli/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + #![warn( clippy::all, clippy::dbg_macro, diff --git a/compiler-cli/src/lsp.rs b/compiler-cli/src/lsp.rs index 5dc3201d6..d3eb92e21 100644 --- a/compiler-cli/src/lsp.rs +++ b/compiler-cli/src/lsp.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::{ build_lock::{BuildLock, Guard}, fs::ProjectIO, diff --git a/compiler-cli/src/new.rs b/compiler-cli/src/new.rs index 0a4b39710..c9b1327dd 100644 --- a/compiler-cli/src/new.rs +++ b/compiler-cli/src/new.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + use camino::{Utf8Path, Utf8PathBuf}; use clap::ValueEnum; use gleam_core::{ diff --git a/compiler-cli/src/new/tests.rs b/compiler-cli/src/new/tests.rs index ea92c62d3..b39dbe667 100644 --- a/compiler-cli/src/new/tests.rs +++ b/compiler-cli/src/new/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use std::path::PathBuf; use camino::{Utf8Path, Utf8PathBuf}; diff --git a/compiler-cli/src/owner.rs b/compiler-cli/src/owner.rs index f7eb2239e..efc81802f 100644 --- a/compiler-cli/src/owner.rs +++ b/compiler-cli/src/owner.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::{cli, http::HttpClient}; use gleam_core::{Result, hex}; diff --git a/compiler-cli/src/panic.rs b/compiler-cli/src/panic.rs index b52aa6156..5884aede6 100644 --- a/compiler-cli/src/panic.rs +++ b/compiler-cli/src/panic.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + #![allow(clippy::unwrap_used)] use std::panic::PanicHookInfo; diff --git a/compiler-cli/src/publish.rs b/compiler-cli/src/publish.rs index e9a2430c6..b2e353ba1 100644 --- a/compiler-cli/src/publish.rs +++ b/compiler-cli/src/publish.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use camino::{Utf8Path, Utf8PathBuf}; use ecow::EcoString; use flate2::{Compression, write::GzEncoder}; diff --git a/compiler-cli/src/remove.rs b/compiler-cli/src/remove.rs index f4bb22936..375e982f2 100644 --- a/compiler-cli/src/remove.rs +++ b/compiler-cli/src/remove.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use gleam_core::{ Error, Result, error::{FileIoAction, FileKind}, diff --git a/compiler-cli/src/run.rs b/compiler-cli/src/run.rs index 099fba9cf..dbc70cf99 100644 --- a/compiler-cli/src/run.rs +++ b/compiler-cli/src/run.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use std::sync::OnceLock; use camino::Utf8PathBuf; diff --git a/compiler-cli/src/shell.rs b/compiler-cli/src/shell.rs index 550476357..5d9b31c01 100644 --- a/compiler-cli/src/shell.rs +++ b/compiler-cli/src/shell.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use gleam_core::{ analyse::TargetSupport, build::{Codegen, Compile, Mode, Options, Target}, diff --git a/compiler-cli/src/text_layout.rs b/compiler-cli/src/text_layout.rs index af7bd4fbc..fb46f3722 100644 --- a/compiler-cli/src/text_layout.rs +++ b/compiler-cli/src/text_layout.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use ecow::EcoString; /// Generates a string delimeted table with 2 spaces between each column, columns padded with diff --git a/compiler-cli/templates/erlang-shipment-entrypoint.sh b/compiler-cli/templates/erlang-shipment-entrypoint.sh index 0e2930a98..f93cc13e4 100644 --- a/compiler-cli/templates/erlang-shipment-entrypoint.sh +++ b/compiler-cli/templates/erlang-shipment-entrypoint.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + #!/bin/sh set -eu diff --git a/compiler-cli/templates/gleam@@compile.erl b/compiler-cli/templates/gleam@@compile.erl index b6bfd4fa7..c204c7520 100644 --- a/compiler-cli/templates/gleam@@compile.erl +++ b/compiler-cli/templates/gleam@@compile.erl @@ -1,4 +1,7 @@ #!/usr/bin/env escript +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2022 The Gleam contributors + -mode(compile). main(_) -> diff --git a/compiler-cli/test/hello_world/gleam.toml b/compiler-cli/test/hello_world/gleam.toml index 2d226f42a..dc38f5571 100644 --- a/compiler-cli/test/hello_world/gleam.toml +++ b/compiler-cli/test/hello_world/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + name = "hello_world" version = "0.1.0" diff --git a/compiler-cli/test/hello_world/manifest.toml b/compiler-cli/test/hello_world/manifest.toml index 344e0097f..98c5ed376 100644 --- a/compiler-cli/test/hello_world/manifest.toml +++ b/compiler-cli/test/hello_world/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/compiler-core/Cargo.toml b/compiler-core/Cargo.toml index ba29cc118..d127c43c3 100644 --- a/compiler-core/Cargo.toml +++ b/compiler-core/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2020 The Gleam contributors + [package] name = "gleam-core" version = "1.17.0" @@ -82,6 +85,7 @@ insta.workspace = true rand = "0.9" # Time types time = "0.3" +ignore.workspace = true [build-dependencies] # Data (de)serialisation diff --git a/compiler-core/clippy.toml b/compiler-core/clippy.toml index a7a48891c..97cee44f7 100644 --- a/compiler-core/clippy.toml +++ b/compiler-core/clippy.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + disallowed-methods = [ { path = "std::env::current_dir", reason = "IO is not permitted in core" }, { path = "std::path::Path::canonicalize", reason = "IO is not permitted in core" }, diff --git a/compiler-core/src/analyse.rs b/compiler-core/src/analyse.rs index a1fa3a329..b54cbdbbf 100644 --- a/compiler-core/src/analyse.rs +++ b/compiler-core/src/analyse.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + mod imports; pub mod name; diff --git a/compiler-core/src/analyse/imports.rs b/compiler-core/src/analyse/imports.rs index c9d048cbd..664136630 100644 --- a/compiler-core/src/analyse/imports.rs +++ b/compiler-core/src/analyse/imports.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use ecow::EcoString; use crate::{ diff --git a/compiler-core/src/analyse/name.rs b/compiler-core/src/analyse/name.rs index 5c0afacdd..2ff90e938 100644 --- a/compiler-core/src/analyse/name.rs +++ b/compiler-core/src/analyse/name.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use std::sync::OnceLock; use ecow::{EcoString, eco_format}; diff --git a/compiler-core/src/analyse/tests.rs b/compiler-core/src/analyse/tests.rs index 46f9b46a0..253503c82 100644 --- a/compiler-core/src/analyse/tests.rs +++ b/compiler-core/src/analyse/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use super::*; #[test] diff --git a/compiler-core/src/ast.rs b/compiler-core/src/ast.rs index ab819dab0..6af9ede91 100644 --- a/compiler-core/src/ast.rs +++ b/compiler-core/src/ast.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + mod constant; mod typed; mod untyped; diff --git a/compiler-core/src/ast/constant.rs b/compiler-core/src/ast/constant.rs index 223562fc0..cd80e3123 100644 --- a/compiler-core/src/ast/constant.rs +++ b/compiler-core/src/ast/constant.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use super::*; use crate::analyse::Inferred; use crate::type_::{FieldMap, HasType}; diff --git a/compiler-core/src/ast/tests.rs b/compiler-core/src/ast/tests.rs index 378f8af01..e9f8ba6ec 100644 --- a/compiler-core/src/ast/tests.rs +++ b/compiler-core/src/ast/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use std::sync::Arc; use camino::Utf8PathBuf; diff --git a/compiler-core/src/ast/typed.rs b/compiler-core/src/ast/typed.rs index d9fb9a30d..b2b935424 100644 --- a/compiler-core/src/ast/typed.rs +++ b/compiler-core/src/ast/typed.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use type_::{FieldMap, TypedCallArg}; use super::*; diff --git a/compiler-core/src/ast/untyped.rs b/compiler-core/src/ast/untyped.rs index 1c1532f90..a4e0a2739 100644 --- a/compiler-core/src/ast/untyped.rs +++ b/compiler-core/src/ast/untyped.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use vec1::Vec1; use crate::parse::LiteralFloatValue; diff --git a/compiler-core/src/ast/visit.rs b/compiler-core/src/ast/visit.rs index a4e24b2bc..500b712c4 100644 --- a/compiler-core/src/ast/visit.rs +++ b/compiler-core/src/ast/visit.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + //! AST traversal routines, referenced from [`syn::visit`](https://docs.rs/syn/latest/syn/visit/index.html) //! //! Each method of the [`Visit`] trait can be overridden to customize the diff --git a/compiler-core/src/ast_folder.rs b/compiler-core/src/ast_folder.rs index b38b0b077..7477fcd26 100644 --- a/compiler-core/src/ast_folder.rs +++ b/compiler-core/src/ast_folder.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use ecow::EcoString; use itertools::Itertools; use num_bigint::BigInt; diff --git a/compiler-core/src/bit_array.rs b/compiler-core/src/bit_array.rs index d9ee5e067..e5da5c3a1 100644 --- a/compiler-core/src/bit_array.rs +++ b/compiler-core/src/bit_array.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use ecow::EcoString; use num_bigint::BigInt; diff --git a/compiler-core/src/build.rs b/compiler-core/src/build.rs index 6cb24144a..4e8a10d9f 100644 --- a/compiler-core/src/build.rs +++ b/compiler-core/src/build.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + #![allow(warnings)] mod elixir_libraries; diff --git a/compiler-core/src/build/elixir_libraries.rs b/compiler-core/src/build/elixir_libraries.rs index a2a14a111..54b17737a 100644 --- a/compiler-core/src/build/elixir_libraries.rs +++ b/compiler-core/src/build/elixir_libraries.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{ Error, error::ShellCommandFailureReason, diff --git a/compiler-core/src/build/module_loader.rs b/compiler-core/src/build/module_loader.rs index 5439d7da8..d0c5fbe81 100644 --- a/compiler-core/src/build/module_loader.rs +++ b/compiler-core/src/build/module_loader.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + #[cfg(test)] mod tests; diff --git a/compiler-core/src/build/module_loader/tests.rs b/compiler-core/src/build/module_loader/tests.rs index eeca162f5..f813285db 100644 --- a/compiler-core/src/build/module_loader/tests.rs +++ b/compiler-core/src/build/module_loader/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use super::*; use crate::{ build::SourceFingerprint, diff --git a/compiler-core/src/build/native_file_copier.rs b/compiler-core/src/build/native_file_copier.rs index 690a3acb2..aa194187d 100644 --- a/compiler-core/src/build/native_file_copier.rs +++ b/compiler-core/src/build/native_file_copier.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + #[cfg(test)] mod tests; diff --git a/compiler-core/src/build/native_file_copier/tests.rs b/compiler-core/src/build/native_file_copier/tests.rs index 45a063096..c754481a9 100644 --- a/compiler-core/src/build/native_file_copier/tests.rs +++ b/compiler-core/src/build/native_file_copier/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use super::NativeFileCopier; use crate::{ build::{native_file_copier::CopiedNativeFiles, package_compiler::CheckModuleConflicts}, diff --git a/compiler-core/src/build/package_compiler.rs b/compiler-core/src/build/package_compiler.rs index 6fc1d0fe7..ce862dac6 100644 --- a/compiler-core/src/build/package_compiler.rs +++ b/compiler-core/src/build/package_compiler.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + #[cfg(test)] mod tests; diff --git a/compiler-core/src/build/package_compiler/tests.rs b/compiler-core/src/build/package_compiler/tests.rs index 402249e88..afe73059f 100644 --- a/compiler-core/src/build/package_compiler/tests.rs +++ b/compiler-core/src/build/package_compiler/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + use std::collections::HashSet; use camino::Utf8Path; diff --git a/compiler-core/src/build/package_loader.rs b/compiler-core/src/build/package_loader.rs index 460e995cb..9585ae11b 100644 --- a/compiler-core/src/build/package_loader.rs +++ b/compiler-core/src/build/package_loader.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + #[cfg(test)] mod tests; diff --git a/compiler-core/src/build/package_loader/tests.rs b/compiler-core/src/build/package_loader/tests.rs index 642bb3ec8..74d6fd3a4 100644 --- a/compiler-core/src/build/package_loader/tests.rs +++ b/compiler-core/src/build/package_loader/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use ecow::{EcoString, eco_format}; use hexpm::version::Version; diff --git a/compiler-core/src/build/project_compiler.rs b/compiler-core/src/build/project_compiler.rs index 698c30967..7298b5e66 100644 --- a/compiler-core/src/build/project_compiler.rs +++ b/compiler-core/src/build/project_compiler.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use crate::{ Error, Result, Warning, analyse::TargetSupport, diff --git a/compiler-core/src/build/telemetry.rs b/compiler-core/src/build/telemetry.rs index 02344ef52..5ed6a2c3a 100644 --- a/compiler-core/src/build/telemetry.rs +++ b/compiler-core/src/build/telemetry.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use std::{ fmt::Debug, time::{Duration, Instant}, diff --git a/compiler-core/src/build/tests.rs b/compiler-core/src/build/tests.rs index 03b48e908..357b36864 100644 --- a/compiler-core/src/build/tests.rs +++ b/compiler-core/src/build/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::{Error, manifest::ManifestPackage}; use super::project_compiler::{BuildTool, usable_build_tools}; diff --git a/compiler-core/src/call_graph.rs b/compiler-core/src/call_graph.rs index 6a7868c3e..24d115cc5 100644 --- a/compiler-core/src/call_graph.rs +++ b/compiler-core/src/call_graph.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + //! Graphs that represent the relationships between entities in a Gleam module, //! such as module functions or constants. diff --git a/compiler-core/src/call_graph/into_dependency_order_tests.rs b/compiler-core/src/call_graph/into_dependency_order_tests.rs index f286a7b60..096968e08 100644 --- a/compiler-core/src/call_graph/into_dependency_order_tests.rs +++ b/compiler-core/src/call_graph/into_dependency_order_tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use super::*; use crate::{ ast::{Arg, Function, ModuleConstant, Publicity}, diff --git a/compiler-core/src/codegen.rs b/compiler-core/src/codegen.rs index 82942f98f..09adb2fe7 100644 --- a/compiler-core/src/codegen.rs +++ b/compiler-core/src/codegen.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use crate::{ Result, build::{ diff --git a/compiler-core/src/config.rs b/compiler-core/src/config.rs index ed3205c73..2c3d1411d 100644 --- a/compiler-core/src/config.rs +++ b/compiler-core/src/config.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + mod stale_package_remover; use crate::error::{FileIoAction, FileKind}; use crate::io::FileSystemReader; diff --git a/compiler-core/src/config/stale_package_remover.rs b/compiler-core/src/config/stale_package_remover.rs index 1f86449a5..6163d79a4 100644 --- a/compiler-core/src/config/stale_package_remover.rs +++ b/compiler-core/src/config/stale_package_remover.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::manifest::Manifest; use crate::requirement::Requirement; use ecow::EcoString; diff --git a/compiler-core/src/dep_tree.rs b/compiler-core/src/dep_tree.rs index 6e1a4dc88..7e0497a23 100644 --- a/compiler-core/src/dep_tree.rs +++ b/compiler-core/src/dep_tree.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use ecow::EcoString; use petgraph::{Direction, algo::Cycle, graph::NodeIndex}; use std::collections::{HashMap, HashSet}; diff --git a/compiler-core/src/dependency.rs b/compiler-core/src/dependency.rs index 171bfea82..37690be10 100644 --- a/compiler-core/src/dependency.rs +++ b/compiler-core/src/dependency.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use std::{cell::RefCell, cmp::Reverse, collections::HashMap, rc::Rc}; use crate::{Error, Result, manifest}; diff --git a/compiler-core/src/derivation_tree.rs b/compiler-core/src/derivation_tree.rs index 2a710418d..0034c16b5 100644 --- a/compiler-core/src/derivation_tree.rs +++ b/compiler-core/src/derivation_tree.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::error::wrap; use ecow::EcoString; use hexpm::version::Version; diff --git a/compiler-core/src/diagnostic.rs b/compiler-core/src/diagnostic.rs index 5e53a05f2..197ea88af 100644 --- a/compiler-core/src/diagnostic.rs +++ b/compiler-core/src/diagnostic.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use std::collections::HashMap; use camino::Utf8PathBuf; diff --git a/compiler-core/src/docs.rs b/compiler-core/src/docs.rs index 8e9b5c03d..047961fc7 100644 --- a/compiler-core/src/docs.rs +++ b/compiler-core/src/docs.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + mod printer; mod source_links; #[cfg(test)] diff --git a/compiler-core/src/docs/printer.rs b/compiler-core/src/docs/printer.rs index 3f65815e1..1c796eaa7 100644 --- a/compiler-core/src/docs/printer.rs +++ b/compiler-core/src/docs/printer.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use std::{ collections::{HashMap, HashSet}, ops::Deref, diff --git a/compiler-core/src/docs/source_links.rs b/compiler-core/src/docs/source_links.rs index 8c6539610..183f742d1 100644 --- a/compiler-core/src/docs/source_links.rs +++ b/compiler-core/src/docs/source_links.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use crate::{ ast::SrcSpan, build, diff --git a/compiler-core/src/docs/tests.rs b/compiler-core/src/docs/tests.rs index 14995bea1..d39b1046f 100644 --- a/compiler-core/src/docs/tests.rs +++ b/compiler-core/src/docs/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use std::{ collections::{HashMap, HashSet}, time::SystemTime, diff --git a/compiler-core/src/encryption.rs b/compiler-core/src/encryption.rs index 309a5d5be..f5e683a54 100644 --- a/compiler-core/src/encryption.rs +++ b/compiler-core/src/encryption.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use thiserror::Error; pub fn encrypt_with_passphrase( diff --git a/compiler-core/src/erlang.rs b/compiler-core/src/erlang.rs index 919c220c1..ef71d8b39 100644 --- a/compiler-core/src/erlang.rs +++ b/compiler-core/src/erlang.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + // TODO: Refactor this module to be methods on structs rather than free // functions with a load of arguments. See the JavaScript code generator and the // formatter for examples. diff --git a/compiler-core/src/erlang/pattern.rs b/compiler-core/src/erlang/pattern.rs index 2276851ad..e97c80b16 100644 --- a/compiler-core/src/erlang/pattern.rs +++ b/compiler-core/src/erlang/pattern.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use ecow::eco_format; use crate::analyse::Inferred; diff --git a/compiler-core/src/erlang/tests.rs b/compiler-core/src/erlang/tests.rs index b3c116fe5..7b1beb5b7 100644 --- a/compiler-core/src/erlang/tests.rs +++ b/compiler-core/src/erlang/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + use std::time::SystemTime; use camino::Utf8PathBuf; diff --git a/compiler-core/src/erlang/tests/assert.rs b/compiler-core/src/erlang/tests/assert.rs index 4ed4cd652..1bc86466d 100644 --- a/compiler-core/src/erlang/tests/assert.rs +++ b/compiler-core/src/erlang/tests/assert.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/bit_arrays.rs b/compiler-core/src/erlang/tests/bit_arrays.rs index 104c399d1..f9ac320f4 100644 --- a/compiler-core/src/erlang/tests/bit_arrays.rs +++ b/compiler-core/src/erlang/tests/bit_arrays.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/case.rs b/compiler-core/src/erlang/tests/case.rs index 8e8e305f8..89d0462cd 100644 --- a/compiler-core/src/erlang/tests/case.rs +++ b/compiler-core/src/erlang/tests/case.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::assert_erl; // https://github.com/gleam-lang/gleam/issues/1675 diff --git a/compiler-core/src/erlang/tests/conditional_compilation.rs b/compiler-core/src/erlang/tests/conditional_compilation.rs index 6a3b6cb84..619e034bc 100644 --- a/compiler-core/src/erlang/tests/conditional_compilation.rs +++ b/compiler-core/src/erlang/tests/conditional_compilation.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/consts.rs b/compiler-core/src/erlang/tests/consts.rs index a0ac45e05..54d536126 100644 --- a/compiler-core/src/erlang/tests/consts.rs +++ b/compiler-core/src/erlang/tests/consts.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_erl; // https://github.com/gleam-lang/gleam/issues/2163 diff --git a/compiler-core/src/erlang/tests/custom_types.rs b/compiler-core/src/erlang/tests/custom_types.rs index 42fafba28..db6549f15 100644 --- a/compiler-core/src/erlang/tests/custom_types.rs +++ b/compiler-core/src/erlang/tests/custom_types.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/documentation.rs b/compiler-core/src/erlang/tests/documentation.rs index 9288e0c33..877790daf 100644 --- a/compiler-core/src/erlang/tests/documentation.rs +++ b/compiler-core/src/erlang/tests/documentation.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/echo.rs b/compiler-core/src/erlang/tests/echo.rs index 478b636e1..f9c190be5 100644 --- a/compiler-core/src/erlang/tests/echo.rs +++ b/compiler-core/src/erlang/tests/echo.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/external_fn.rs b/compiler-core/src/erlang/tests/external_fn.rs index 48eebbae6..8683a97e5 100644 --- a/compiler-core/src/erlang/tests/external_fn.rs +++ b/compiler-core/src/erlang/tests/external_fn.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::{assert_erl, assert_js_module_error, assert_module_error}; #[test] diff --git a/compiler-core/src/erlang/tests/functions.rs b/compiler-core/src/erlang/tests/functions.rs index 7262594c9..358885393 100644 --- a/compiler-core/src/erlang/tests/functions.rs +++ b/compiler-core/src/erlang/tests/functions.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/guards.rs b/compiler-core/src/erlang/tests/guards.rs index 4a91fc9ed..77413aa97 100644 --- a/compiler-core/src/erlang/tests/guards.rs +++ b/compiler-core/src/erlang/tests/guards.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/inlining.rs b/compiler-core/src/erlang/tests/inlining.rs index 6506fd9a9..ad8fe1f05 100644 --- a/compiler-core/src/erlang/tests/inlining.rs +++ b/compiler-core/src/erlang/tests/inlining.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::assert_erl; const BOOL_MODULE: &str = " diff --git a/compiler-core/src/erlang/tests/let_assert.rs b/compiler-core/src/erlang/tests/let_assert.rs index 8545fdd9c..5db56936a 100644 --- a/compiler-core/src/erlang/tests/let_assert.rs +++ b/compiler-core/src/erlang/tests/let_assert.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/numbers.rs b/compiler-core/src/erlang/tests/numbers.rs index d0a7e9a01..0140ea983 100644 --- a/compiler-core/src/erlang/tests/numbers.rs +++ b/compiler-core/src/erlang/tests/numbers.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/panic.rs b/compiler-core/src/erlang/tests/panic.rs index e4c0bcb6d..6880d2e35 100644 --- a/compiler-core/src/erlang/tests/panic.rs +++ b/compiler-core/src/erlang/tests/panic.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/patterns.rs b/compiler-core/src/erlang/tests/patterns.rs index af7a15ecb..d5737ca52 100644 --- a/compiler-core/src/erlang/tests/patterns.rs +++ b/compiler-core/src/erlang/tests/patterns.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/pipes.rs b/compiler-core/src/erlang/tests/pipes.rs index 40c088d26..c8056b17e 100644 --- a/compiler-core/src/erlang/tests/pipes.rs +++ b/compiler-core/src/erlang/tests/pipes.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/prelude.rs b/compiler-core/src/erlang/tests/prelude.rs index 735171816..1e0260a7f 100644 --- a/compiler-core/src/erlang/tests/prelude.rs +++ b/compiler-core/src/erlang/tests/prelude.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/records.rs b/compiler-core/src/erlang/tests/records.rs index e1021e0ad..66dff519b 100644 --- a/compiler-core/src/erlang/tests/records.rs +++ b/compiler-core/src/erlang/tests/records.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; use crate::erlang::*; use crate::type_; diff --git a/compiler-core/src/erlang/tests/reserved.rs b/compiler-core/src/erlang/tests/reserved.rs index 285c40e9f..5ce5bf882 100644 --- a/compiler-core/src/erlang/tests/reserved.rs +++ b/compiler-core/src/erlang/tests/reserved.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/strings.rs b/compiler-core/src/erlang/tests/strings.rs index 8ee4406d0..64212b81a 100644 --- a/compiler-core/src/erlang/tests/strings.rs +++ b/compiler-core/src/erlang/tests/strings.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/todo.rs b/compiler-core/src/erlang/tests/todo.rs index 8b007411e..9f77b3508 100644 --- a/compiler-core/src/erlang/tests/todo.rs +++ b/compiler-core/src/erlang/tests/todo.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/type_params.rs b/compiler-core/src/erlang/tests/type_params.rs index e16e69855..4a1f4275e 100644 --- a/compiler-core/src/erlang/tests/type_params.rs +++ b/compiler-core/src/erlang/tests/type_params.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/use_.rs b/compiler-core/src/erlang/tests/use_.rs index a93f72897..da868318a 100644 --- a/compiler-core/src/erlang/tests/use_.rs +++ b/compiler-core/src/erlang/tests/use_.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/erlang/tests/variables.rs b/compiler-core/src/erlang/tests/variables.rs index 97e110788..14e06c4c5 100644 --- a/compiler-core/src/erlang/tests/variables.rs +++ b/compiler-core/src/erlang/tests/variables.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_erl; #[test] diff --git a/compiler-core/src/error.rs b/compiler-core/src/error.rs index 1d3ba849f..1bab87c27 100644 --- a/compiler-core/src/error.rs +++ b/compiler-core/src/error.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2019 The Gleam contributors + #![allow(clippy::unwrap_used, clippy::expect_used)] use crate::ast::{self, SrcSpan}; use crate::bit_array::UnsupportedOption; diff --git a/compiler-core/src/error/tests.rs b/compiler-core/src/error/tests.rs index bb06b48f9..a1e1635e3 100644 --- a/compiler-core/src/error/tests.rs +++ b/compiler-core/src/error/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use super::*; use insta::assert_debug_snapshot; use insta::assert_snapshot; diff --git a/compiler-core/src/exhaustiveness.rs b/compiler-core/src/exhaustiveness.rs index 4dd45947d..ccfa1e662 100644 --- a/compiler-core/src/exhaustiveness.rs +++ b/compiler-core/src/exhaustiveness.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + //! An implementation of the algorithm described in: //! //! - How to compile pattern matching, Jules Jacobs. diff --git a/compiler-core/src/exhaustiveness/missing_patterns.rs b/compiler-core/src/exhaustiveness/missing_patterns.rs index f061edcba..4032ee432 100644 --- a/compiler-core/src/exhaustiveness/missing_patterns.rs +++ b/compiler-core/src/exhaustiveness/missing_patterns.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use super::{CompileCaseResult, Decision, FallbackCheck, RuntimeCheck, Variable, printer::Printer}; use crate::type_::environment::Environment; use ecow::EcoString; diff --git a/compiler-core/src/exhaustiveness/printer.rs b/compiler-core/src/exhaustiveness/printer.rs index 4447b49c0..1afef2aba 100644 --- a/compiler-core/src/exhaustiveness/printer.rs +++ b/compiler-core/src/exhaustiveness/printer.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use std::collections::HashMap; use ecow::EcoString; diff --git a/compiler-core/src/fix.rs b/compiler-core/src/fix.rs index 3620a6162..2905ee999 100644 --- a/compiler-core/src/fix.rs +++ b/compiler-core/src/fix.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{ Error, Result, format::{Formatter, Intermediate}, diff --git a/compiler-core/src/format.rs b/compiler-core/src/format.rs index 5a27957ba..26a08df59 100644 --- a/compiler-core/src/format.rs +++ b/compiler-core/src/format.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + #[cfg(test)] mod tests; diff --git a/compiler-core/src/format/tests.rs b/compiler-core/src/format/tests.rs index 36d9f77c6..ba4d79263 100644 --- a/compiler-core/src/format/tests.rs +++ b/compiler-core/src/format/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use itertools::Itertools; use pretty_assertions::assert_eq; diff --git a/compiler-core/src/format/tests/asignments.rs b/compiler-core/src/format/tests/asignments.rs index ce88c31c5..6d7147f20 100644 --- a/compiler-core/src/format/tests/asignments.rs +++ b/compiler-core/src/format/tests/asignments.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_format; // https://github.com/gleam-lang/gleam/issues/2095 diff --git a/compiler-core/src/format/tests/binary_operators.rs b/compiler-core/src/format/tests/binary_operators.rs index 24501fb2b..10a4ff72f 100644 --- a/compiler-core/src/format/tests/binary_operators.rs +++ b/compiler-core/src/format/tests/binary_operators.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_format; // https://github.com/gleam-lang/gleam/issues/835 diff --git a/compiler-core/src/format/tests/bit_array.rs b/compiler-core/src/format/tests/bit_array.rs index 88440fe68..0696739df 100644 --- a/compiler-core/src/format/tests/bit_array.rs +++ b/compiler-core/src/format/tests/bit_array.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_format, assert_format_rewrite}; #[test] diff --git a/compiler-core/src/format/tests/blocks.rs b/compiler-core/src/format/tests/blocks.rs index f6c1fc952..287be7564 100644 --- a/compiler-core/src/format/tests/blocks.rs +++ b/compiler-core/src/format/tests/blocks.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_format; // https://github.com/gleam-lang/gleam/issues/2119 diff --git a/compiler-core/src/format/tests/cases.rs b/compiler-core/src/format/tests/cases.rs index 3af05e54d..3710552de 100644 --- a/compiler-core/src/format/tests/cases.rs +++ b/compiler-core/src/format/tests/cases.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::{assert_format, assert_format_rewrite}; #[test] diff --git a/compiler-core/src/format/tests/conditional_compilation.rs b/compiler-core/src/format/tests/conditional_compilation.rs index 1e7b3c7f2..c7bfb5a3d 100644 --- a/compiler-core/src/format/tests/conditional_compilation.rs +++ b/compiler-core/src/format/tests/conditional_compilation.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_format, assert_format_rewrite}; #[test] diff --git a/compiler-core/src/format/tests/constant.rs b/compiler-core/src/format/tests/constant.rs index 67eca3346..9a699cece 100644 --- a/compiler-core/src/format/tests/constant.rs +++ b/compiler-core/src/format/tests/constant.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::assert_format; // https://github.com/gleam-lang/gleam/issues/5143 diff --git a/compiler-core/src/format/tests/custom_type.rs b/compiler-core/src/format/tests/custom_type.rs index 87568100e..6e86fef64 100644 --- a/compiler-core/src/format/tests/custom_type.rs +++ b/compiler-core/src/format/tests/custom_type.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::assert_format; #[test] diff --git a/compiler-core/src/format/tests/echo.rs b/compiler-core/src/format/tests/echo.rs index 8173670b6..dbf1f8ba2 100644 --- a/compiler-core/src/format/tests/echo.rs +++ b/compiler-core/src/format/tests/echo.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::{assert_format, assert_format_rewrite}; #[test] diff --git a/compiler-core/src/format/tests/external_fn.rs b/compiler-core/src/format/tests/external_fn.rs index bec99743f..3110275dd 100644 --- a/compiler-core/src/format/tests/external_fn.rs +++ b/compiler-core/src/format/tests/external_fn.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_format; #[test] diff --git a/compiler-core/src/format/tests/external_types.rs b/compiler-core/src/format/tests/external_types.rs index 2889aa6f3..2f8d26c39 100644 --- a/compiler-core/src/format/tests/external_types.rs +++ b/compiler-core/src/format/tests/external_types.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_format; #[test] diff --git a/compiler-core/src/format/tests/function.rs b/compiler-core/src/format/tests/function.rs index 02cad9a95..7f16f564b 100644 --- a/compiler-core/src/format/tests/function.rs +++ b/compiler-core/src/format/tests/function.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_format, assert_format_rewrite}; #[test] diff --git a/compiler-core/src/format/tests/guards.rs b/compiler-core/src/format/tests/guards.rs index 7aff542dd..e359e36bb 100644 --- a/compiler-core/src/format/tests/guards.rs +++ b/compiler-core/src/format/tests/guards.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_format; #[test] diff --git a/compiler-core/src/format/tests/imports.rs b/compiler-core/src/format/tests/imports.rs index db1ab5703..3d9bba3f4 100644 --- a/compiler-core/src/format/tests/imports.rs +++ b/compiler-core/src/format/tests/imports.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_format, assert_format_rewrite}; #[test] diff --git a/compiler-core/src/format/tests/lists.rs b/compiler-core/src/format/tests/lists.rs index c92e80f0d..b8a78df2b 100644 --- a/compiler-core/src/format/tests/lists.rs +++ b/compiler-core/src/format/tests/lists.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::{assert_format, assert_format_rewrite}; #[test] diff --git a/compiler-core/src/format/tests/pipeline.rs b/compiler-core/src/format/tests/pipeline.rs index 1a9eb86b7..e2edc3776 100644 --- a/compiler-core/src/format/tests/pipeline.rs +++ b/compiler-core/src/format/tests/pipeline.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::{assert_format, assert_format_rewrite}; #[test] diff --git a/compiler-core/src/format/tests/record_update.rs b/compiler-core/src/format/tests/record_update.rs index 61424b63c..598544466 100644 --- a/compiler-core/src/format/tests/record_update.rs +++ b/compiler-core/src/format/tests/record_update.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::assert_format; #[test] diff --git a/compiler-core/src/format/tests/tuple.rs b/compiler-core/src/format/tests/tuple.rs index 6f0b59acd..1ebbc6715 100644 --- a/compiler-core/src/format/tests/tuple.rs +++ b/compiler-core/src/format/tests/tuple.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_format, assert_format_rewrite}; // https://github.com/gleam-lang/gleam/issues/2083 diff --git a/compiler-core/src/format/tests/use_.rs b/compiler-core/src/format/tests/use_.rs index 47dc42ede..914c42025 100644 --- a/compiler-core/src/format/tests/use_.rs +++ b/compiler-core/src/format/tests/use_.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::{assert_format, assert_format_rewrite}; #[test] diff --git a/compiler-core/src/hex.rs b/compiler-core/src/hex.rs index f69f53bda..8d069495f 100644 --- a/compiler-core/src/hex.rs +++ b/compiler-core/src/hex.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use camino::Utf8Path; use clap::ValueEnum; use debug_ignore::DebugIgnore; diff --git a/compiler-core/src/inline.rs b/compiler-core/src/inline.rs index a6bcca492..7eb784f11 100644 --- a/compiler-core/src/inline.rs +++ b/compiler-core/src/inline.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + //! This module implements the function inlining optimisation. This allows //! function calls to be inlined at the callsite, and replaced with the contents //! of the function which is being called. diff --git a/compiler-core/src/io.rs b/compiler-core/src/io.rs index a74de5bf7..028851a03 100644 --- a/compiler-core/src/io.rs +++ b/compiler-core/src/io.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub mod memory; use crate::error::{Error, FileIoAction, FileKind, Result}; diff --git a/compiler-core/src/io/memory.rs b/compiler-core/src/io/memory.rs index 39eb331f5..d26449a1e 100644 --- a/compiler-core/src/io/memory.rs +++ b/compiler-core/src/io/memory.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use super::*; use std::ops::Deref; use std::{ diff --git a/compiler-core/src/javascript.rs b/compiler-core/src/javascript.rs index 4a8c1f996..7a727be36 100644 --- a/compiler-core/src/javascript.rs +++ b/compiler-core/src/javascript.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + mod decision; mod expression; mod import; diff --git a/compiler-core/src/javascript/decision.rs b/compiler-core/src/javascript/decision.rs index b9c603290..06a901907 100644 --- a/compiler-core/src/javascript/decision.rs +++ b/compiler-core/src/javascript/decision.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use super::{ INDENT, bit_array_segment_int_value_to_bytes, expression::{self, Generator, Ordering, Scope, float, float_from_value}, diff --git a/compiler-core/src/javascript/expression.rs b/compiler-core/src/javascript/expression.rs index ed52b6323..2c650bca5 100644 --- a/compiler-core/src/javascript/expression.rs +++ b/compiler-core/src/javascript/expression.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use num_bigint::BigInt; use vec1::Vec1; diff --git a/compiler-core/src/javascript/import.rs b/compiler-core/src/javascript/import.rs index 08cbd8ef6..3864475f9 100644 --- a/compiler-core/src/javascript/import.rs +++ b/compiler-core/src/javascript/import.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use std::collections::{HashMap, HashSet}; use ecow::EcoString; diff --git a/compiler-core/src/javascript/tests.rs b/compiler-core/src/javascript/tests.rs index ce6ed341a..b5c06bdc6 100644 --- a/compiler-core/src/javascript/tests.rs +++ b/compiler-core/src/javascript/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{ analyse::TargetSupport, build::{Origin, Target}, diff --git a/compiler-core/src/javascript/tests/assert.rs b/compiler-core/src/javascript/tests/assert.rs index 8247127b4..480296801 100644 --- a/compiler-core/src/javascript/tests/assert.rs +++ b/compiler-core/src/javascript/tests/assert.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/tests/assignments.rs b/compiler-core/src/javascript/tests/assignments.rs index 1b84839da..9d7786df6 100644 --- a/compiler-core/src/javascript/tests/assignments.rs +++ b/compiler-core/src/javascript/tests/assignments.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{assert_js, assert_ts_def}; #[test] diff --git a/compiler-core/src/javascript/tests/bit_arrays.rs b/compiler-core/src/javascript/tests/bit_arrays.rs index f0f242b49..5d40c93cb 100644 --- a/compiler-core/src/javascript/tests/bit_arrays.rs +++ b/compiler-core/src/javascript/tests/bit_arrays.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use hexpm::version::Version; use pubgrub::Range; diff --git a/compiler-core/src/javascript/tests/blocks.rs b/compiler-core/src/javascript/tests/blocks.rs index 9fa62e9fe..670aa1e92 100644 --- a/compiler-core/src/javascript/tests/blocks.rs +++ b/compiler-core/src/javascript/tests/blocks.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/tests/bools.rs b/compiler-core/src/javascript/tests/bools.rs index 914d84f9a..123e7d1bd 100644 --- a/compiler-core/src/javascript/tests/bools.rs +++ b/compiler-core/src/javascript/tests/bools.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{assert_js, assert_ts_def}; #[test] diff --git a/compiler-core/src/javascript/tests/case.rs b/compiler-core/src/javascript/tests/case.rs index 603ad83ef..b7bfd2bed 100644 --- a/compiler-core/src/javascript/tests/case.rs +++ b/compiler-core/src/javascript/tests/case.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/tests/case_clause_guards.rs b/compiler-core/src/javascript/tests/case_clause_guards.rs index 21ca29ed0..abd9f3a55 100644 --- a/compiler-core/src/javascript/tests/case_clause_guards.rs +++ b/compiler-core/src/javascript/tests/case_clause_guards.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/tests/consts.rs b/compiler-core/src/javascript/tests/consts.rs index dbc9945c1..d594ddacd 100644 --- a/compiler-core/src/javascript/tests/consts.rs +++ b/compiler-core/src/javascript/tests/consts.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/tests/custom_types.rs b/compiler-core/src/javascript/tests/custom_types.rs index ce6285c00..7c4704b9b 100644 --- a/compiler-core/src/javascript/tests/custom_types.rs +++ b/compiler-core/src/javascript/tests/custom_types.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::javascript::tests::CURRENT_PACKAGE; use crate::{assert_js, assert_ts_def}; diff --git a/compiler-core/src/javascript/tests/echo.rs b/compiler-core/src/javascript/tests/echo.rs index a5b21dc30..2c9e7a723 100644 --- a/compiler-core/src/javascript/tests/echo.rs +++ b/compiler-core/src/javascript/tests/echo.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/tests/externals.rs b/compiler-core/src/javascript/tests/externals.rs index 10d17031f..7badd5aa9 100644 --- a/compiler-core/src/javascript/tests/externals.rs +++ b/compiler-core/src/javascript/tests/externals.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{assert_js, assert_module_error, assert_ts_def}; #[test] diff --git a/compiler-core/src/javascript/tests/functions.rs b/compiler-core/src/javascript/tests/functions.rs index 5ef882874..ebdbbdc80 100644 --- a/compiler-core/src/javascript/tests/functions.rs +++ b/compiler-core/src/javascript/tests/functions.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{assert_js, assert_ts_def}; #[test] diff --git a/compiler-core/src/javascript/tests/generics.rs b/compiler-core/src/javascript/tests/generics.rs index 90f961f79..7d56398be 100644 --- a/compiler-core/src/javascript/tests/generics.rs +++ b/compiler-core/src/javascript/tests/generics.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::assert_ts_def; #[test] diff --git a/compiler-core/src/javascript/tests/inlining.rs b/compiler-core/src/javascript/tests/inlining.rs index 6b20f597d..9877ab3f7 100644 --- a/compiler-core/src/javascript/tests/inlining.rs +++ b/compiler-core/src/javascript/tests/inlining.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::assert_js; const BOOL_MODULE: &str = " diff --git a/compiler-core/src/javascript/tests/lists.rs b/compiler-core/src/javascript/tests/lists.rs index f7f2d20df..1c453a698 100644 --- a/compiler-core/src/javascript/tests/lists.rs +++ b/compiler-core/src/javascript/tests/lists.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{assert_js, assert_ts_def}; #[test] diff --git a/compiler-core/src/javascript/tests/modules.rs b/compiler-core/src/javascript/tests/modules.rs index 500f3fa5d..67870138c 100644 --- a/compiler-core/src/javascript/tests/modules.rs +++ b/compiler-core/src/javascript/tests/modules.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_js; use crate::javascript::tests::CURRENT_PACKAGE; diff --git a/compiler-core/src/javascript/tests/numbers.rs b/compiler-core/src/javascript/tests/numbers.rs index 7b468fdc3..630ba9295 100644 --- a/compiler-core/src/javascript/tests/numbers.rs +++ b/compiler-core/src/javascript/tests/numbers.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{assert_js, assert_js_module_error}; #[test] diff --git a/compiler-core/src/javascript/tests/panic.rs b/compiler-core/src/javascript/tests/panic.rs index b096db7e0..76f014aaf 100644 --- a/compiler-core/src/javascript/tests/panic.rs +++ b/compiler-core/src/javascript/tests/panic.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{assert_js, assert_ts_def}; #[test] diff --git a/compiler-core/src/javascript/tests/prelude.rs b/compiler-core/src/javascript/tests/prelude.rs index 3f12ee8ae..b05f74261 100644 --- a/compiler-core/src/javascript/tests/prelude.rs +++ b/compiler-core/src/javascript/tests/prelude.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{assert_js, assert_ts_def}; #[test] diff --git a/compiler-core/src/javascript/tests/records.rs b/compiler-core/src/javascript/tests/records.rs index cba28df9e..ea6164d34 100644 --- a/compiler-core/src/javascript/tests/records.rs +++ b/compiler-core/src/javascript/tests/records.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/tests/recursion.rs b/compiler-core/src/javascript/tests/recursion.rs index db500e631..0d9189da1 100644 --- a/compiler-core/src/javascript/tests/recursion.rs +++ b/compiler-core/src/javascript/tests/recursion.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/tests/results.rs b/compiler-core/src/javascript/tests/results.rs index 261896cec..a7bcd7458 100644 --- a/compiler-core/src/javascript/tests/results.rs +++ b/compiler-core/src/javascript/tests/results.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/tests/sourcemaps.rs b/compiler-core/src/javascript/tests/sourcemaps.rs index 3c6922323..20610b541 100644 --- a/compiler-core/src/javascript/tests/sourcemaps.rs +++ b/compiler-core/src/javascript/tests/sourcemaps.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::assert_source_map; #[test] diff --git a/compiler-core/src/javascript/tests/strings.rs b/compiler-core/src/javascript/tests/strings.rs index b145294f3..f66b02da1 100644 --- a/compiler-core/src/javascript/tests/strings.rs +++ b/compiler-core/src/javascript/tests/strings.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/tests/todo.rs b/compiler-core/src/javascript/tests/todo.rs index db7c1af03..26de299d9 100644 --- a/compiler-core/src/javascript/tests/todo.rs +++ b/compiler-core/src/javascript/tests/todo.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{assert_js, assert_ts_def}; #[test] diff --git a/compiler-core/src/javascript/tests/tuples.rs b/compiler-core/src/javascript/tests/tuples.rs index 8178d2a4c..7e1caba58 100644 --- a/compiler-core/src/javascript/tests/tuples.rs +++ b/compiler-core/src/javascript/tests/tuples.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{assert_js, assert_ts_def}; #[test] diff --git a/compiler-core/src/javascript/tests/type_alias.rs b/compiler-core/src/javascript/tests/type_alias.rs index 182780cde..70fb65589 100644 --- a/compiler-core/src/javascript/tests/type_alias.rs +++ b/compiler-core/src/javascript/tests/type_alias.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::assert_ts_def; #[test] diff --git a/compiler-core/src/javascript/tests/use_.rs b/compiler-core/src/javascript/tests/use_.rs index 379dbae75..8faa5db0f 100644 --- a/compiler-core/src/javascript/tests/use_.rs +++ b/compiler-core/src/javascript/tests/use_.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::assert_js; #[test] diff --git a/compiler-core/src/javascript/typescript.rs b/compiler-core/src/javascript/typescript.rs index 4250169cc..46eeea863 100644 --- a/compiler-core/src/javascript/typescript.rs +++ b/compiler-core/src/javascript/typescript.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + //! This module is responsible for generating TypeScript type declaration files. //! This code is run during the code generation phase along side the normal //! Javascript code emission. Here we walk through the typed AST and translate diff --git a/compiler-core/src/lib.rs b/compiler-core/src/lib.rs index 32e00908b..ed1bd4357 100644 --- a/compiler-core/src/lib.rs +++ b/compiler-core/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + #![warn( clippy::all, clippy::dbg_macro, diff --git a/compiler-core/src/line_numbers.rs b/compiler-core/src/line_numbers.rs index 7a2adf520..4f0a68836 100644 --- a/compiler-core/src/line_numbers.rs +++ b/compiler-core/src/line_numbers.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::ast::SrcSpan; use lsp_types::Position; use std::collections::HashMap; diff --git a/compiler-core/src/manifest.rs b/compiler-core/src/manifest.rs index 894889986..bcb58308e 100644 --- a/compiler-core/src/manifest.rs +++ b/compiler-core/src/manifest.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use std::collections::HashMap; use std::fmt; diff --git a/compiler-core/src/metadata.rs b/compiler-core/src/metadata.rs index e28a19ae5..c673c9682 100644 --- a/compiler-core/src/metadata.rs +++ b/compiler-core/src/metadata.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + //! Seriaisation and deserialisation of Gleam compiler metadata into binary files //! using serde. diff --git a/compiler-core/src/metadata/tests.rs b/compiler-core/src/metadata/tests.rs index 1c5be3e3e..fadbf6c73 100644 --- a/compiler-core/src/metadata/tests.rs +++ b/compiler-core/src/metadata/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use hexpm::version::Version; use rand::Rng; use type_::{AccessorsMap, FieldMap, RecordAccessor}; diff --git a/compiler-core/src/package_interface.rs b/compiler-core/src/package_interface.rs index c29644e25..9f13ff5a8 100644 --- a/compiler-core/src/package_interface.rs +++ b/compiler-core/src/package_interface.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use std::{collections::HashMap, ops::Deref}; use ecow::EcoString; diff --git a/compiler-core/src/package_interface/tests.rs b/compiler-core/src/package_interface/tests.rs index df5c45d27..fed04675b 100644 --- a/compiler-core/src/package_interface/tests.rs +++ b/compiler-core/src/package_interface/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use std::time::SystemTime; use camino::Utf8PathBuf; diff --git a/compiler-core/src/parse.rs b/compiler-core/src/parse.rs index 27719a030..fa8e7f863 100644 --- a/compiler-core/src/parse.rs +++ b/compiler-core/src/parse.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + // Gleam Parser // // Terminology: diff --git a/compiler-core/src/parse/error.rs b/compiler-core/src/parse/error.rs index f8fd5a0d7..564cb3d6e 100644 --- a/compiler-core/src/parse/error.rs +++ b/compiler-core/src/parse/error.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use crate::ast::{SrcSpan, TypeAst}; use crate::diagnostic::{ExtraLabel, Label}; use crate::error::{wrap, wrap_format}; diff --git a/compiler-core/src/parse/extra.rs b/compiler-core/src/parse/extra.rs index ff656c0b9..57cd39f34 100644 --- a/compiler-core/src/parse/extra.rs +++ b/compiler-core/src/parse/extra.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use std::cmp::Ordering; use ecow::EcoString; diff --git a/compiler-core/src/parse/lexer.rs b/compiler-core/src/parse/lexer.rs index 4ca768f76..5468fec5a 100644 --- a/compiler-core/src/parse/lexer.rs +++ b/compiler-core/src/parse/lexer.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use ecow::EcoString; use crate::ast::SrcSpan; diff --git a/compiler-core/src/parse/tests.rs b/compiler-core/src/parse/tests.rs index 1dfdd4e47..8d4bc00ff 100644 --- a/compiler-core/src/parse/tests.rs +++ b/compiler-core/src/parse/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::ast::SrcSpan; use crate::parse::error::{ InvalidUnicodeEscapeError, LexicalError, LexicalErrorType, ParseError, ParseErrorType, diff --git a/compiler-core/src/parse/token.rs b/compiler-core/src/parse/token.rs index b924dc9fa..1328306a2 100644 --- a/compiler-core/src/parse/token.rs +++ b/compiler-core/src/parse/token.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use num_bigint::BigInt; use std::fmt; diff --git a/compiler-core/src/paths.rs b/compiler-core/src/paths.rs index cdaeef880..fa76fb570 100644 --- a/compiler-core/src/paths.rs +++ b/compiler-core/src/paths.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::{ build::{Mode, Target}, manifest::Base16Checksum, diff --git a/compiler-core/src/pretty.rs b/compiler-core/src/pretty.rs index 9f78bfc8c..c1ce9d9c8 100644 --- a/compiler-core/src/pretty.rs +++ b/compiler-core/src/pretty.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + //! This module implements the functionality described in //! ["Strictly Pretty" (2000) by Christian Lindig][0], with a few //! extensions. diff --git a/compiler-core/src/pretty/tests.rs b/compiler-core/src/pretty/tests.rs index 3353f8e68..7294dba78 100644 --- a/compiler-core/src/pretty/tests.rs +++ b/compiler-core/src/pretty/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use super::Document::*; use super::Mode::*; use super::*; diff --git a/compiler-core/src/reference.rs b/compiler-core/src/reference.rs index 0f747591e..5c11bcd2f 100644 --- a/compiler-core/src/reference.rs +++ b/compiler-core/src/reference.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use std::collections::{HashMap, HashSet}; use crate::ast::{Publicity, SrcSpan}; diff --git a/compiler-core/src/requirement.rs b/compiler-core/src/requirement.rs index 3bd9dc40e..a596b995c 100644 --- a/compiler-core/src/requirement.rs +++ b/compiler-core/src/requirement.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use std::fmt; use std::str::FromStr; diff --git a/compiler-core/src/strings.rs b/compiler-core/src/strings.rs index aa87689e8..89a6a098e 100644 --- a/compiler-core/src/strings.rs +++ b/compiler-core/src/strings.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use ecow::EcoString; use itertools::Itertools; diff --git a/compiler-core/src/tests.rs b/compiler-core/src/tests.rs index 16146bb3b..c62f144bb 100644 --- a/compiler-core/src/tests.rs +++ b/compiler-core/src/tests.rs @@ -46,7 +46,7 @@ fn licence_files_exist_in_repo() { All dependency licences must exist in the licences directory. These licences are missing their file: -{licences_missing_licence_file:?}" +- {licences_missing_licence_file:?}" ); } @@ -92,3 +92,102 @@ Fix it now, or bump the deadline in deny.toml. ) } } + +#[test] +fn all_files_have_copyright_notice() { + let paths = ignore::WalkBuilder::new("..") + .follow_links(false) + .git_global(true) + .git_ignore(true) + .hidden(true) + .parents(true) + .build() + .map(|entry| entry.expect("directory traversal succeeds")) + .filter(|entry| { + entry + .file_type() + .map(|type_| type_.is_file()) + .unwrap_or(false) + }) + .map(ignore::DirEntry::into_path) + .filter_map(|path| { + let file_name = path.file_name().and_then(|s| s.to_str())?; + let extension = path.extension()?; + + match extension.to_str().expect("file extension") { + // Test files. + "new" => return None, + "snap" => return None, + "txt" if path.starts_with("../test/") || path.starts_with("../licences/") => { + return None; + } + + // Static assets + "gz" => return None, + "tar" => return None, + "exs" => return None, + "dockerfile" => return None, + "woff2" => return None, + "png" => return None, + "css" if file_name.ends_with(".min.css") => return None, + "js" if file_name.ends_with(".min.js") => return None, + + // Template files to be added to user projects + "ps1" if file_name == "erlang-shipment-entrypoint.ps1" => return None, + "sh" if file_name == "erlang-shipment-entrypoint.sh" => return None, + + // Generated files + "toml" if file_name == "manifest.toml" => return None, + + // Source files + "config" if file_name == "rebar.config" => (), + "css" => (), + "proto" => (), + "ts" => (), + "erl" => (), + "ex" => (), + "gleam" => (), + "hrl" => (), + "js" => (), + "md" => (), + "mjs" => (), + "mts" => (), + "ps1" => (), + "rs" => (), + "sh" => (), + "toml" => (), + + // HTML templates + "html" if path.starts_with("../compiler-core/templates/") => (), + + _ => panic!("Unexpected file extension for {path:?}"), + }; + + let text = std::fs::read_to_string(&path).expect("read file"); + if text.contains("SPDX-License-Identifier: Apache-2.0") + && text.contains("SPDX-FileCopyrightText: 20") + { + // Licence information is present + return None; + } + + Some(path.to_str().unwrap().to_string()) + }) + .join("\n - "); + + if !paths.is_empty() { + panic!( + "Source files missing SPDX licence information! + +Add a comment like this: + + // SPDX-License-Identifier: Apache-2.0 + // SPDX-FileCopyrightText: 2016 The Gleam contributors + +To these files: + +{paths} +" + ) + } +} diff --git a/compiler-core/src/type_.rs b/compiler-core/src/type_.rs index 90052a15d..7a6866833 100644 --- a/compiler-core/src/type_.rs +++ b/compiler-core/src/type_.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub(crate) mod environment; pub mod error; pub(crate) mod expression; diff --git a/compiler-core/src/type_/environment.rs b/compiler-core/src/type_/environment.rs index f1832e133..3bcb9993d 100644 --- a/compiler-core/src/type_/environment.rs +++ b/compiler-core/src/type_/environment.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use pubgrub::Range; use crate::{ diff --git a/compiler-core/src/type_/error.rs b/compiler-core/src/type_/error.rs index ea22d56c7..b568f2be7 100644 --- a/compiler-core/src/type_/error.rs +++ b/compiler-core/src/type_/error.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use super::{ FieldAccessUsage, expression::{ArgumentKind, CallKind}, diff --git a/compiler-core/src/type_/expression.rs b/compiler-core/src/type_/expression.rs index cbe84b6ed..3209c5767 100644 --- a/compiler-core/src/type_/expression.rs +++ b/compiler-core/src/type_/expression.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use super::{pipe::PipeTyper, *}; use crate::{ STDLIB_PACKAGE_NAME, diff --git a/compiler-core/src/type_/fields.rs b/compiler-core/src/type_/fields.rs index 9cd26e0f3..fadb37f0e 100644 --- a/compiler-core/src/type_/fields.rs +++ b/compiler-core/src/type_/fields.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use super::Error; use crate::{ ast::{CallArg, SrcSpan}, diff --git a/compiler-core/src/type_/hydrator.rs b/compiler-core/src/type_/hydrator.rs index b83be1520..441227850 100644 --- a/compiler-core/src/type_/hydrator.rs +++ b/compiler-core/src/type_/hydrator.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use super::*; use crate::{ analyse::name::check_name_case, diff --git a/compiler-core/src/type_/pattern.rs b/compiler-core/src/type_/pattern.rs index 966c4a582..ff553969a 100644 --- a/compiler-core/src/type_/pattern.rs +++ b/compiler-core/src/type_/pattern.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use ecow::eco_format; use hexpm::version::{LowestVersion, Version}; use im::hashmap; diff --git a/compiler-core/src/type_/pipe.rs b/compiler-core/src/type_/pipe.rs index 621d2e003..807a43471 100644 --- a/compiler-core/src/type_/pipe.rs +++ b/compiler-core/src/type_/pipe.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use self::expression::CallKind; use super::*; diff --git a/compiler-core/src/type_/prelude.rs b/compiler-core/src/type_/prelude.rs index a37cac986..9364d180c 100644 --- a/compiler-core/src/type_/prelude.rs +++ b/compiler-core/src/type_/prelude.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use hexpm::version::Version; use strum::{EnumIter, IntoEnumIterator}; diff --git a/compiler-core/src/type_/pretty.rs b/compiler-core/src/type_/pretty.rs index 85319f7f3..f5c2d55a4 100644 --- a/compiler-core/src/type_/pretty.rs +++ b/compiler-core/src/type_/pretty.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use super::{Type, TypeVar}; use crate::{ docvec, diff --git a/compiler-core/src/type_/printer.rs b/compiler-core/src/type_/printer.rs index 743cdbdb6..1ee3f2871 100644 --- a/compiler-core/src/type_/printer.rs +++ b/compiler-core/src/type_/printer.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use bimap::BiMap; use ecow::{EcoString, eco_format}; use im::HashMap; diff --git a/compiler-core/src/type_/tests.rs b/compiler-core/src/type_/tests.rs index 75a4119bf..573c22186 100644 --- a/compiler-core/src/type_/tests.rs +++ b/compiler-core/src/type_/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use super::*; use crate::{ analyse::TargetSupport, diff --git a/compiler-core/src/type_/tests/accessors.rs b/compiler-core/src/type_/tests/accessors.rs index 15609d988..812c9c7ae 100644 --- a/compiler-core/src/type_/tests/accessors.rs +++ b/compiler-core/src/type_/tests/accessors.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::assert_module_infer; #[test] diff --git a/compiler-core/src/type_/tests/assert.rs b/compiler-core/src/type_/tests/assert.rs index 19b848eac..a9390c385 100644 --- a/compiler-core/src/type_/tests/assert.rs +++ b/compiler-core/src/type_/tests/assert.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_error, assert_infer, assert_module_infer, assert_warning}; #[test] diff --git a/compiler-core/src/type_/tests/assignments.rs b/compiler-core/src/type_/tests/assignments.rs index c2222748f..bf9e770ea 100644 --- a/compiler-core/src/type_/tests/assignments.rs +++ b/compiler-core/src/type_/tests/assignments.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::assert_infer; #[test] diff --git a/compiler-core/src/type_/tests/conditional_compilation.rs b/compiler-core/src/type_/tests/conditional_compilation.rs index adbc3a3c3..53f28a318 100644 --- a/compiler-core/src/type_/tests/conditional_compilation.rs +++ b/compiler-core/src/type_/tests/conditional_compilation.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use crate::assert_module_infer; #[test] diff --git a/compiler-core/src/type_/tests/custom_types.rs b/compiler-core/src/type_/tests/custom_types.rs index 292f5b5bc..ab8404bba 100644 --- a/compiler-core/src/type_/tests/custom_types.rs +++ b/compiler-core/src/type_/tests/custom_types.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_module_error, assert_module_infer, assert_warning}; // https://github.com/gleam-lang/gleam/issues/2215 diff --git a/compiler-core/src/type_/tests/dead_code_detection.rs b/compiler-core/src/type_/tests/dead_code_detection.rs index 450511502..2a7d59f38 100644 --- a/compiler-core/src/type_/tests/dead_code_detection.rs +++ b/compiler-core/src/type_/tests/dead_code_detection.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use crate::{assert_no_warnings, assert_warning}; #[test] diff --git a/compiler-core/src/type_/tests/echo.rs b/compiler-core/src/type_/tests/echo.rs index 7d9296022..8cbaf1f84 100644 --- a/compiler-core/src/type_/tests/echo.rs +++ b/compiler-core/src/type_/tests/echo.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::assert_module_infer; #[test] diff --git a/compiler-core/src/type_/tests/errors.rs b/compiler-core/src/type_/tests/errors.rs index 7d7f0c749..d05655a53 100644 --- a/compiler-core/src/type_/tests/errors.rs +++ b/compiler-core/src/type_/tests/errors.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use crate::{ assert_error, assert_internal_module_error, assert_js_module_error, assert_module_error, assert_module_syntax_error, diff --git a/compiler-core/src/type_/tests/exhaustiveness.rs b/compiler-core/src/type_/tests/exhaustiveness.rs index 48d3b25c3..528df5af2 100644 --- a/compiler-core/src/type_/tests/exhaustiveness.rs +++ b/compiler-core/src/type_/tests/exhaustiveness.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_error, assert_module_error, assert_no_warnings, assert_warning}; #[test] diff --git a/compiler-core/src/type_/tests/externals.rs b/compiler-core/src/type_/tests/externals.rs index 1d735e2d9..9871313a6 100644 --- a/compiler-core/src/type_/tests/externals.rs +++ b/compiler-core/src/type_/tests/externals.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use crate::{ assert_js_module_error, assert_js_module_infer, assert_module_error, assert_module_infer, }; diff --git a/compiler-core/src/type_/tests/functions.rs b/compiler-core/src/type_/tests/functions.rs index 5bf4d316f..f4f2dde5a 100644 --- a/compiler-core/src/type_/tests/functions.rs +++ b/compiler-core/src/type_/tests/functions.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_module_error, assert_module_infer}; // https://github.com/gleam-lang/gleam/issues/1860 diff --git a/compiler-core/src/type_/tests/guards.rs b/compiler-core/src/type_/tests/guards.rs index c3e9a893f..aa2afefa9 100644 --- a/compiler-core/src/type_/tests/guards.rs +++ b/compiler-core/src/type_/tests/guards.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_module_error, assert_module_infer}; #[test] diff --git a/compiler-core/src/type_/tests/imports.rs b/compiler-core/src/type_/tests/imports.rs index 050ae1495..147cd9e63 100644 --- a/compiler-core/src/type_/tests/imports.rs +++ b/compiler-core/src/type_/tests/imports.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::{assert_module_error, assert_module_infer}; // https://github.com/gleam-lang/gleam/issues/1760 diff --git a/compiler-core/src/type_/tests/let_assert.rs b/compiler-core/src/type_/tests/let_assert.rs index 47eee5de9..7ca16d85f 100644 --- a/compiler-core/src/type_/tests/let_assert.rs +++ b/compiler-core/src/type_/tests/let_assert.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_error, assert_infer}; #[test] diff --git a/compiler-core/src/type_/tests/pipes.rs b/compiler-core/src/type_/tests/pipes.rs index 325ba29f5..68d0d0981 100644 --- a/compiler-core/src/type_/tests/pipes.rs +++ b/compiler-core/src/type_/tests/pipes.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_module_error, assert_module_infer, assert_no_warnings}; // https://github.com/gleam-lang/gleam/issues/2392 diff --git a/compiler-core/src/type_/tests/pretty.rs b/compiler-core/src/type_/tests/pretty.rs index 2bcf2a3f3..802f7ee41 100644 --- a/compiler-core/src/type_/tests/pretty.rs +++ b/compiler-core/src/type_/tests/pretty.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use std::sync::Arc; use crate::type_::{ diff --git a/compiler-core/src/type_/tests/target_implementations.rs b/compiler-core/src/type_/tests/target_implementations.rs index 59a926059..47101e374 100644 --- a/compiler-core/src/type_/tests/target_implementations.rs +++ b/compiler-core/src/type_/tests/target_implementations.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use ecow::EcoString; use itertools::Itertools; diff --git a/compiler-core/src/type_/tests/type_alias.rs b/compiler-core/src/type_/tests/type_alias.rs index 98c18b9d6..cc1346343 100644 --- a/compiler-core/src/type_/tests/type_alias.rs +++ b/compiler-core/src/type_/tests/type_alias.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::{assert_module_error, assert_module_infer}; #[test] diff --git a/compiler-core/src/type_/tests/use_.rs b/compiler-core/src/type_/tests/use_.rs index 5493ec4fa..6129b9a69 100644 --- a/compiler-core/src/type_/tests/use_.rs +++ b/compiler-core/src/type_/tests/use_.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use crate::{assert_error, assert_infer, assert_module_error, assert_module_infer, assert_warning}; #[test] diff --git a/compiler-core/src/type_/tests/version_inference.rs b/compiler-core/src/type_/tests/version_inference.rs index 754e90397..7a76df871 100644 --- a/compiler-core/src/type_/tests/version_inference.rs +++ b/compiler-core/src/type_/tests/version_inference.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use hexpm::version::Version; use super::compile_module; diff --git a/compiler-core/src/type_/tests/warnings.rs b/compiler-core/src/type_/tests/warnings.rs index c502648ba..cbc5ba522 100644 --- a/compiler-core/src/type_/tests/warnings.rs +++ b/compiler-core/src/type_/tests/warnings.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use super::*; use crate::{ assert_js_no_warnings, assert_js_warning, assert_no_warnings, assert_warning, diff --git a/compiler-core/src/uid.rs b/compiler-core/src/uid.rs index 6bc33362d..cbcdd3896 100644 --- a/compiler-core/src/uid.rs +++ b/compiler-core/src/uid.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use std::sync::{ Arc, atomic::{AtomicU64, Ordering}, diff --git a/compiler-core/src/version.rs b/compiler-core/src/version.rs index 86a087f15..18d8aafaf 100644 --- a/compiler-core/src/version.rs +++ b/compiler-core/src/version.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + /// The current version of the gleam compiler. If this does not match what is /// already in the build folder we will not reuse any cached artifacts and /// instead build from scratch diff --git a/compiler-core/src/warning.rs b/compiler-core/src/warning.rs index 65c6a76e3..b2087639e 100644 --- a/compiler-core/src/warning.rs +++ b/compiler-core/src/warning.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + use crate::{ ast::{BitArraySegmentTruncation, SrcSpan, TodoKind}, build::Target, diff --git a/compiler-core/templates/docs-css/atom-one-dark.min.css b/compiler-core/templates/docs-css/atom-one-dark.min.css index 5344ee381..cb28a1bb8 100644 --- a/compiler-core/templates/docs-css/atom-one-dark.min.css +++ b/compiler-core/templates/docs-css/atom-one-dark.min.css @@ -1 +1,5 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: 2022 The Gleam contributors + */ 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} \ No newline at end of file diff --git a/compiler-core/templates/docs-css/atom-one-light.min.css b/compiler-core/templates/docs-css/atom-one-light.min.css index 2e58473dc..a0a6d3a48 100644 --- a/compiler-core/templates/docs-css/atom-one-light.min.css +++ b/compiler-core/templates/docs-css/atom-one-light.min.css @@ -1 +1,5 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: 2022 The Gleam contributors + */ 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} diff --git a/compiler-core/templates/docs-css/index.css b/compiler-core/templates/docs-css/index.css index 10ff7233b..d083d9a6d 100644 --- a/compiler-core/templates/docs-css/index.css +++ b/compiler-core/templates/docs-css/index.css @@ -1,3 +1,7 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: 2020 The Gleam contributors + */ /* karla regular latin-ext */ @font-face { font-family: "Karla"; diff --git a/compiler-core/templates/docs-js/highlight.min.js b/compiler-core/templates/docs-js/highlight.min.js index 43482e35e..6ebaaefce 100644 --- a/compiler-core/templates/docs-js/highlight.min.js +++ b/compiler-core/templates/docs-js/highlight.min.js @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + /*! Highlight.js v11.6.0 (git: bed790f3f3) (c) 2006-2022 undefined and other contributors diff --git a/compiler-core/templates/docs-js/highlightjs-elixir.min.js b/compiler-core/templates/docs-js/highlightjs-elixir.min.js index 85c721510..aa97dda65 100644 --- a/compiler-core/templates/docs-js/highlightjs-elixir.min.js +++ b/compiler-core/templates/docs-js/highlightjs-elixir.min.js @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + /*! `elixir` grammar compiled for Highlight.js 11.6.0 */ (()=>{var e=(()=>{"use strict";return e=>{ const n=e.regex,a="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",i={$pattern:a, diff --git a/compiler-core/templates/docs-js/highlightjs-erlang.min.js b/compiler-core/templates/docs-js/highlightjs-erlang.min.js index 8a494a0ac..496035dc4 100644 --- a/compiler-core/templates/docs-js/highlightjs-erlang.min.js +++ b/compiler-core/templates/docs-js/highlightjs-erlang.min.js @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + /*! `erlang` grammar compiled for Highlight.js 11.6.0 */ (()=>{var e=(()=>{"use strict";return e=>{ const n="[a-z'][a-zA-Z0-9_']*",r="("+n+":"+n+"|"+n+")",a={ diff --git a/compiler-core/templates/docs-js/highlightjs-gleam.js b/compiler-core/templates/docs-js/highlightjs-gleam.js index a07ba24a1..f37affbe6 100644 --- a/compiler-core/templates/docs-js/highlightjs-gleam.js +++ b/compiler-core/templates/docs-js/highlightjs-gleam.js @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + hljs.registerLanguage("gleam", function (hljs) { const KEYWORDS = { className: "keyword", diff --git a/compiler-core/templates/docs-js/highlightjs-javascript.min.js b/compiler-core/templates/docs-js/highlightjs-javascript.min.js index 865c1106d..943a5082b 100644 --- a/compiler-core/templates/docs-js/highlightjs-javascript.min.js +++ b/compiler-core/templates/docs-js/highlightjs-javascript.min.js @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + /*! `javascript` grammar compiled for Highlight.js 11.6.0 */ (()=>{var e=(()=>{"use strict" ;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) diff --git a/compiler-core/templates/docs-js/highlightjs-typescript.min.js b/compiler-core/templates/docs-js/highlightjs-typescript.min.js index 86d57f78b..975e8a958 100644 --- a/compiler-core/templates/docs-js/highlightjs-typescript.min.js +++ b/compiler-core/templates/docs-js/highlightjs-typescript.min.js @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + /*! `typescript` grammar compiled for Highlight.js 11.6.0 */ (()=>{var e=(()=>{"use strict" ;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) diff --git a/compiler-core/templates/docs-js/index.js b/compiler-core/templates/docs-js/index.js index bcbf03f2f..104680ba8 100644 --- a/compiler-core/templates/docs-js/index.js +++ b/compiler-core/templates/docs-js/index.js @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + "use strict"; window.Gleam = (function () { diff --git a/compiler-core/templates/docs-js/lunr.min.js b/compiler-core/templates/docs-js/lunr.min.js index cdc94cd39..b027bb6ff 100644 --- a/compiler-core/templates/docs-js/lunr.min.js +++ b/compiler-core/templates/docs-js/lunr.min.js @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + /** * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 * Copyright (C) 2020 Oliver Nightingale diff --git a/compiler-core/templates/documentation_layout.html b/compiler-core/templates/documentation_layout.html index a53198ad4..148fc6d51 100644 --- a/compiler-core/templates/documentation_layout.html +++ b/compiler-core/templates/documentation_layout.html @@ -1,4 +1,7 @@ - +{# + SPDX-License-Identifier: Apache-2.0 + SPDX-FileCopyrightText: 2020 The Gleam contributors +#} diff --git a/compiler-core/templates/documentation_module.html b/compiler-core/templates/documentation_module.html index 65b19b2e5..80ebdc3da 100644 --- a/compiler-core/templates/documentation_module.html +++ b/compiler-core/templates/documentation_module.html @@ -1,3 +1,7 @@ +{# + SPDX-License-Identifier: Apache-2.0 + SPDX-FileCopyrightText: 2020 The Gleam contributors +#} {% extends "documentation_layout.html" %} {% block sidebar_content %} @@ -130,4 +134,4 @@ {% endfor %} {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/compiler-core/templates/documentation_page.html b/compiler-core/templates/documentation_page.html index cadb3adff..709f0f8f8 100644 --- a/compiler-core/templates/documentation_page.html +++ b/compiler-core/templates/documentation_page.html @@ -1,3 +1,7 @@ +{# + SPDX-License-Identifier: Apache-2.0 + SPDX-FileCopyrightText: 2020 The Gleam contributors +#} {% extends "documentation_layout.html" %} {% block title %} diff --git a/compiler-core/templates/echo.erl b/compiler-core/templates/echo.erl index 498a3f08f..a7aae510e 100644 --- a/compiler-core/templates/echo.erl +++ b/compiler-core/templates/echo.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2024 The Gleam contributors + -define(is_lowercase_char(X), (X > 96 andalso X < 123)). diff --git a/compiler-core/templates/echo.mjs b/compiler-core/templates/echo.mjs index 05e7fd30e..c31fbb591 100644 --- a/compiler-core/templates/echo.mjs +++ b/compiler-core/templates/echo.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + function echo(value, message, file, line) { const grey = "\u001b[90m"; const reset_color = "\u001b[39m"; diff --git a/compiler-core/templates/ejected.mk b/compiler-core/templates/ejected.mk deleted file mode 100644 index 339bc6460..000000000 --- a/compiler-core/templates/ejected.mk +++ /dev/null @@ -1,23 +0,0 @@ -ifndef GLEAM_NO_COMPILE -GLEAM_INSTALLED := $(shell command -v gleam) -endif - -ERLANG_FILES = $(wildcard {src,build}/*.erl) -GLEAM_FILES = $(wildcard {src,build}/**/*.gleam) - -.PHONY: ebin check - -ifdef GLEAM_INSTALLED -ebin: check $(GLEAM_FILES) $(ERLANG_FILES) - gleam compile-package --target erlang -else -ebin: check $(ERLANG_FILES) - @mkdir -p ./ebin - @cp build/*.app ebin/ - @erlc -server -o ebin $(ERLANG_FILES) || (rm -rf ebin && false) -endif - -check: -ifndef ERL_LIBS - $(error "ERL_LIBS environment variable not set") -endif diff --git a/compiler-core/templates/gleam@@main.erl b/compiler-core/templates/gleam@@main.erl index 5429f8b55..dc7b450dd 100644 --- a/compiler-core/templates/gleam@@main.erl +++ b/compiler-core/templates/gleam@@main.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2021 The Gleam contributors + -module('{{ application }}@@main'). -export([run/1, main/1]). diff --git a/compiler-core/templates/prelude.d.mts b/compiler-core/templates/prelude.d.mts index 3dba496d1..3d34d277d 100644 --- a/compiler-core/templates/prelude.d.mts +++ b/compiler-core/templates/prelude.d.mts @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + /** @deprecated */ export class CustomType { /** @deprecated */ diff --git a/compiler-core/templates/prelude.mjs b/compiler-core/templates/prelude.mjs index 6a0def729..cd1dd25ea 100644 --- a/compiler-core/templates/prelude.mjs +++ b/compiler-core/templates/prelude.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + export class CustomType { withFields(fields) { let properties = Object.keys(this).map((label) => diff --git a/compiler-wasm/Cargo.toml b/compiler-wasm/Cargo.toml index 6b25d14f5..366b74db9 100644 --- a/compiler-wasm/Cargo.toml +++ b/compiler-wasm/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + [package] name = "gleam-wasm" version = "1.17.0" diff --git a/compiler-wasm/README.md b/compiler-wasm/README.md index 0f2c78e30..b5be277f6 100644 --- a/compiler-wasm/README.md +++ b/compiler-wasm/README.md @@ -1,3 +1,8 @@ + + # Compiler WASM ```sh diff --git a/compiler-wasm/src/lib.rs b/compiler-wasm/src/lib.rs index d0f0ab99f..b55665387 100644 --- a/compiler-wasm/src/lib.rs +++ b/compiler-wasm/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + #[cfg(test)] mod tests; mod wasm_filesystem; diff --git a/compiler-wasm/src/tests.rs b/compiler-wasm/src/tests.rs index df1bd6047..e27eaadaf 100644 --- a/compiler-wasm/src/tests.rs +++ b/compiler-wasm/src/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use super::*; use wasm_bindgen_test::wasm_bindgen_test; diff --git a/compiler-wasm/src/wasm_filesystem.rs b/compiler-wasm/src/wasm_filesystem.rs index 13838dd9e..71531e280 100644 --- a/compiler-wasm/src/wasm_filesystem.rs +++ b/compiler-wasm/src/wasm_filesystem.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + use camino::{Utf8Path, Utf8PathBuf}; use gleam_core::{ Error, Result, diff --git a/deny.toml b/deny.toml index 53b59518f..9119b2691 100644 --- a/deny.toml +++ b/deny.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + # https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html [advisories] db-path = "~/.cargo/advisory-db" diff --git a/docs/annoyances.md b/docs/annoyances.md index b76f83544..2cda09c77 100644 --- a/docs/annoyances.md +++ b/docs/annoyances.md @@ -1,3 +1,8 @@ + + # Annoyances This document contains a list of issues and annoyances that we have writing diff --git a/docs/compiler/README.md b/docs/compiler/README.md index 180e4e777..9e5640f15 100644 --- a/docs/compiler/README.md +++ b/docs/compiler/README.md @@ -1,3 +1,8 @@ + + # Compiler documentation Hello! Welcome to the documentation for the Gleam compiler. I hope you have fun diff --git a/docs/incident-response-plan.md b/docs/incident-response-plan.md index 9fe4644e6..9e9b58b08 100644 --- a/docs/incident-response-plan.md +++ b/docs/incident-response-plan.md @@ -1,3 +1,8 @@ + + # Incident response plan ## Stages diff --git a/docs/runtime-errors.md b/docs/runtime-errors.md index d53a613d4..e2f8ff952 100644 --- a/docs/runtime-errors.md +++ b/docs/runtime-errors.md @@ -1,3 +1,8 @@ + + # Runtime errors There are several runtime errors that Gleam code can throw. This documentation diff --git a/docs/threat-model.md b/docs/threat-model.md index 3497ea4ff..9450c8703 100644 --- a/docs/threat-model.md +++ b/docs/threat-model.md @@ -1,3 +1,8 @@ + + # Public threat model Last updated: 2026-04-23 diff --git a/docs/v2.md b/docs/v2.md index 2d7cdabb6..fc4201be6 100644 --- a/docs/v2.md +++ b/docs/v2.md @@ -1,3 +1,8 @@ + + # Breaking changes to make for v2 ## `[1 ..]` syntax diff --git a/gleam-bin/.cargo/config.toml b/gleam-bin/.cargo/config.toml index 93a26829c..87cf489a2 100644 --- a/gleam-bin/.cargo/config.toml +++ b/gleam-bin/.cargo/config.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # Statically link the CRT on Windows with MSVC toolchain # (only in release mode) [target.'cfg(all(windows, target_env = "msvc"))'] diff --git a/gleam-bin/Cargo.toml b/gleam-bin/Cargo.toml index 6510f6546..a38e6ae5c 100644 --- a/gleam-bin/Cargo.toml +++ b/gleam-bin/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + [package] name = "gleam" version = "1.17.0" diff --git a/gleam-bin/build.rs b/gleam-bin/build.rs index 94164e01c..eae8887e0 100644 --- a/gleam-bin/build.rs +++ b/gleam-bin/build.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + fn main() { #[cfg(windows)] static_vcruntime::metabuild(); diff --git a/gleam-bin/src/main.rs b/gleam-bin/src/main.rs index 75281d177..34a015a5c 100644 --- a/gleam-bin/src/main.rs +++ b/gleam-bin/src/main.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { gleam_cli::main(); } diff --git a/hexpm/CONTRIBUTING.md b/hexpm/CONTRIBUTING.md index e1840004e..cff5757ce 100644 --- a/hexpm/CONTRIBUTING.md +++ b/hexpm/CONTRIBUTING.md @@ -1,3 +1,8 @@ + + # How to Contribute ## Adding a New API Function diff --git a/hexpm/Cargo.toml b/hexpm/Cargo.toml index 0e0ebd52e..f11e7bee5 100644 --- a/hexpm/Cargo.toml +++ b/hexpm/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + [package] name = "hexpm" version = "1.17.0" diff --git a/hexpm/build.rs b/hexpm/build.rs index c2c4f2ddf..8abe3ae76 100644 --- a/hexpm/build.rs +++ b/hexpm/build.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + /// `prost_build` generates files in the output directory, which means that if we want /// to use it, we would need the protoc compiler as a build dependency. /// To get around this, we need run the build script and manually copy the generated files diff --git a/hexpm/proto/names.proto b/hexpm/proto/names.proto index 67ad36c70..6fe07a404 100644 --- a/hexpm/proto/names.proto +++ b/hexpm/proto/names.proto @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2014 The Hex Team + syntax = "proto2"; package names; diff --git a/hexpm/proto/package.proto b/hexpm/proto/package.proto index 5778ac325..db84c65c4 100644 --- a/hexpm/proto/package.proto +++ b/hexpm/proto/package.proto @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2014 The Hex Team + syntax = "proto2"; package package; diff --git a/hexpm/proto/signed.proto b/hexpm/proto/signed.proto index e88346d47..9552c261b 100644 --- a/hexpm/proto/signed.proto +++ b/hexpm/proto/signed.proto @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2014 The Hex Team + syntax = "proto2"; package signed; diff --git a/hexpm/proto/versions.proto b/hexpm/proto/versions.proto index bbdf6c402..e1e351554 100644 --- a/hexpm/proto/versions.proto +++ b/hexpm/proto/versions.proto @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2014 The Hex Team + syntax = "proto2"; package versions; diff --git a/hexpm/src/lib.rs b/hexpm/src/lib.rs index 7f64dbdfa..afb08a43e 100644 --- a/hexpm/src/lib.rs +++ b/hexpm/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + mod proto; #[cfg(test)] diff --git a/hexpm/src/proto.rs b/hexpm/src/proto.rs index afd862971..52ee795b9 100644 --- a/hexpm/src/proto.rs +++ b/hexpm/src/proto.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + #![allow(clippy::enum_variant_names)] pub mod package; diff --git a/hexpm/src/proto/package.rs b/hexpm/src/proto/package.rs index 7df4aa928..af24f9008 100644 --- a/hexpm/src/proto/package.rs +++ b/hexpm/src/proto/package.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + // This file is @generated by prost-build. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Package { diff --git a/hexpm/src/proto/signed.rs b/hexpm/src/proto/signed.rs index 96496b365..d9edf35ad 100644 --- a/hexpm/src/proto/signed.rs +++ b/hexpm/src/proto/signed.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + // This file is @generated by prost-build. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Signed { diff --git a/hexpm/src/proto/versions.rs b/hexpm/src/proto/versions.rs index 0aa4cbb3c..b32308bd1 100644 --- a/hexpm/src/proto/versions.rs +++ b/hexpm/src/proto/versions.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + // This file is @generated by prost-build. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Versions { diff --git a/hexpm/src/tests.rs b/hexpm/src/tests.rs index e890bca4a..3341ac85c 100644 --- a/hexpm/src/tests.rs +++ b/hexpm/src/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + use std::{convert::TryFrom, io::Cursor}; use super::*; diff --git a/hexpm/src/version.rs b/hexpm/src/version.rs index ac808cdf3..a393fdf97 100644 --- a/hexpm/src/version.rs +++ b/hexpm/src/version.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + //! Functions for parsing and matching versions against requirements, based off //! and compatible with the Elixir Version module, which is used by Hex //! internally as well as be the Elixir build tool Hex client. diff --git a/hexpm/src/version/lexer.rs b/hexpm/src/version/lexer.rs index 410b49a64..5312f0ec8 100644 --- a/hexpm/src/version/lexer.rs +++ b/hexpm/src/version/lexer.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + //! Lexer for semver ranges. //! //! Breaks a string of input into an iterator of tokens that can be used with a parser. diff --git a/hexpm/src/version/parser.rs b/hexpm/src/version/parser.rs index e73f1fccb..ad74bf302 100644 --- a/hexpm/src/version/parser.rs +++ b/hexpm/src/version/parser.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + // Based off of https://github.com/steveklabnik/semver-parser/blob/bee9de80aaa9653c5eb46a83658606cb21151e65/src/parser.rs use std::fmt; diff --git a/hexpm/src/version/tests.rs b/hexpm/src/version/tests.rs index b9732d6bb..02888ccf6 100644 --- a/hexpm/src/version/tests.rs +++ b/hexpm/src/version/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + use std::cmp::Ordering::{Equal, Greater, Less}; use std::collections::HashMap; diff --git a/language-server/Cargo.toml b/language-server/Cargo.toml index c1635ea14..932a7a4a7 100644 --- a/language-server/Cargo.toml +++ b/language-server/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + [package] name = "gleam-language-server" version = "1.17.0" diff --git a/language-server/src/code_action.rs b/language-server/src/code_action.rs index 93a459882..7cacf71be 100644 --- a/language-server/src/code_action.rs +++ b/language-server/src/code_action.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use std::{collections::HashSet, iter, sync::Arc}; use ecow::{EcoString, eco_format}; diff --git a/language-server/src/compiler.rs b/language-server/src/compiler.rs index dd1d31c27..93a115f67 100644 --- a/language-server/src/compiler.rs +++ b/language-server/src/compiler.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use debug_ignore::DebugIgnore; use ecow::EcoString; use itertools::Itertools; diff --git a/language-server/src/completer.rs b/language-server/src/completer.rs index 89a5c120f..00a9b23fd 100644 --- a/language-server/src/completer.rs +++ b/language-server/src/completer.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use std::{collections::HashMap, sync::Arc}; use ecow::{EcoString, eco_format}; diff --git a/language-server/src/edits.rs b/language-server/src/edits.rs index 695f97b99..00786bffb 100644 --- a/language-server/src/edits.rs +++ b/language-server/src/edits.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use ecow::EcoString; use lsp_types::{Position, Range, TextEdit}; diff --git a/language-server/src/engine.rs b/language-server/src/engine.rs index 88ba30f39..c1ceef0f8 100644 --- a/language-server/src/engine.rs +++ b/language-server/src/engine.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use camino::Utf8PathBuf; use ecow::{EcoString, eco_format}; use gleam_core::{ diff --git a/language-server/src/feedback.rs b/language-server/src/feedback.rs index a65f6c009..0978bde41 100644 --- a/language-server/src/feedback.rs +++ b/language-server/src/feedback.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use gleam_core::{Error, Warning, diagnostic::Diagnostic}; use std::collections::{HashMap, HashSet}; diff --git a/language-server/src/files.rs b/language-server/src/files.rs index dfb392f8a..b1426bb5f 100644 --- a/language-server/src/files.rs +++ b/language-server/src/files.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use std::collections::HashSet; use std::time::SystemTime; diff --git a/language-server/src/lib.rs b/language-server/src/lib.rs index cc836b9f2..f0c63bd45 100644 --- a/language-server/src/lib.rs +++ b/language-server/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + #![warn( clippy::all, clippy::dbg_macro, diff --git a/language-server/src/messages.rs b/language-server/src/messages.rs index 66d30a806..d06fd3f80 100644 --- a/language-server/src/messages.rs +++ b/language-server/src/messages.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use camino::Utf8PathBuf; use lsp::{DefinitionRequest, DidChangeWatchedFilesNotification, DidOpenTextDocumentNotification}; use lsp_types::{ diff --git a/language-server/src/progress.rs b/language-server/src/progress.rs index 2f7929db8..69ae30564 100644 --- a/language-server/src/progress.rs +++ b/language-server/src/progress.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use debug_ignore::DebugIgnore; use lsp_types::{ InitializeParams, LspAny, ProgressParams, ProgressToken, WorkDoneProgressBegin, diff --git a/language-server/src/reference.rs b/language-server/src/reference.rs index ed4cf1730..0481cec21 100644 --- a/language-server/src/reference.rs +++ b/language-server/src/reference.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2019 The Gleam contributors + use std::collections::{HashMap, HashSet}; use ecow::EcoString; diff --git a/language-server/src/rename.rs b/language-server/src/rename.rs index 3603c1836..2f5bd9c0a 100644 --- a/language-server/src/rename.rs +++ b/language-server/src/rename.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use std::collections::HashMap; use ecow::EcoString; diff --git a/language-server/src/router.rs b/language-server/src/router.rs index a2909d781..4892e0f55 100644 --- a/language-server/src/router.rs +++ b/language-server/src/router.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use gleam_core::{ Error, Result, build::SourceFingerprint, diff --git a/language-server/src/server.rs b/language-server/src/server.rs index f1353f0fa..853c23de8 100644 --- a/language-server/src/server.rs +++ b/language-server/src/server.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use super::{ DownloadDependencies, MakeLocker, engine::{self, LanguageServerEngine}, diff --git a/language-server/src/signature_help.rs b/language-server/src/signature_help.rs index 2f7c74a28..bf1a5a3e8 100644 --- a/language-server/src/signature_help.rs +++ b/language-server/src/signature_help.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use std::{ collections::{HashMap, HashSet}, sync::Arc, diff --git a/language-server/src/tests.rs b/language-server/src/tests.rs index a65cb4e21..a5ef5f8d7 100644 --- a/language-server/src/tests.rs +++ b/language-server/src/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + mod action; mod compilation; mod completion; diff --git a/language-server/src/tests/action.rs b/language-server/src/tests/action.rs index de58d03f0..63f3fbd15 100644 --- a/language-server/src/tests/action.rs +++ b/language-server/src/tests/action.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use itertools::Itertools; use lsp_types::{ CodeActionContext, CodeActionParams, DocumentChange, PartialResultParams, Position, Uri as Url, diff --git a/language-server/src/tests/compilation.rs b/language-server/src/tests/compilation.rs index f7964e05f..0cce88529 100644 --- a/language-server/src/tests/compilation.rs +++ b/language-server/src/tests/compilation.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use crate::engine::Compilation; use super::*; diff --git a/language-server/src/tests/completion.rs b/language-server/src/tests/completion.rs index 428eff8c8..27efc6e30 100644 --- a/language-server/src/tests/completion.rs +++ b/language-server/src/tests/completion.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use insta::assert_debug_snapshot; use itertools::Itertools; use lsp_types::{CompletionItem, Position}; diff --git a/language-server/src/tests/definition.rs b/language-server/src/tests/definition.rs index b07a30444..bb4335dd5 100644 --- a/language-server/src/tests/definition.rs +++ b/language-server/src/tests/definition.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use lsp_types::{DefinitionParams, Location, Position, Range, TypeDefinitionParams, Uri as Url}; use super::*; diff --git a/language-server/src/tests/document_highlight.rs b/language-server/src/tests/document_highlight.rs index 470076eb9..d9ec8c127 100644 --- a/language-server/src/tests/document_highlight.rs +++ b/language-server/src/tests/document_highlight.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use lsp_types::{ DocumentHighlightParams, PartialResultParams, Position, Range, TextDocumentPositionParams, WorkDoneProgressParams, diff --git a/language-server/src/tests/document_symbols.rs b/language-server/src/tests/document_symbols.rs index aec6286cf..fa733b70d 100644 --- a/language-server/src/tests/document_symbols.rs +++ b/language-server/src/tests/document_symbols.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use insta::assert_debug_snapshot; use lsp_types::{DocumentSymbol, DocumentSymbolParams}; diff --git a/language-server/src/tests/folding_range.rs b/language-server/src/tests/folding_range.rs index e78883ba5..52f3a45c2 100644 --- a/language-server/src/tests/folding_range.rs +++ b/language-server/src/tests/folding_range.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + use lsp_types::{FoldingRange, FoldingRangeKind, FoldingRangeParams}; use super::*; diff --git a/language-server/src/tests/hover.rs b/language-server/src/tests/hover.rs index 3acd71685..aaf48ce2e 100644 --- a/language-server/src/tests/hover.rs +++ b/language-server/src/tests/hover.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + use lsp_types::{Contents, Hover, HoverParams, MarkedString, Position, Range}; use super::*; diff --git a/language-server/src/tests/reference.rs b/language-server/src/tests/reference.rs index 155f00c9c..3d8a61f22 100644 --- a/language-server/src/tests/reference.rs +++ b/language-server/src/tests/reference.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use std::collections::HashMap; use lsp_types::{ diff --git a/language-server/src/tests/rename.rs b/language-server/src/tests/rename.rs index a84c17135..745841d9b 100644 --- a/language-server/src/tests/rename.rs +++ b/language-server/src/tests/rename.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use std::collections::HashMap; use lsp_types::{ diff --git a/language-server/src/tests/router.rs b/language-server/src/tests/router.rs index cafa90889..e0a9a4532 100644 --- a/language-server/src/tests/router.rs +++ b/language-server/src/tests/router.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use std::time::SystemTime; use gleam_core::{Error, io::FileSystemWriter, paths::ProjectPaths}; diff --git a/language-server/src/tests/signature_help.rs b/language-server/src/tests/signature_help.rs index f373f02e0..6825aa92c 100644 --- a/language-server/src/tests/signature_help.rs +++ b/language-server/src/tests/signature_help.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use super::*; use lsp_types::{ ActiveParameter, ParameterInformation, ParameterInformationLabel, SignatureHelp, diff --git a/licence-bundler/README.md b/licence-bundler/README.md index 437c3e063..67819bc0f 100644 --- a/licence-bundler/README.md +++ b/licence-bundler/README.md @@ -1,3 +1,8 @@ + + # licence_bundler A small program that creates a `gleam-licences.html` which details all the diff --git a/licence-bundler/gleam.toml b/licence-bundler/gleam.toml index 5173f391f..5dd24257f 100644 --- a/licence-bundler/gleam.toml +++ b/licence-bundler/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "licence_bundler" version = "1.0.0" diff --git a/licence-bundler/manifest.toml b/licence-bundler/manifest.toml index 37f5667e4..07da55494 100644 --- a/licence-bundler/manifest.toml +++ b/licence-bundler/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + # Do not manually edit this file, it is managed by Gleam. # # This file locks the dependency versions used, to make your build diff --git a/licence-bundler/src/licence_bundler.gleam b/licence-bundler/src/licence_bundler.gleam index cc05c3e19..f801bc4b2 100644 --- a/licence-bundler/src/licence_bundler.gleam +++ b/licence-bundler/src/licence_bundler.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import gleam/bool import gleam/io import gleam/list diff --git a/licence-bundler/test/licence_bundler_test.gleam b/licence-bundler/test/licence_bundler_test.gleam index a6d73befc..448f8cc91 100644 --- a/licence-bundler/test/licence_bundler_test.gleam +++ b/licence-bundler/test/licence_bundler_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/io pub fn main() -> Nil { diff --git a/test-commands/Cargo.toml b/test-commands/Cargo.toml index 196f892d0..981324db1 100644 --- a/test-commands/Cargo.toml +++ b/test-commands/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + [package] name = "test-commands" version = "1.17.0" diff --git a/test-commands/cases/escript_ok/gleam.toml b/test-commands/cases/escript_ok/gleam.toml index d1444072f..a0f287f5b 100644 --- a/test-commands/cases/escript_ok/gleam.toml +++ b/test-commands/cases/escript_ok/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "escript_ok" version = "1.0.0" diff --git a/test-commands/cases/escript_ok/manifest.toml b/test-commands/cases/escript_ok/manifest.toml index 6e7ebce03..990b32dc8 100644 --- a/test-commands/cases/escript_ok/manifest.toml +++ b/test-commands/cases/escript_ok/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + # Do not manually edit this file, it is managed by Gleam. # # This file locks the dependency versions used, to make your build diff --git a/test-commands/cases/escript_ok/src/escript_ok.gleam b/test-commands/cases/escript_ok/src/escript_ok.gleam index 1f2f2f43e..d369e3984 100644 --- a/test-commands/cases/escript_ok/src/escript_ok.gleam +++ b/test-commands/cases/escript_ok/src/escript_ok.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn main() -> Nil { print("Hello, Joe!\n") Nil diff --git a/test-commands/cases/escript_with_dependency/gleam.toml b/test-commands/cases/escript_with_dependency/gleam.toml index 6a72c6fc9..c839da065 100644 --- a/test-commands/cases/escript_with_dependency/gleam.toml +++ b/test-commands/cases/escript_with_dependency/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + name = "escript_with_dependency" version = "1.0.0" diff --git a/test-commands/cases/escript_with_dependency/manifest.toml b/test-commands/cases/escript_with_dependency/manifest.toml index b174c4df5..b866efb05 100644 --- a/test-commands/cases/escript_with_dependency/manifest.toml +++ b/test-commands/cases/escript_with_dependency/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + # Do not manually edit this file, it is managed by Gleam. # # This file locks the dependency versions used, to make your build diff --git a/test-commands/cases/escript_with_dependency/src/escript_with_dependency.gleam b/test-commands/cases/escript_with_dependency/src/escript_with_dependency.gleam index 75586df4f..7adba9493 100644 --- a/test-commands/cases/escript_with_dependency/src/escript_with_dependency.gleam +++ b/test-commands/cases/escript_with_dependency/src/escript_with_dependency.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import argv pub fn main() -> Nil { diff --git a/test-commands/cases/escript_with_wrong_arity_main_function/gleam.toml b/test-commands/cases/escript_with_wrong_arity_main_function/gleam.toml index 06267707b..b878758c0 100644 --- a/test-commands/cases/escript_with_wrong_arity_main_function/gleam.toml +++ b/test-commands/cases/escript_with_wrong_arity_main_function/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "escript_with_wrong_arity_main_function" version = "1.0.0" diff --git a/test-commands/cases/escript_with_wrong_arity_main_function/manifest.toml b/test-commands/cases/escript_with_wrong_arity_main_function/manifest.toml index 6e7ebce03..990b32dc8 100644 --- a/test-commands/cases/escript_with_wrong_arity_main_function/manifest.toml +++ b/test-commands/cases/escript_with_wrong_arity_main_function/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + # Do not manually edit this file, it is managed by Gleam. # # This file locks the dependency versions used, to make your build diff --git a/test-commands/cases/escript_with_wrong_arity_main_function/src/escript_with_wrong_arity_main_function.gleam b/test-commands/cases/escript_with_wrong_arity_main_function/src/escript_with_wrong_arity_main_function.gleam index 317e618f4..013324015 100644 --- a/test-commands/cases/escript_with_wrong_arity_main_function/src/escript_with_wrong_arity_main_function.gleam +++ b/test-commands/cases/escript_with_wrong_arity_main_function/src/escript_with_wrong_arity_main_function.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + // main must not take an argument pub fn main(stuff: List(String)) -> Nil { echo stuff diff --git a/test-commands/cases/escript_without_main_function/gleam.toml b/test-commands/cases/escript_without_main_function/gleam.toml index 4f157e7d4..57cd5d12c 100644 --- a/test-commands/cases/escript_without_main_function/gleam.toml +++ b/test-commands/cases/escript_without_main_function/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "escript_without_main_function" version = "1.0.0" diff --git a/test-commands/cases/escript_without_main_function/manifest.toml b/test-commands/cases/escript_without_main_function/manifest.toml index 6e7ebce03..990b32dc8 100644 --- a/test-commands/cases/escript_without_main_function/manifest.toml +++ b/test-commands/cases/escript_without_main_function/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + # Do not manually edit this file, it is managed by Gleam. # # This file locks the dependency versions used, to make your build diff --git a/test-commands/cases/escript_without_main_function/src/escript_without_main_function.gleam b/test-commands/cases/escript_without_main_function/src/escript_without_main_function.gleam index 75f07a42d..cab13f288 100644 --- a/test-commands/cases/escript_without_main_function/src/escript_without_main_function.gleam +++ b/test-commands/cases/escript_without_main_function/src/escript_without_main_function.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + // There's no main function here pub fn run() -> Nil { echo "Hello, world" diff --git a/test-commands/src/lib.rs b/test-commands/src/lib.rs index 87c277195..eda46e5c8 100644 --- a/test-commands/src/lib.rs +++ b/test-commands/src/lib.rs @@ -1,2 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + #[cfg(test)] mod tests; diff --git a/test-commands/src/tests.rs b/test-commands/src/tests.rs index 224be75cf..721b889bb 100644 --- a/test-commands/src/tests.rs +++ b/test-commands/src/tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + use camino::Utf8PathBuf; use gleam_cli::{Command, ExportTarget, fs}; use std::process; diff --git a/test-community-packages/README.md b/test-community-packages/README.md index f6a816ebe..d708d1606 100644 --- a/test-community-packages/README.md +++ b/test-community-packages/README.md @@ -1,3 +1,8 @@ + + # test_community_packages [![Package Version](https://img.shields.io/hexpm/v/test_community_packages)](https://hex.pm/packages/test_community_packages) diff --git a/test-community-packages/gleam.toml b/test-community-packages/gleam.toml index db5c22580..e1b6a4dab 100644 --- a/test-community-packages/gleam.toml +++ b/test-community-packages/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "test_community_packages" version = "1.0.0" diff --git a/test-community-packages/manifest.toml b/test-community-packages/manifest.toml index 7a08c8f35..ee4c75718 100644 --- a/test-community-packages/manifest.toml +++ b/test-community-packages/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test-community-packages/src/test_community_packages.gleam b/test-community-packages/src/test_community_packages.gleam index 399b6caf2..011f37dd4 100644 --- a/test-community-packages/src/test_community_packages.gleam +++ b/test-community-packages/src/test_community_packages.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test-community-packages/test/test_community_packages_test.gleam b/test-community-packages/test/test_community_packages_test.gleam index 3831e7a97..157ecb3e4 100644 --- a/test-community-packages/test/test_community_packages_test.gleam +++ b/test-community-packages/test/test_community_packages_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + import gleeunit import gleeunit/should diff --git a/test-helpers-rs/Cargo.toml b/test-helpers-rs/Cargo.toml index 4af2af91b..71bfaf9f2 100644 --- a/test-helpers-rs/Cargo.toml +++ b/test-helpers-rs/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + [package] name = "test-helpers-rs" version = "0.1.0" diff --git a/test-helpers-rs/src/lib.rs b/test-helpers-rs/src/lib.rs index c6ec40b81..3436ff970 100644 --- a/test-helpers-rs/src/lib.rs +++ b/test-helpers-rs/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + use camino::{Utf8Path, Utf8PathBuf}; use gleam_core::{ io::{Content, FileSystemWriter, memory::InMemoryFileSystem}, diff --git a/test-output/Cargo.toml b/test-output/Cargo.toml index 73eb69690..e1bfa2309 100644 --- a/test-output/Cargo.toml +++ b/test-output/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + [package] name = "test-output" version = "1.17.0" diff --git a/test-output/cases/echo_bitarray/gleam.toml b/test-output/cases/echo_bitarray/gleam.toml index ed98c3e4f..c66bcb7db 100644 --- a/test-output/cases/echo_bitarray/gleam.toml +++ b/test-output/cases/echo_bitarray/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_bitarray" version = "1.0.0" diff --git a/test-output/cases/echo_bitarray/src/main.gleam b/test-output/cases/echo_bitarray/src/main.gleam index 29ec06e31..697d4c03c 100644 --- a/test-output/cases/echo_bitarray/src/main.gleam +++ b/test-output/cases/echo_bitarray/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo <<>> echo <<1, 2, 3>> diff --git a/test-output/cases/echo_bool/gleam.toml b/test-output/cases/echo_bool/gleam.toml index e0d163724..d28e38797 100644 --- a/test-output/cases/echo_bool/gleam.toml +++ b/test-output/cases/echo_bool/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_bool" version = "1.0.0" diff --git a/test-output/cases/echo_bool/src/main.gleam b/test-output/cases/echo_bool/src/main.gleam index 0e0e59996..d7de5259b 100644 --- a/test-output/cases/echo_bool/src/main.gleam +++ b/test-output/cases/echo_bool/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo True echo False diff --git a/test-output/cases/echo_charlist/gleam.toml b/test-output/cases/echo_charlist/gleam.toml index 80fd93843..eea33180e 100644 --- a/test-output/cases/echo_charlist/gleam.toml +++ b/test-output/cases/echo_charlist/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "echo_charlist" version = "1.0.0" diff --git a/test-output/cases/echo_charlist/src/main.gleam b/test-output/cases/echo_charlist/src/main.gleam index b57b42ab6..37d17c710 100644 --- a/test-output/cases/echo_charlist/src/main.gleam +++ b/test-output/cases/echo_charlist/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { echo [72, 101, 108, 108, 111, 44, 32, 74, 111, 101, 33] } diff --git a/test-output/cases/echo_circular_reference/gleam.toml b/test-output/cases/echo_circular_reference/gleam.toml index c30de4f24..914aa682f 100644 --- a/test-output/cases/echo_circular_reference/gleam.toml +++ b/test-output/cases/echo_circular_reference/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "echo_circular_reference" version = "1.0.0" target = "javascript" diff --git a/test-output/cases/echo_circular_reference/src/main.gleam b/test-output/cases/echo_circular_reference/src/main.gleam index c678a3d1a..14e2e48f2 100644 --- a/test-output/cases/echo_circular_reference/src/main.gleam +++ b/test-output/cases/echo_circular_reference/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { echo circular_reference() Nil diff --git a/test-output/cases/echo_circular_reference/src/main_ffi.mjs b/test-output/cases/echo_circular_reference/src/main_ffi.mjs index 0c3da0d36..74b66d63a 100644 --- a/test-output/cases/echo_circular_reference/src/main_ffi.mjs +++ b/test-output/cases/echo_circular_reference/src/main_ffi.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + export function circular_reference() { const x = []; x.push(x); diff --git a/test-output/cases/echo_custom_type/gleam.toml b/test-output/cases/echo_custom_type/gleam.toml index cab60df1a..638251e4c 100644 --- a/test-output/cases/echo_custom_type/gleam.toml +++ b/test-output/cases/echo_custom_type/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_custom_type" version = "1.0.0" diff --git a/test-output/cases/echo_custom_type/src/main.gleam b/test-output/cases/echo_custom_type/src/main.gleam index 13b20921c..3080880e0 100644 --- a/test-output/cases/echo_custom_type/src/main.gleam +++ b/test-output/cases/echo_custom_type/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub type Wibble { Wibble(a: Int, b: String) Wobble(a: List(Float)) diff --git a/test-output/cases/echo_dict/gleam.toml b/test-output/cases/echo_dict/gleam.toml index 2dfcd5263..63ffbbcf5 100644 --- a/test-output/cases/echo_dict/gleam.toml +++ b/test-output/cases/echo_dict/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_tuple" version = "1.0.0" diff --git a/test-output/cases/echo_dict/src/main.gleam b/test-output/cases/echo_dict/src/main.gleam index 285b9e761..d33d2a9fb 100644 --- a/test-output/cases/echo_dict/src/main.gleam +++ b/test-output/cases/echo_dict/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + import gleam/dict pub fn main() { diff --git a/test-output/cases/echo_float/gleam.toml b/test-output/cases/echo_float/gleam.toml index df0afb893..72f2936cf 100644 --- a/test-output/cases/echo_float/gleam.toml +++ b/test-output/cases/echo_float/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_float" version = "1.0.0" diff --git a/test-output/cases/echo_float/src/main.gleam b/test-output/cases/echo_float/src/main.gleam index b59352c88..ba4d82589 100644 --- a/test-output/cases/echo_float/src/main.gleam +++ b/test-output/cases/echo_float/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo 1.0 echo 2.1 diff --git a/test-output/cases/echo_function/gleam.toml b/test-output/cases/echo_function/gleam.toml index cab60df1a..638251e4c 100644 --- a/test-output/cases/echo_function/gleam.toml +++ b/test-output/cases/echo_function/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_custom_type" version = "1.0.0" diff --git a/test-output/cases/echo_function/src/main.gleam b/test-output/cases/echo_function/src/main.gleam index e57e57bf8..4d58b8526 100644 --- a/test-output/cases/echo_function/src/main.gleam +++ b/test-output/cases/echo_function/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo fn(n) { n + 1 } echo private diff --git a/test-output/cases/echo_importing_module_named_inspect/gleam.toml b/test-output/cases/echo_importing_module_named_inspect/gleam.toml index 4a7a78b11..ed76e7876 100644 --- a/test-output/cases/echo_importing_module_named_inspect/gleam.toml +++ b/test-output/cases/echo_importing_module_named_inspect/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_importing_module_named_inspect" version = "1.0.0" diff --git a/test-output/cases/echo_importing_module_named_inspect/src/inspect.gleam b/test-output/cases/echo_importing_module_named_inspect/src/inspect.gleam index c947bcf0d..08a4e5479 100644 --- a/test-output/cases/echo_importing_module_named_inspect/src/inspect.gleam +++ b/test-output/cases/echo_importing_module_named_inspect/src/inspect.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub const x = Nil diff --git a/test-output/cases/echo_importing_module_named_inspect/src/main.gleam b/test-output/cases/echo_importing_module_named_inspect/src/main.gleam index 3827dc7d4..e1b3419a6 100644 --- a/test-output/cases/echo_importing_module_named_inspect/src/main.gleam +++ b/test-output/cases/echo_importing_module_named_inspect/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + import inspect pub fn main() { diff --git a/test-output/cases/echo_int/gleam.toml b/test-output/cases/echo_int/gleam.toml index 4569007a6..f2aadb009 100644 --- a/test-output/cases/echo_int/gleam.toml +++ b/test-output/cases/echo_int/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "echo_int" version = "1.0.0" diff --git a/test-output/cases/echo_int/src/main.gleam b/test-output/cases/echo_int/src/main.gleam index 867e9c224..f310b0742 100644 --- a/test-output/cases/echo_int/src/main.gleam +++ b/test-output/cases/echo_int/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo 1 echo 2 diff --git a/test-output/cases/echo_list/gleam.toml b/test-output/cases/echo_list/gleam.toml index 0bee0db68..90ef31599 100644 --- a/test-output/cases/echo_list/gleam.toml +++ b/test-output/cases/echo_list/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_list" version = "1.0.0" diff --git a/test-output/cases/echo_list/src/main.gleam b/test-output/cases/echo_list/src/main.gleam index eb0f6e0b7..08dc2a8f6 100644 --- a/test-output/cases/echo_list/src/main.gleam +++ b/test-output/cases/echo_list/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo [] echo [1, 2, 3] diff --git a/test-output/cases/echo_nil/gleam.toml b/test-output/cases/echo_nil/gleam.toml index 6673d6b93..45115a2f9 100644 --- a/test-output/cases/echo_nil/gleam.toml +++ b/test-output/cases/echo_nil/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "echo_nil" version = "1.0.0" diff --git a/test-output/cases/echo_nil/src/main.gleam b/test-output/cases/echo_nil/src/main.gleam index 54db7ea39..ca58fc527 100644 --- a/test-output/cases/echo_nil/src/main.gleam +++ b/test-output/cases/echo_nil/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub fn main() { echo Nil } diff --git a/test-output/cases/echo_non_record_atom_tag/gleam.toml b/test-output/cases/echo_non_record_atom_tag/gleam.toml index 6a0889b99..8ed0de60e 100644 --- a/test-output/cases/echo_non_record_atom_tag/gleam.toml +++ b/test-output/cases/echo_non_record_atom_tag/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "echo_non_record_atom_tag" version = "1.0.0" diff --git a/test-output/cases/echo_non_record_atom_tag/src/main.gleam b/test-output/cases/echo_non_record_atom_tag/src/main.gleam index ac8a15b83..73801b04a 100644 --- a/test-output/cases/echo_non_record_atom_tag/src/main.gleam +++ b/test-output/cases/echo_non_record_atom_tag/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { echo #(to_atom("UP"), 1, 2) echo #(to_atom("down"), 12.34) diff --git a/test-output/cases/echo_singleton/gleam.toml b/test-output/cases/echo_singleton/gleam.toml index c30de4f24..914aa682f 100644 --- a/test-output/cases/echo_singleton/gleam.toml +++ b/test-output/cases/echo_singleton/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "echo_circular_reference" version = "1.0.0" target = "javascript" diff --git a/test-output/cases/echo_singleton/src/main.gleam b/test-output/cases/echo_singleton/src/main.gleam index 9ecc8e183..a30befa3c 100644 --- a/test-output/cases/echo_singleton/src/main.gleam +++ b/test-output/cases/echo_singleton/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import thing pub fn main() { diff --git a/test-output/cases/echo_singleton/src/main_ffi.mjs b/test-output/cases/echo_singleton/src/main_ffi.mjs index 806d98a84..1f88884b5 100644 --- a/test-output/cases/echo_singleton/src/main_ffi.mjs +++ b/test-output/cases/echo_singleton/src/main_ffi.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import { Thing } from "./thing.mjs"; const it = new Thing(); diff --git a/test-output/cases/echo_singleton/src/thing.gleam b/test-output/cases/echo_singleton/src/thing.gleam index c9f12cd65..e7acdd036 100644 --- a/test-output/cases/echo_singleton/src/thing.gleam +++ b/test-output/cases/echo_singleton/src/thing.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub type Thing { Thing } diff --git a/test-output/cases/echo_string/gleam.toml b/test-output/cases/echo_string/gleam.toml index 0d158fbc0..3e66705e3 100644 --- a/test-output/cases/echo_string/gleam.toml +++ b/test-output/cases/echo_string/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_string" version = "1.0.0" diff --git a/test-output/cases/echo_string/src/main.gleam b/test-output/cases/echo_string/src/main.gleam index cc13fa78f..fbc95f855 100644 --- a/test-output/cases/echo_string/src/main.gleam +++ b/test-output/cases/echo_string/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo "hello world" echo "multiline diff --git a/test-output/cases/echo_tuple/gleam.toml b/test-output/cases/echo_tuple/gleam.toml index 7686290cd..3449121a7 100644 --- a/test-output/cases/echo_tuple/gleam.toml +++ b/test-output/cases/echo_tuple/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_tuple" version = "1.0.0" diff --git a/test-output/cases/echo_tuple/src/main.gleam b/test-output/cases/echo_tuple/src/main.gleam index 03450c7b8..c71719b81 100644 --- a/test-output/cases/echo_tuple/src/main.gleam +++ b/test-output/cases/echo_tuple/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo #() echo #(True, 1, "hello") diff --git a/test-output/cases/echo_with_message/gleam.toml b/test-output/cases/echo_with_message/gleam.toml index ed98c3e4f..c66bcb7db 100644 --- a/test-output/cases/echo_with_message/gleam.toml +++ b/test-output/cases/echo_with_message/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "echo_bitarray" version = "1.0.0" diff --git a/test-output/cases/echo_with_message/src/main.gleam b/test-output/cases/echo_with_message/src/main.gleam index 7e028952e..401ab835a 100644 --- a/test-output/cases/echo_with_message/src/main.gleam +++ b/test-output/cases/echo_with_message/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { let message = "message" diff --git a/test-output/cases/linked_process_exit/gleam.toml b/test-output/cases/linked_process_exit/gleam.toml index b639b3ff3..783da18b4 100644 --- a/test-output/cases/linked_process_exit/gleam.toml +++ b/test-output/cases/linked_process_exit/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + name = "linked_process_exit" version = "1.0.0" diff --git a/test-output/cases/linked_process_exit/src/main.gleam b/test-output/cases/linked_process_exit/src/main.gleam index d8e88c7c5..767746df9 100644 --- a/test-output/cases/linked_process_exit/src/main.gleam +++ b/test-output/cases/linked_process_exit/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + @external(erlang, "main_ffi", "spawn_and_exit") fn spawn_and_exit() -> Nil diff --git a/test-output/cases/linked_process_exit/src/main_ffi.erl b/test-output/cases/linked_process_exit/src/main_ffi.erl index 4571b7efe..c9d85d4e1 100644 --- a/test-output/cases/linked_process_exit/src/main_ffi.erl +++ b/test-output/cases/linked_process_exit/src/main_ffi.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2026 The Gleam contributors + -module(main_ffi). -export([spawn_and_exit/0]). diff --git a/test-output/src/lib.rs b/test-output/src/lib.rs index 87c277195..eda46e5c8 100644 --- a/test-output/src/lib.rs +++ b/test-output/src/lib.rs @@ -1,2 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + #[cfg(test)] mod tests; diff --git a/test-output/src/tests.rs b/test-output/src/tests.rs index 6376675fb..37d5592b3 100644 --- a/test-output/src/tests.rs +++ b/test-output/src/tests.rs @@ -1,2 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + #[cfg(test)] mod echo; diff --git a/test-output/src/tests/echo.rs b/test-output/src/tests/echo.rs index 3ca46c129..8eaaecda3 100644 --- a/test-output/src/tests/echo.rs +++ b/test-output/src/tests/echo.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + use std::{io::Read, process::Stdio}; use camino::{Utf8Path, Utf8PathBuf}; diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_bool.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_bool.snap index 0d47d0cec..7390cd3ef 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_bool.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_bool.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo True echo False @@ -10,7 +13,7 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 True -src/main.gleam:3 +src/main.gleam:6 False diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_charlist.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_charlist.snap index 5d6a16cea..ac206780d 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_charlist.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_charlist.snap @@ -3,11 +3,14 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { echo [72, 101, 108, 108, 111, 44, 32, 74, 111, 101, 33] } --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 charlist.from_string("Hello, Joe!") diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_dict.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_dict.snap index 02e739eda..a3900083b 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_dict.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_dict.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + import gleam/dict pub fn main() { @@ -12,7 +15,7 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:4 +src/main.gleam:7 dict.from_list([]) -src/main.gleam:5 +src/main.gleam:8 dict.from_list([#(1, "hello"), #(2, "world!")]) diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_function.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_function.snap index 5c57deb14..3232eaf9e 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_function.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_function.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo fn(n) { n + 1 } echo private @@ -14,7 +17,7 @@ fn private() { --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 //fn(a) { ... } -src/main.gleam:3 +src/main.gleam:6 //fn() { ... } diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_importing_module_named_inspect.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_importing_module_named_inspect.snap index 8e6ee45a5..facba151e 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_importing_module_named_inspect.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_importing_module_named_inspect.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + import inspect pub fn main() { @@ -11,5 +14,5 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:4 +src/main.gleam:7 Nil diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_int.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_int.snap index 37bdb2f98..f7fc817d3 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_int.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_int.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo 1 echo 2 @@ -11,9 +14,9 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 1 -src/main.gleam:3 +src/main.gleam:6 2 -src/main.gleam:4 +src/main.gleam:7 100000 diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_list.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_list.snap index 7c5deb77a..c93069f81 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_list.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_list.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo [] echo [1, 2, 3] @@ -10,7 +13,7 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 [] -src/main.gleam:3 +src/main.gleam:6 [1, 2, 3] diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_nil.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_nil.snap index 9efae2bbb..ccc8b753a 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_nil.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_nil.snap @@ -3,11 +3,14 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub fn main() { echo Nil } --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 Nil diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_singleton.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_singleton.snap index d2a44efdd..8accfae78 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_singleton.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_singleton.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import thing pub fn main() { @@ -17,5 +20,5 @@ fn singleton() -> thing.Thing { --- gleam run output ---------------- -src/main.gleam:4 +src/main.gleam:7 #(1, Thing, Thing) diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_string.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_string.snap index a32c34617..b2b46b3ee 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_string.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_string.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo "hello world" echo "multiline @@ -12,9 +15,9 @@ string" --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 "hello world" -src/main.gleam:3 +src/main.gleam:6 "multiline\nstring" -src/main.gleam:5 +src/main.gleam:8 "string with\t\r\nescaped chars" diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_tuple.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_tuple.snap index 060de9338..d923c1718 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_tuple.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_tuple.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo #() echo #(True, 1, "hello") @@ -10,7 +13,7 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 #() -src/main.gleam:3 +src/main.gleam:6 #(True, 1, "hello") diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__echo_with_message.snap b/test-output/src/tests/snapshots/test_output__tests__echo__echo_with_message.snap index 4cb50c272..0df352ef1 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__echo_with_message.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__echo_with_message.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { let message = "message" @@ -16,9 +19,9 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:4 message1 +src/main.gleam:7 message1 1 -src/main.gleam:7 message2 +src/main.gleam:10 message2 1 -src/main.gleam:9 message3 +src/main.gleam:12 message3 2 diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_bitarray.snap b/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_bitarray.snap index aeea2ea34..e47fd42d1 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_bitarray.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_bitarray.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo <<>> echo <<1, 2, 3>> @@ -11,9 +14,9 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 "" -src/main.gleam:3 +src/main.gleam:6 "\u{0001}\u{0002}\u{0003}" -src/main.gleam:4 +src/main.gleam:7 <<1, 2, 3:size(2)>> diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_custom_type.snap b/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_custom_type.snap index 4f765c500..397470531 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_custom_type.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_custom_type.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub type Wibble { Wibble(a: Int, b: String) Wobble(a: List(Float)) @@ -17,9 +20,9 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:8 +src/main.gleam:11 Wibble(1, "hello") -src/main.gleam:9 +src/main.gleam:12 Wobble([1.0, 1.1]) -src/main.gleam:10 +src/main.gleam:13 Woo diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_float.snap b/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_float.snap index fddd37851..83c05125b 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_float.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_float.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo 1.0 echo 2.1 @@ -11,9 +14,9 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 1.0 -src/main.gleam:3 +src/main.gleam:6 2.1 -src/main.gleam:4 +src/main.gleam:7 11.11 diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_non_record_atom_tag.snap b/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_non_record_atom_tag.snap index 329d38efb..2a275529c 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_non_record_atom_tag.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__erlang-echo_non_record_atom_tag.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { echo #(to_atom("UP"), 1, 2) echo #(to_atom("down"), 12.34) @@ -16,9 +19,9 @@ pub fn to_atom(string: String) -> Atom --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 #(atom.create("UP"), 1, 2) -src/main.gleam:3 +src/main.gleam:6 Down(12.34) -src/main.gleam:4 +src/main.gleam:7 #(atom.create("Both"), "ok") diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__erlang-linked_process_exit.snap b/test-output/src/tests/snapshots/test_output__tests__echo__erlang-linked_process_exit.snap index c699bcd41..95fd0793e 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__erlang-linked_process_exit.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__erlang-linked_process_exit.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + @external(erlang, "main_ffi", "spawn_and_exit") fn spawn_and_exit() -> Nil diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_bitarray.snap b/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_bitarray.snap index b4e920298..d0277b5da 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_bitarray.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_bitarray.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo <<>> echo <<1, 2, 3>> @@ -11,9 +14,9 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 <<>> -src/main.gleam:3 +src/main.gleam:6 <<1, 2, 3>> -src/main.gleam:4 +src/main.gleam:7 <<1, 2, 3:size(2)>> diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_circular_reference.snap b/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_circular_reference.snap index bd4c7ceba..2f08f6097 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_circular_reference.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_circular_reference.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { echo circular_reference() Nil @@ -15,5 +18,5 @@ fn circular_reference() -> Thing --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 #(//js(circular reference)) diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_custom_type.snap b/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_custom_type.snap index f5c22bb00..f1374b412 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_custom_type.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_custom_type.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub type Wibble { Wibble(a: Int, b: String) Wobble(a: List(Float)) @@ -17,9 +20,9 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:8 +src/main.gleam:11 Wibble(a: 1, b: "hello") -src/main.gleam:9 +src/main.gleam:12 Wobble(a: [1, 1.1]) -src/main.gleam:10 +src/main.gleam:13 Woo diff --git a/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_float.snap b/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_float.snap index 3644712ed..2d1b0426d 100644 --- a/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_float.snap +++ b/test-output/src/tests/snapshots/test_output__tests__echo__javascript-echo_float.snap @@ -3,6 +3,9 @@ source: test-output/src/tests/echo.rs expression: output --- --- main.gleam ---------------------- +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { echo 1.0 echo 2.1 @@ -11,9 +14,9 @@ pub fn main() { --- gleam run output ---------------- -src/main.gleam:2 +src/main.gleam:5 1 -src/main.gleam:3 +src/main.gleam:6 2.1 -src/main.gleam:4 +src/main.gleam:7 11.11 diff --git a/test-package-compiler/Cargo.toml b/test-package-compiler/Cargo.toml index 2a5c438e7..8c617231a 100644 --- a/test-package-compiler/Cargo.toml +++ b/test-package-compiler/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + [package] name = "test-package-compiler" version = "1.17.0" diff --git a/test-package-compiler/build.rs b/test-package-compiler/build.rs index c45590a9b..f8b438ebf 100644 --- a/test-package-compiler/build.rs +++ b/test-package-compiler/build.rs @@ -1,9 +1,15 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use std::path::PathBuf; pub fn main() { println!("cargo:rerun-if-changed=cases"); - let mut module = "//! This file is generated by build.rs + let mut module = "// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + +//! This file is generated by build.rs //! Do not edit it directly, instead add new test cases to ./cases " .to_string(); diff --git a/test-package-compiler/cases/alias_unqualified_import/gleam.toml b/test-package-compiler/cases/alias_unqualified_import/gleam.toml index da65d8fa8..9916e24a1 100644 --- a/test-package-compiler/cases/alias_unqualified_import/gleam.toml +++ b/test-package-compiler/cases/alias_unqualified_import/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + # https://github.com/gleam-lang/gleam/issues/303 name = "importy" version = "0.1.0" diff --git a/test-package-compiler/cases/alias_unqualified_import/src/one.gleam b/test-package-compiler/cases/alias_unqualified_import/src/one.gleam index 8438dc9ee..880c994d2 100644 --- a/test-package-compiler/cases/alias_unqualified_import/src/one.gleam +++ b/test-package-compiler/cases/alias_unqualified_import/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // https://github.com/gleam-lang/gleam/issues/303 pub fn id(x) { x diff --git a/test-package-compiler/cases/alias_unqualified_import/src/two.gleam b/test-package-compiler/cases/alias_unqualified_import/src/two.gleam index 1277e5d53..f911afe7d 100644 --- a/test-package-compiler/cases/alias_unqualified_import/src/two.gleam +++ b/test-package-compiler/cases/alias_unqualified_import/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // https://github.com/gleam-lang/gleam/issues/303 import one.{Empty as E, id as i} diff --git a/test-package-compiler/cases/dev_importing_test/dev/one.gleam b/test-package-compiler/cases/dev_importing_test/dev/one.gleam index 609a4e8ca..73c8660b9 100644 --- a/test-package-compiler/cases/dev_importing_test/dev/one.gleam +++ b/test-package-compiler/cases/dev_importing_test/dev/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // This import will fail because the `two` module is in the `test` directory and // as such isn't permitted to be imported into the `dev` directory. import two diff --git a/test-package-compiler/cases/dev_importing_test/gleam.toml b/test-package-compiler/cases/dev_importing_test/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/dev_importing_test/gleam.toml +++ b/test-package-compiler/cases/dev_importing_test/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/dev_importing_test/test/two.gleam b/test-package-compiler/cases/dev_importing_test/test/two.gleam index 8b1378917..b656fd617 100644 --- a/test-package-compiler/cases/dev_importing_test/test/two.gleam +++ b/test-package-compiler/cases/dev_importing_test/test/two.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + diff --git a/test-package-compiler/cases/duplicate_module/gleam.toml b/test-package-compiler/cases/duplicate_module/gleam.toml index c2adfb11d..45b28f9da 100644 --- a/test-package-compiler/cases/duplicate_module/gleam.toml +++ b/test-package-compiler/cases/duplicate_module/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "duplicate_module_dev" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/duplicate_module/src/main.gleam b/test-package-compiler/cases/duplicate_module/src/main.gleam index 33f903711..fe8479d7e 100644 --- a/test-package-compiler/cases/duplicate_module/src/main.gleam +++ b/test-package-compiler/cases/duplicate_module/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // There is another module with the same name in the `test` directory. pub fn main() { "Hello, Joe!" diff --git a/test-package-compiler/cases/duplicate_module/test/main.gleam b/test-package-compiler/cases/duplicate_module/test/main.gleam index fdaf1763e..3aff3e73d 100644 --- a/test-package-compiler/cases/duplicate_module/test/main.gleam +++ b/test-package-compiler/cases/duplicate_module/test/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // There is another module with the same name in the `src` directory. pub fn main() { "Hello, Joe!" diff --git a/test-package-compiler/cases/duplicate_module_dev/dev/main.gleam b/test-package-compiler/cases/duplicate_module_dev/dev/main.gleam index fdaf1763e..3aff3e73d 100644 --- a/test-package-compiler/cases/duplicate_module_dev/dev/main.gleam +++ b/test-package-compiler/cases/duplicate_module_dev/dev/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // There is another module with the same name in the `src` directory. pub fn main() { "Hello, Joe!" diff --git a/test-package-compiler/cases/duplicate_module_dev/gleam.toml b/test-package-compiler/cases/duplicate_module_dev/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/duplicate_module_dev/gleam.toml +++ b/test-package-compiler/cases/duplicate_module_dev/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/duplicate_module_dev/src/main.gleam b/test-package-compiler/cases/duplicate_module_dev/src/main.gleam index 271d94920..b06524f92 100644 --- a/test-package-compiler/cases/duplicate_module_dev/src/main.gleam +++ b/test-package-compiler/cases/duplicate_module_dev/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + // There is another module with the same name in the `dev` directory. pub fn main() { "Hello, Joe!" diff --git a/test-package-compiler/cases/duplicate_module_test_dev/dev/main.gleam b/test-package-compiler/cases/duplicate_module_test_dev/dev/main.gleam index 33f903711..fe8479d7e 100644 --- a/test-package-compiler/cases/duplicate_module_test_dev/dev/main.gleam +++ b/test-package-compiler/cases/duplicate_module_test_dev/dev/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // There is another module with the same name in the `test` directory. pub fn main() { "Hello, Joe!" diff --git a/test-package-compiler/cases/duplicate_module_test_dev/gleam.toml b/test-package-compiler/cases/duplicate_module_test_dev/gleam.toml index a0a5db635..019de03b6 100644 --- a/test-package-compiler/cases/duplicate_module_test_dev/gleam.toml +++ b/test-package-compiler/cases/duplicate_module_test_dev/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "duplicate_module" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/duplicate_module_test_dev/test/main.gleam b/test-package-compiler/cases/duplicate_module_test_dev/test/main.gleam index 271d94920..b06524f92 100644 --- a/test-package-compiler/cases/duplicate_module_test_dev/test/main.gleam +++ b/test-package-compiler/cases/duplicate_module_test_dev/test/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + // There is another module with the same name in the `dev` directory. pub fn main() { "Hello, Joe!" diff --git a/test-package-compiler/cases/empty_module_warning/gleam.toml b/test-package-compiler/cases/empty_module_warning/gleam.toml index ad53b41a8..059bac02c 100644 --- a/test-package-compiler/cases/empty_module_warning/gleam.toml +++ b/test-package-compiler/cases/empty_module_warning/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "empty_module_warning" version = "1.0.0" description = "Test package with empty modules" diff --git a/test-package-compiler/cases/empty_module_warning/src/empty.gleam b/test-package-compiler/cases/empty_module_warning/src/empty.gleam index 01e2ce72c..4ffa93b1b 100644 --- a/test-package-compiler/cases/empty_module_warning/src/empty.gleam +++ b/test-package-compiler/cases/empty_module_warning/src/empty.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + // This is an empty module \ No newline at end of file diff --git a/test-package-compiler/cases/empty_module_warning/src/internal.gleam b/test-package-compiler/cases/empty_module_warning/src/internal.gleam index 52595fdeb..56eaf4db4 100644 --- a/test-package-compiler/cases/empty_module_warning/src/internal.gleam +++ b/test-package-compiler/cases/empty_module_warning/src/internal.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + @internal pub fn private_function() -> Nil { Nil diff --git a/test-package-compiler/cases/empty_module_warning/src/private.gleam b/test-package-compiler/cases/empty_module_warning/src/private.gleam index 5a3bed810..8d839a77a 100644 --- a/test-package-compiler/cases/empty_module_warning/src/private.gleam +++ b/test-package-compiler/cases/empty_module_warning/src/private.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + fn private_function() -> Nil { Nil } diff --git a/test-package-compiler/cases/empty_module_warning/src/public.gleam b/test-package-compiler/cases/empty_module_warning/src/public.gleam index 4f880f921..9cf105bba 100644 --- a/test-package-compiler/cases/empty_module_warning/src/public.gleam +++ b/test-package-compiler/cases/empty_module_warning/src/public.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { "This module has public definitions" } diff --git a/test-package-compiler/cases/erlang_app_generation/gleam.toml b/test-package-compiler/cases/erlang_app_generation/gleam.toml index 367c1f152..af58da3a1 100644 --- a/test-package-compiler/cases/erlang_app_generation/gleam.toml +++ b/test-package-compiler/cases/erlang_app_generation/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + # This config file has a bunch of properties that will be entered into the # Erlang .app file diff --git a/test-package-compiler/cases/erlang_app_generation/src/main.gleam b/test-package-compiler/cases/erlang_app_generation/src/main.gleam index 8b1378917..0d33231f3 100644 --- a/test-package-compiler/cases/erlang_app_generation/src/main.gleam +++ b/test-package-compiler/cases/erlang_app_generation/src/main.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + diff --git a/test-package-compiler/cases/erlang_app_generation_with_argument/gleam.toml b/test-package-compiler/cases/erlang_app_generation_with_argument/gleam.toml index 652e8c176..e4b53e79c 100644 --- a/test-package-compiler/cases/erlang_app_generation_with_argument/gleam.toml +++ b/test-package-compiler/cases/erlang_app_generation_with_argument/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + # This config file has a bunch of properties that will be entered into the # Erlang .app file diff --git a/test-package-compiler/cases/erlang_app_generation_with_argument/src/main.gleam b/test-package-compiler/cases/erlang_app_generation_with_argument/src/main.gleam index 8b1378917..0d33231f3 100644 --- a/test-package-compiler/cases/erlang_app_generation_with_argument/src/main.gleam +++ b/test-package-compiler/cases/erlang_app_generation_with_argument/src/main.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + diff --git a/test-package-compiler/cases/erlang_bug_752/gleam.toml b/test-package-compiler/cases/erlang_bug_752/gleam.toml index 6198b6285..4ff5df579 100644 --- a/test-package-compiler/cases/erlang_bug_752/gleam.toml +++ b/test-package-compiler/cases/erlang_bug_752/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + # https://github.com/gleam-lang/gleam/issues/752 name = "importy" version = "0.1.0" diff --git a/test-package-compiler/cases/erlang_bug_752/src/one.gleam b/test-package-compiler/cases/erlang_bug_752/src/one.gleam index dc850c92e..3a6d9986f 100644 --- a/test-package-compiler/cases/erlang_bug_752/src/one.gleam +++ b/test-package-compiler/cases/erlang_bug_752/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type One(a) { One(a) } diff --git a/test-package-compiler/cases/erlang_bug_752/src/two.gleam b/test-package-compiler/cases/erlang_bug_752/src/two.gleam index f77904493..6d1a7d79b 100644 --- a/test-package-compiler/cases/erlang_bug_752/src/two.gleam +++ b/test-package-compiler/cases/erlang_bug_752/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one.{type One} pub type Two(b) { diff --git a/test-package-compiler/cases/erlang_empty/gleam.toml b/test-package-compiler/cases/erlang_empty/gleam.toml index a0697d38c..ae39b968c 100644 --- a/test-package-compiler/cases/erlang_empty/gleam.toml +++ b/test-package-compiler/cases/erlang_empty/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "hello_joe" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/erlang_empty/src/empty.gleam b/test-package-compiler/cases/erlang_empty/src/empty.gleam index 8b1378917..0d33231f3 100644 --- a/test-package-compiler/cases/erlang_empty/src/empty.gleam +++ b/test-package-compiler/cases/erlang_empty/src/empty.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + diff --git a/test-package-compiler/cases/erlang_escape_names/gleam.toml b/test-package-compiler/cases/erlang_escape_names/gleam.toml index cade286c5..62d0e76d5 100644 --- a/test-package-compiler/cases/erlang_escape_names/gleam.toml +++ b/test-package-compiler/cases/erlang_escape_names/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + # https://github.com/gleam-lang/gleam/issues/340 name = "importy" version = "0.1.0" diff --git a/test-package-compiler/cases/erlang_escape_names/src/one.gleam b/test-package-compiler/cases/erlang_escape_names/src/one.gleam index 6d97caa55..45c4b7ca3 100644 --- a/test-package-compiler/cases/erlang_escape_names/src/one.gleam +++ b/test-package-compiler/cases/erlang_escape_names/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // https://github.com/gleam-lang/gleam/issues/340 pub fn receive(x) { x diff --git a/test-package-compiler/cases/erlang_escape_names/src/two.gleam b/test-package-compiler/cases/erlang_escape_names/src/two.gleam index 0ca701c5c..7c6359b51 100644 --- a/test-package-compiler/cases/erlang_escape_names/src/two.gleam +++ b/test-package-compiler/cases/erlang_escape_names/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // https://github.com/gleam-lang/gleam/issues/340 import one.{receive} diff --git a/test-package-compiler/cases/erlang_import/gleam.toml b/test-package-compiler/cases/erlang_import/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/erlang_import/gleam.toml +++ b/test-package-compiler/cases/erlang_import/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/erlang_import/src/one.gleam b/test-package-compiler/cases/erlang_import/src/one.gleam index 170df7be1..902f9d21b 100644 --- a/test-package-compiler/cases/erlang_import/src/one.gleam +++ b/test-package-compiler/cases/erlang_import/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import two pub fn unbox(x) { diff --git a/test-package-compiler/cases/erlang_import/src/two.gleam b/test-package-compiler/cases/erlang_import/src/two.gleam index 053fa8775..6ad3ede29 100644 --- a/test-package-compiler/cases/erlang_import/src/two.gleam +++ b/test-package-compiler/cases/erlang_import/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type Box { Box(Int) } diff --git a/test-package-compiler/cases/erlang_import_shadowing_prelude/gleam.toml b/test-package-compiler/cases/erlang_import_shadowing_prelude/gleam.toml index d45b69ea9..779c1e296 100644 --- a/test-package-compiler/cases/erlang_import_shadowing_prelude/gleam.toml +++ b/test-package-compiler/cases/erlang_import_shadowing_prelude/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + # https://github.com/gleam-lang/gleam/issues/1495 name = "importy" version = "0.1.0" diff --git a/test-package-compiler/cases/erlang_import_shadowing_prelude/src/one.gleam b/test-package-compiler/cases/erlang_import_shadowing_prelude/src/one.gleam index 1a834c4aa..7de38615b 100644 --- a/test-package-compiler/cases/erlang_import_shadowing_prelude/src/one.gleam +++ b/test-package-compiler/cases/erlang_import_shadowing_prelude/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type Error { // This constructor shadows the Error constructor in the prelude. Error diff --git a/test-package-compiler/cases/erlang_import_shadowing_prelude/src/two.gleam b/test-package-compiler/cases/erlang_import_shadowing_prelude/src/two.gleam index 17af4a302..4ec12dbb6 100644 --- a/test-package-compiler/cases/erlang_import_shadowing_prelude/src/two.gleam +++ b/test-package-compiler/cases/erlang_import_shadowing_prelude/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // This import shadows the Error type in the prelude. import one.{Error} diff --git a/test-package-compiler/cases/erlang_nested/gleam.toml b/test-package-compiler/cases/erlang_nested/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/erlang_nested/gleam.toml +++ b/test-package-compiler/cases/erlang_nested/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/erlang_nested/src/one/two.gleam b/test-package-compiler/cases/erlang_nested/src/one/two.gleam index 75e901561..d17fa4230 100644 --- a/test-package-compiler/cases/erlang_nested/src/one/two.gleam +++ b/test-package-compiler/cases/erlang_nested/src/one/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub fn main() { "Hi there" } diff --git a/test-package-compiler/cases/erlang_nested_qualified_constant/gleam.toml b/test-package-compiler/cases/erlang_nested_qualified_constant/gleam.toml index f12b6a937..de374d674 100644 --- a/test-package-compiler/cases/erlang_nested_qualified_constant/gleam.toml +++ b/test-package-compiler/cases/erlang_nested_qualified_constant/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + # https://github.com/gleam-lang/gleam/issues/922#issuecomment-803272624 name = "importy" version = "0.1.0" diff --git a/test-package-compiler/cases/erlang_nested_qualified_constant/src/one/two.gleam b/test-package-compiler/cases/erlang_nested_qualified_constant/src/one/two.gleam index 9e8c85759..45cf0ff0b 100644 --- a/test-package-compiler/cases/erlang_nested_qualified_constant/src/one/two.gleam +++ b/test-package-compiler/cases/erlang_nested_qualified_constant/src/one/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type A { A } diff --git a/test-package-compiler/cases/erlang_nested_qualified_constant/src/two.gleam b/test-package-compiler/cases/erlang_nested_qualified_constant/src/two.gleam index 6c8e94fd5..dfdbffb1c 100644 --- a/test-package-compiler/cases/erlang_nested_qualified_constant/src/two.gleam +++ b/test-package-compiler/cases/erlang_nested_qualified_constant/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // This module uses imports in a way which previously failed to compile due a // compiler bug. // diff --git a/test-package-compiler/cases/errors_from_related_modules/gleam.toml b/test-package-compiler/cases/errors_from_related_modules/gleam.toml index 2f0ee9b39..dfc3d12a2 100644 --- a/test-package-compiler/cases/errors_from_related_modules/gleam.toml +++ b/test-package-compiler/cases/errors_from_related_modules/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + name = "errors_from_related_modules" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/errors_from_related_modules/src/one.gleam b/test-package-compiler/cases/errors_from_related_modules/src/one.gleam index 7cd8b1b18..e9d9d1a21 100644 --- a/test-package-compiler/cases/errors_from_related_modules/src/one.gleam +++ b/test-package-compiler/cases/errors_from_related_modules/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn one_error() { 1 + True } diff --git a/test-package-compiler/cases/errors_from_related_modules/src/two.gleam b/test-package-compiler/cases/errors_from_related_modules/src/two.gleam index 06e142a6a..2a1015868 100644 --- a/test-package-compiler/cases/errors_from_related_modules/src/two.gleam +++ b/test-package-compiler/cases/errors_from_related_modules/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn two_error() { 1 + False } diff --git a/test-package-compiler/cases/errors_from_related_skipped_modules/gleam.toml b/test-package-compiler/cases/errors_from_related_skipped_modules/gleam.toml index 60c3fbe88..5694725e4 100644 --- a/test-package-compiler/cases/errors_from_related_skipped_modules/gleam.toml +++ b/test-package-compiler/cases/errors_from_related_skipped_modules/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + name = "errors_from_related_skipped_modules" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/errors_from_related_skipped_modules/src/one.gleam b/test-package-compiler/cases/errors_from_related_skipped_modules/src/one.gleam index 7cd8b1b18..e9d9d1a21 100644 --- a/test-package-compiler/cases/errors_from_related_skipped_modules/src/one.gleam +++ b/test-package-compiler/cases/errors_from_related_skipped_modules/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn one_error() { 1 + True } diff --git a/test-package-compiler/cases/errors_from_related_skipped_modules/src/three.gleam b/test-package-compiler/cases/errors_from_related_skipped_modules/src/three.gleam index 54bf16876..403e6e7e6 100644 --- a/test-package-compiler/cases/errors_from_related_skipped_modules/src/three.gleam +++ b/test-package-compiler/cases/errors_from_related_skipped_modules/src/three.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + //// This module depends on two, that doesn't have any errors but it should be //// skipped anyway as it depends on a module that does have errors. //// So this module has to be skipped as well!! diff --git a/test-package-compiler/cases/errors_from_related_skipped_modules/src/two.gleam b/test-package-compiler/cases/errors_from_related_skipped_modules/src/two.gleam index 5bcd55be8..90a80a84d 100644 --- a/test-package-compiler/cases/errors_from_related_skipped_modules/src/two.gleam +++ b/test-package-compiler/cases/errors_from_related_skipped_modules/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + //// This module doesn't have any errors, but will be skipped because it depends //// on module one which has errors! diff --git a/test-package-compiler/cases/errors_from_unrelated_modules/gleam.toml b/test-package-compiler/cases/errors_from_unrelated_modules/gleam.toml index dffbcdf60..360df4b4e 100644 --- a/test-package-compiler/cases/errors_from_unrelated_modules/gleam.toml +++ b/test-package-compiler/cases/errors_from_unrelated_modules/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + name = "errors_from_unrelated_modules" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/errors_from_unrelated_modules/src/one.gleam b/test-package-compiler/cases/errors_from_unrelated_modules/src/one.gleam index 7cd8b1b18..e9d9d1a21 100644 --- a/test-package-compiler/cases/errors_from_unrelated_modules/src/one.gleam +++ b/test-package-compiler/cases/errors_from_unrelated_modules/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn one_error() { 1 + True } diff --git a/test-package-compiler/cases/errors_from_unrelated_modules/src/two.gleam b/test-package-compiler/cases/errors_from_unrelated_modules/src/two.gleam index 0bad7cbb8..4f42c4363 100644 --- a/test-package-compiler/cases/errors_from_unrelated_modules/src/two.gleam +++ b/test-package-compiler/cases/errors_from_unrelated_modules/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import one pub fn two_error() { diff --git a/test-package-compiler/cases/hello_joe/gleam.toml b/test-package-compiler/cases/hello_joe/gleam.toml index 659392bf5..773d8980f 100644 --- a/test-package-compiler/cases/hello_joe/gleam.toml +++ b/test-package-compiler/cases/hello_joe/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "hello_joe" version = "0.1.0" diff --git a/test-package-compiler/cases/hello_joe/src/hello_joe.gleam b/test-package-compiler/cases/hello_joe/src/hello_joe.gleam index 4bf516670..d02509670 100644 --- a/test-package-compiler/cases/hello_joe/src/hello_joe.gleam +++ b/test-package-compiler/cases/hello_joe/src/hello_joe.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub fn main() { "Hello, Joe!" } diff --git a/test-package-compiler/cases/import_cycle/gleam.toml b/test-package-compiler/cases/import_cycle/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/import_cycle/gleam.toml +++ b/test-package-compiler/cases/import_cycle/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/import_cycle/src/one.gleam b/test-package-compiler/cases/import_cycle/src/one.gleam index 4481f61e4..9450fabb2 100644 --- a/test-package-compiler/cases/import_cycle/src/one.gleam +++ b/test-package-compiler/cases/import_cycle/src/one.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one diff --git a/test-package-compiler/cases/import_cycle_multi/gleam.toml b/test-package-compiler/cases/import_cycle_multi/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/import_cycle_multi/gleam.toml +++ b/test-package-compiler/cases/import_cycle_multi/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/import_cycle_multi/src/one.gleam b/test-package-compiler/cases/import_cycle_multi/src/one.gleam index d6ec06a97..ffad1c568 100644 --- a/test-package-compiler/cases/import_cycle_multi/src/one.gleam +++ b/test-package-compiler/cases/import_cycle_multi/src/one.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + import two diff --git a/test-package-compiler/cases/import_cycle_multi/src/three.gleam b/test-package-compiler/cases/import_cycle_multi/src/three.gleam index 4481f61e4..9450fabb2 100644 --- a/test-package-compiler/cases/import_cycle_multi/src/three.gleam +++ b/test-package-compiler/cases/import_cycle_multi/src/three.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one diff --git a/test-package-compiler/cases/import_cycle_multi/src/two.gleam b/test-package-compiler/cases/import_cycle_multi/src/two.gleam index 9dbb4ddc0..95091584c 100644 --- a/test-package-compiler/cases/import_cycle_multi/src/two.gleam +++ b/test-package-compiler/cases/import_cycle_multi/src/two.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import three diff --git a/test-package-compiler/cases/import_shadowed_name_warning/gleam.toml b/test-package-compiler/cases/import_shadowed_name_warning/gleam.toml index ae6d020a3..73ca76a8b 100644 --- a/test-package-compiler/cases/import_shadowed_name_warning/gleam.toml +++ b/test-package-compiler/cases/import_shadowed_name_warning/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + # This should emit no warnings. # https://github.com/gleam-lang/otp/pull/22 name = "importy" diff --git a/test-package-compiler/cases/import_shadowed_name_warning/src/one.gleam b/test-package-compiler/cases/import_shadowed_name_warning/src/one.gleam index 66eeb2296..e0e1fd3e9 100644 --- a/test-package-compiler/cases/import_shadowed_name_warning/src/one.gleam +++ b/test-package-compiler/cases/import_shadowed_name_warning/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // https://github.com/gleam-lang/otp/pull/22 pub type Port diff --git a/test-package-compiler/cases/import_shadowed_name_warning/src/two.gleam b/test-package-compiler/cases/import_shadowed_name_warning/src/two.gleam index fe53edbc6..3d2f4e686 100644 --- a/test-package-compiler/cases/import_shadowed_name_warning/src/two.gleam +++ b/test-package-compiler/cases/import_shadowed_name_warning/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + //// https://github.com/gleam-lang/otp/pull/22 // No warning should be emitted about this imported type. The compiler does not diff --git a/test-package-compiler/cases/imported_constants/gleam.toml b/test-package-compiler/cases/imported_constants/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/imported_constants/gleam.toml +++ b/test-package-compiler/cases/imported_constants/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/imported_constants/src/one.gleam b/test-package-compiler/cases/imported_constants/src/one.gleam index c3664a003..45664d1d9 100644 --- a/test-package-compiler/cases/imported_constants/src/one.gleam +++ b/test-package-compiler/cases/imported_constants/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type A { A } diff --git a/test-package-compiler/cases/imported_constants/src/two.gleam b/test-package-compiler/cases/imported_constants/src/two.gleam index 2f72fe6db..773115a6a 100644 --- a/test-package-compiler/cases/imported_constants/src/two.gleam +++ b/test-package-compiler/cases/imported_constants/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one.{A, A as C, B, B as D, User, User as XUser} /// For these statements we use the records in a qualified fashion diff --git a/test-package-compiler/cases/imported_external_fns/gleam.toml b/test-package-compiler/cases/imported_external_fns/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/imported_external_fns/gleam.toml +++ b/test-package-compiler/cases/imported_external_fns/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/imported_external_fns/src/one.gleam b/test-package-compiler/cases/imported_external_fns/src/one.gleam index 8ba4138c3..457bf6f39 100644 --- a/test-package-compiler/cases/imported_external_fns/src/one.gleam +++ b/test-package-compiler/cases/imported_external_fns/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + @external(erlang, "thing", "new") pub fn thing() -> Nil diff --git a/test-package-compiler/cases/imported_external_fns/src/three.gleam b/test-package-compiler/cases/imported_external_fns/src/three.gleam index 8ba4138c3..457bf6f39 100644 --- a/test-package-compiler/cases/imported_external_fns/src/three.gleam +++ b/test-package-compiler/cases/imported_external_fns/src/three.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + @external(erlang, "thing", "new") pub fn thing() -> Nil diff --git a/test-package-compiler/cases/imported_external_fns/src/two.gleam b/test-package-compiler/cases/imported_external_fns/src/two.gleam index 662baca72..5919f3e38 100644 --- a/test-package-compiler/cases/imported_external_fns/src/two.gleam +++ b/test-package-compiler/cases/imported_external_fns/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one.{ escaped_thing, escaped_thing as xescaped_thing, thing, thing as xthing, } diff --git a/test-package-compiler/cases/imported_record_constructors/gleam.toml b/test-package-compiler/cases/imported_record_constructors/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/imported_record_constructors/gleam.toml +++ b/test-package-compiler/cases/imported_record_constructors/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/imported_record_constructors/src/one/one.gleam b/test-package-compiler/cases/imported_record_constructors/src/one/one.gleam index c3664a003..45664d1d9 100644 --- a/test-package-compiler/cases/imported_record_constructors/src/one/one.gleam +++ b/test-package-compiler/cases/imported_record_constructors/src/one/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type A { A } diff --git a/test-package-compiler/cases/imported_record_constructors/src/one/two.gleam b/test-package-compiler/cases/imported_record_constructors/src/one/two.gleam index c3664a003..45664d1d9 100644 --- a/test-package-compiler/cases/imported_record_constructors/src/one/two.gleam +++ b/test-package-compiler/cases/imported_record_constructors/src/one/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type A { A } diff --git a/test-package-compiler/cases/imported_record_constructors/src/two.gleam b/test-package-compiler/cases/imported_record_constructors/src/two.gleam index 30d64ac23..dbc916715 100644 --- a/test-package-compiler/cases/imported_record_constructors/src/two.gleam +++ b/test-package-compiler/cases/imported_record_constructors/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one/one.{A, A as C, B, B as D, User, User as XUser} import one/two as aliased diff --git a/test-package-compiler/cases/javascript_d_ts/gleam.toml b/test-package-compiler/cases/javascript_d_ts/gleam.toml index 94750918b..fe123ee55 100644 --- a/test-package-compiler/cases/javascript_d_ts/gleam.toml +++ b/test-package-compiler/cases/javascript_d_ts/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "hello" version = "0.1.0" target = "javascript" diff --git a/test-package-compiler/cases/javascript_d_ts/src/hello.gleam b/test-package-compiler/cases/javascript_d_ts/src/hello.gleam index 044d0ed7a..9795dbeca 100644 --- a/test-package-compiler/cases/javascript_d_ts/src/hello.gleam +++ b/test-package-compiler/cases/javascript_d_ts/src/hello.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type Wibble { Woo } diff --git a/test-package-compiler/cases/javascript_empty/gleam.toml b/test-package-compiler/cases/javascript_empty/gleam.toml index 6d26ea980..23a5bec84 100644 --- a/test-package-compiler/cases/javascript_empty/gleam.toml +++ b/test-package-compiler/cases/javascript_empty/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "hello_joe" version = "0.1.0" target = "javascript" diff --git a/test-package-compiler/cases/javascript_empty/src/empty.gleam b/test-package-compiler/cases/javascript_empty/src/empty.gleam index 8b1378917..0d33231f3 100644 --- a/test-package-compiler/cases/javascript_empty/src/empty.gleam +++ b/test-package-compiler/cases/javascript_empty/src/empty.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + diff --git a/test-package-compiler/cases/javascript_import/gleam.toml b/test-package-compiler/cases/javascript_import/gleam.toml index 8c2a5dddf..ffd273ca9 100644 --- a/test-package-compiler/cases/javascript_import/gleam.toml +++ b/test-package-compiler/cases/javascript_import/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "importy" version = "0.1.0" target = "javascript" diff --git a/test-package-compiler/cases/javascript_import/src/one/two.gleam b/test-package-compiler/cases/javascript_import/src/one/two.gleam index 9e8c85759..45cf0ff0b 100644 --- a/test-package-compiler/cases/javascript_import/src/one/two.gleam +++ b/test-package-compiler/cases/javascript_import/src/one/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type A { A } diff --git a/test-package-compiler/cases/javascript_import/src/two.gleam b/test-package-compiler/cases/javascript_import/src/two.gleam index d120d86db..5c5cb2505 100644 --- a/test-package-compiler/cases/javascript_import/src/two.gleam +++ b/test-package-compiler/cases/javascript_import/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one/two pub const x = two.A diff --git a/test-package-compiler/cases/javascript_sourcemaps/gleam.toml b/test-package-compiler/cases/javascript_sourcemaps/gleam.toml index 33cbacc5d..dfc7fab59 100644 --- a/test-package-compiler/cases/javascript_sourcemaps/gleam.toml +++ b/test-package-compiler/cases/javascript_sourcemaps/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "hello" version = "0.1.0" target = "javascript" diff --git a/test-package-compiler/cases/javascript_sourcemaps/src/hello.gleam b/test-package-compiler/cases/javascript_sourcemaps/src/hello.gleam index 044d0ed7a..9795dbeca 100644 --- a/test-package-compiler/cases/javascript_sourcemaps/src/hello.gleam +++ b/test-package-compiler/cases/javascript_sourcemaps/src/hello.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type Wibble { Woo } diff --git a/test-package-compiler/cases/not_overwriting_erlang_module/gleam.toml b/test-package-compiler/cases/not_overwriting_erlang_module/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/not_overwriting_erlang_module/gleam.toml +++ b/test-package-compiler/cases/not_overwriting_erlang_module/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/not_overwriting_erlang_module/src/app/code.gleam b/test-package-compiler/cases/not_overwriting_erlang_module/src/app/code.gleam index aba056a6b..bfbe8aece 100644 --- a/test-package-compiler/cases/not_overwriting_erlang_module/src/app/code.gleam +++ b/test-package-compiler/cases/not_overwriting_erlang_module/src/app/code.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + // This module is named "app/code". // // The last segment is the same as a built in Erlang module, but it is in the diff --git a/test-package-compiler/cases/opaque_type_accessor/gleam.toml b/test-package-compiler/cases/opaque_type_accessor/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/opaque_type_accessor/gleam.toml +++ b/test-package-compiler/cases/opaque_type_accessor/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/opaque_type_accessor/src/one.gleam b/test-package-compiler/cases/opaque_type_accessor/src/one.gleam index ee9caffbf..658b53bc1 100644 --- a/test-package-compiler/cases/opaque_type_accessor/src/one.gleam +++ b/test-package-compiler/cases/opaque_type_accessor/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub opaque type User { User(name: String, score: Int) } diff --git a/test-package-compiler/cases/opaque_type_accessor/src/two.gleam b/test-package-compiler/cases/opaque_type_accessor/src/two.gleam index c449c8980..a03805287 100644 --- a/test-package-compiler/cases/opaque_type_accessor/src/two.gleam +++ b/test-package-compiler/cases/opaque_type_accessor/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one.{type User} // This operation is not permitted because the type is opaque and this module diff --git a/test-package-compiler/cases/opaque_type_destructure/gleam.toml b/test-package-compiler/cases/opaque_type_destructure/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/opaque_type_destructure/gleam.toml +++ b/test-package-compiler/cases/opaque_type_destructure/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/opaque_type_destructure/src/one.gleam b/test-package-compiler/cases/opaque_type_destructure/src/one.gleam index ee9caffbf..658b53bc1 100644 --- a/test-package-compiler/cases/opaque_type_destructure/src/one.gleam +++ b/test-package-compiler/cases/opaque_type_destructure/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub opaque type User { User(name: String, score: Int) } diff --git a/test-package-compiler/cases/opaque_type_destructure/src/two.gleam b/test-package-compiler/cases/opaque_type_destructure/src/two.gleam index e84a39637..938d8afe6 100644 --- a/test-package-compiler/cases/opaque_type_destructure/src/two.gleam +++ b/test-package-compiler/cases/opaque_type_destructure/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one // This operation is not permitted because the type is opaque and this module diff --git a/test-package-compiler/cases/overwriting_erlang_module/gleam.toml b/test-package-compiler/cases/overwriting_erlang_module/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/overwriting_erlang_module/gleam.toml +++ b/test-package-compiler/cases/overwriting_erlang_module/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/overwriting_erlang_module/src/code.gleam b/test-package-compiler/cases/overwriting_erlang_module/src/code.gleam index 92dd93f7a..1b4189db9 100644 --- a/test-package-compiler/cases/overwriting_erlang_module/src/code.gleam +++ b/test-package-compiler/cases/overwriting_erlang_module/src/code.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + // This module is named "code". // // If you were to compile this and load it into the Erlang virtual machine it diff --git a/test-package-compiler/cases/src_importing_dev/dev/two.gleam b/test-package-compiler/cases/src_importing_dev/dev/two.gleam index 8b1378917..b656fd617 100644 --- a/test-package-compiler/cases/src_importing_dev/dev/two.gleam +++ b/test-package-compiler/cases/src_importing_dev/dev/two.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + diff --git a/test-package-compiler/cases/src_importing_dev/gleam.toml b/test-package-compiler/cases/src_importing_dev/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/src_importing_dev/gleam.toml +++ b/test-package-compiler/cases/src_importing_dev/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/src_importing_dev/src/one.gleam b/test-package-compiler/cases/src_importing_dev/src/one.gleam index cf17e9d6c..161dfd485 100644 --- a/test-package-compiler/cases/src_importing_dev/src/one.gleam +++ b/test-package-compiler/cases/src_importing_dev/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + // This import will fail because the `two` module is in the `dev` directory and // as such isn't permitted to be imported into the `src` directory. import two diff --git a/test-package-compiler/cases/src_importing_test/gleam.toml b/test-package-compiler/cases/src_importing_test/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/src_importing_test/gleam.toml +++ b/test-package-compiler/cases/src_importing_test/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/src_importing_test/src/one.gleam b/test-package-compiler/cases/src_importing_test/src/one.gleam index 031d7760b..ba1b13460 100644 --- a/test-package-compiler/cases/src_importing_test/src/one.gleam +++ b/test-package-compiler/cases/src_importing_test/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // This import will fail because the `two` module is in the `test` directory and // as such isn't permitted to be imported into the `src` directory. import two diff --git a/test-package-compiler/cases/src_importing_test/test/two.gleam b/test-package-compiler/cases/src_importing_test/test/two.gleam index 8b1378917..b656fd617 100644 --- a/test-package-compiler/cases/src_importing_test/test/two.gleam +++ b/test-package-compiler/cases/src_importing_test/test/two.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + diff --git a/test-package-compiler/cases/unknown_module_field_in_constant/gleam.toml b/test-package-compiler/cases/unknown_module_field_in_constant/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/unknown_module_field_in_constant/gleam.toml +++ b/test-package-compiler/cases/unknown_module_field_in_constant/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/unknown_module_field_in_constant/src/one.gleam b/test-package-compiler/cases/unknown_module_field_in_constant/src/one.gleam index 9e8c85759..45cf0ff0b 100644 --- a/test-package-compiler/cases/unknown_module_field_in_constant/src/one.gleam +++ b/test-package-compiler/cases/unknown_module_field_in_constant/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type A { A } diff --git a/test-package-compiler/cases/unknown_module_field_in_constant/src/two.gleam b/test-package-compiler/cases/unknown_module_field_in_constant/src/two.gleam index 4308b1a25..a5117dc00 100644 --- a/test-package-compiler/cases/unknown_module_field_in_constant/src/two.gleam +++ b/test-package-compiler/cases/unknown_module_field_in_constant/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one pub const it = one.B diff --git a/test-package-compiler/cases/unknown_module_field_in_expression/gleam.toml b/test-package-compiler/cases/unknown_module_field_in_expression/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/unknown_module_field_in_expression/gleam.toml +++ b/test-package-compiler/cases/unknown_module_field_in_expression/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/unknown_module_field_in_expression/src/one.gleam b/test-package-compiler/cases/unknown_module_field_in_expression/src/one.gleam index 9e8c85759..45cf0ff0b 100644 --- a/test-package-compiler/cases/unknown_module_field_in_expression/src/one.gleam +++ b/test-package-compiler/cases/unknown_module_field_in_expression/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type A { A } diff --git a/test-package-compiler/cases/unknown_module_field_in_expression/src/two.gleam b/test-package-compiler/cases/unknown_module_field_in_expression/src/two.gleam index e8cce10e2..eb81c94dc 100644 --- a/test-package-compiler/cases/unknown_module_field_in_expression/src/two.gleam +++ b/test-package-compiler/cases/unknown_module_field_in_expression/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one pub fn it() { diff --git a/test-package-compiler/cases/unknown_module_field_in_import/gleam.toml b/test-package-compiler/cases/unknown_module_field_in_import/gleam.toml index 89e51684c..168b596b0 100644 --- a/test-package-compiler/cases/unknown_module_field_in_import/gleam.toml +++ b/test-package-compiler/cases/unknown_module_field_in_import/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + name = "importy" version = "0.1.0" target = "erlang" diff --git a/test-package-compiler/cases/unknown_module_field_in_import/src/one.gleam b/test-package-compiler/cases/unknown_module_field_in_import/src/one.gleam index 9e8c85759..45cf0ff0b 100644 --- a/test-package-compiler/cases/unknown_module_field_in_import/src/one.gleam +++ b/test-package-compiler/cases/unknown_module_field_in_import/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type A { A } diff --git a/test-package-compiler/cases/unknown_module_field_in_import/src/two.gleam b/test-package-compiler/cases/unknown_module_field_in_import/src/two.gleam index 980956425..44e31bf77 100644 --- a/test-package-compiler/cases/unknown_module_field_in_import/src/two.gleam +++ b/test-package-compiler/cases/unknown_module_field_in_import/src/two.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + import one.{B} diff --git a/test-package-compiler/cases/variable_or_module/gleam.toml b/test-package-compiler/cases/variable_or_module/gleam.toml index 3e1268273..3afff8a4e 100644 --- a/test-package-compiler/cases/variable_or_module/gleam.toml +++ b/test-package-compiler/cases/variable_or_module/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + # Distinguish between a module and a value with the same local name. # https://github.com/gleam-lang/gleam/issues/807 name = "importy" diff --git a/test-package-compiler/cases/variable_or_module/src/main.gleam b/test-package-compiler/cases/variable_or_module/src/main.gleam index 10ff1a42a..55cbc649b 100644 --- a/test-package-compiler/cases/variable_or_module/src/main.gleam +++ b/test-package-compiler/cases/variable_or_module/src/main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // https://github.com/gleam-lang/gleam/issues/807 import power.{type Power} diff --git a/test-package-compiler/cases/variable_or_module/src/power.gleam b/test-package-compiler/cases/variable_or_module/src/power.gleam index 43f5b092f..0fb433eff 100644 --- a/test-package-compiler/cases/variable_or_module/src/power.gleam +++ b/test-package-compiler/cases/variable_or_module/src/power.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + // https://github.com/gleam-lang/gleam/issues/807 pub type Power { Power(value: Int) diff --git a/test-package-compiler/src/generated_tests.rs b/test-package-compiler/src/generated_tests.rs index fd2182595..3d314b424 100644 --- a/test-package-compiler/src/generated_tests.rs +++ b/test-package-compiler/src/generated_tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + //! This file is generated by build.rs //! Do not edit it directly, instead add new test cases to ./cases diff --git a/test-package-compiler/src/lib.rs b/test-package-compiler/src/lib.rs index 074b8e9f7..c43f950b4 100644 --- a/test-package-compiler/src/lib.rs +++ b/test-package-compiler/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + #[cfg(test)] mod generated_tests; diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__alias_unqualified_import.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__alias_unqualified_import.snap index 58dcc7814..105b8f1c5 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__alias_unqualified_import.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__alias_unqualified_import.snap @@ -6,7 +6,7 @@ expression: "./cases/alias_unqualified_import" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one.cache_meta -<85 byte binary> +<97 byte binary> //// /out/lib/the_package/_gleam_artefacts/one.erl -module(one). @@ -17,7 +17,7 @@ expression: "./cases/alias_unqualified_import" -type empty() :: empty. --file("src/one.gleam", 2). +-file("src/one.gleam", 5). -spec id(I) -> I. id(X) -> X. @@ -27,7 +27,7 @@ id(X) -> <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<96 byte binary> +<108 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.erl -module(two). @@ -35,7 +35,7 @@ id(X) -> -define(FILEPATH, "src/two.gleam"). -export([make/0]). --file("src/two.gleam", 4). +-file("src/two.gleam", 7). -spec make() -> one:empty(). make() -> one:id(empty). diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__dev_importing_test.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__dev_importing_test.snap index d5f1c4e6d..7897b4c01 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__dev_importing_test.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__dev_importing_test.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/dev_importing_test" --- error: Dev importing test module - ┌─ dev/one.gleam:3:1 + ┌─ dev/one.gleam:6:1 │ -3 │ import two +6 │ import two │ ^ Imported here The development module `one` is importing the test module `two`. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__empty_module_warning.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__empty_module_warning.snap index 7646e4e95..1a228799f 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__empty_module_warning.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__empty_module_warning.snap @@ -6,7 +6,7 @@ expression: "./cases/empty_module_warning" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/empty.cache_meta -<53 byte binary> +<65 byte binary> //// /out/lib/the_package/_gleam_artefacts/empty.erl -module(empty). @@ -16,7 +16,7 @@ expression: "./cases/empty_module_warning" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/internal.cache_meta -<69 byte binary> +<81 byte binary> //// /out/lib/the_package/_gleam_artefacts/internal.erl -module(internal). @@ -32,7 +32,7 @@ expression: "./cases/empty_module_warning" -define(DOC(Str), -compile([])). -endif. --file("src/internal.gleam", 2). +-file("src/internal.gleam", 5). ?DOC(false). -spec private_function() -> nil. private_function() -> @@ -43,7 +43,7 @@ private_function() -> <.cache binary> //// /out/lib/the_package/_gleam_artefacts/private.cache_meta -<65 byte binary> +<77 byte binary> //// /out/lib/the_package/_gleam_artefacts/private.erl -module(private). @@ -53,7 +53,7 @@ private_function() -> <.cache binary> //// /out/lib/the_package/_gleam_artefacts/public.cache_meta -<65 byte binary> +<77 byte binary> //// /out/lib/the_package/_gleam_artefacts/public.erl -module(public). @@ -61,7 +61,7 @@ private_function() -> -define(FILEPATH, "src/public.gleam"). -export([main/0]). --file("src/public.gleam", 1). +-file("src/public.gleam", 4). -spec main() -> binary(). main() -> <<"This module has public definitions"/utf8>>. @@ -91,9 +91,9 @@ Hint: You can safely remove this module. //// Warning warning: Unused private function - ┌─ src/private.gleam:1:1 + ┌─ src/private.gleam:4:1 │ -1 │ fn private_function() -> Nil { +4 │ fn private_function() -> Nil { │ ^ This private function is never used Hint: You can safely remove it. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation.snap index f137c1838..cccc8f1dd 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation.snap @@ -6,7 +6,7 @@ expression: "./cases/erlang_app_generation" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/main.cache_meta -<57 byte binary> +<69 byte binary> //// /out/lib/the_package/_gleam_artefacts/main.erl -module(main). diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation_with_argument.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation_with_argument.snap index fb05199a8..ec44e0fd6 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation_with_argument.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_app_generation_with_argument.snap @@ -6,7 +6,7 @@ expression: "./cases/erlang_app_generation_with_argument" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/main.cache_meta -<57 byte binary> +<69 byte binary> //// /out/lib/the_package/_gleam_artefacts/main.erl -module(main). diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_bug_752.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_bug_752.snap index 2d4d36fc9..ea43c2c57 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_bug_752.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_bug_752.snap @@ -6,7 +6,7 @@ expression: "./cases/erlang_bug_752" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one.cache_meta -<65 byte binary> +<77 byte binary> //// /out/lib/the_package/_gleam_artefacts/one.erl -module(one). @@ -23,7 +23,7 @@ expression: "./cases/erlang_bug_752" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<92 byte binary> +<104 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.erl -module(two). diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_empty.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_empty.snap index 99aaddeda..3ac000bf8 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_empty.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_empty.snap @@ -6,7 +6,7 @@ expression: "./cases/erlang_empty" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/empty.cache_meta -<57 byte binary> +<69 byte binary> //// /out/lib/the_package/_gleam_artefacts/empty.erl -module(empty). diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_escape_names.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_escape_names.snap index 48246ef62..838d0df5d 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_escape_names.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_escape_names.snap @@ -6,7 +6,7 @@ expression: "./cases/erlang_escape_names" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one.cache_meta -<69 byte binary> +<81 byte binary> //// /out/lib/the_package/_gleam_artefacts/one.erl -module(one). @@ -14,7 +14,7 @@ expression: "./cases/erlang_escape_names" -define(FILEPATH, "src/one.gleam"). -export(['receive'/1]). --file("src/one.gleam", 2). +-file("src/one.gleam", 5). -spec 'receive'(I) -> I. 'receive'(X) -> X. @@ -24,7 +24,7 @@ expression: "./cases/erlang_escape_names" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<144 byte binary> +<156 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.erl -module(two). @@ -32,22 +32,22 @@ expression: "./cases/erlang_escape_names" -define(FILEPATH, "src/two.gleam"). -export([qualified_call/0, qualified_value/0, unqualified_call/0, unqualified_value/0]). --file("src/two.gleam", 4). +-file("src/two.gleam", 7). -spec qualified_call() -> integer(). qualified_call() -> one:'receive'(1). --file("src/two.gleam", 8). +-file("src/two.gleam", 11). -spec qualified_value() -> fun((Q) -> Q). qualified_value() -> fun one:'receive'/1. --file("src/two.gleam", 12). +-file("src/two.gleam", 15). -spec unqualified_call() -> integer(). unqualified_call() -> one:'receive'(1). --file("src/two.gleam", 16). +-file("src/two.gleam", 19). -spec unqualified_value() -> fun((S) -> S). unqualified_value() -> fun one:'receive'/1. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import.snap index ca763690c..0a52b7c37 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import.snap @@ -6,7 +6,7 @@ expression: "./cases/erlang_import" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one.cache_meta -<96 byte binary> +<108 byte binary> //// /out/lib/the_package/_gleam_artefacts/one.erl -module(one). @@ -14,7 +14,7 @@ expression: "./cases/erlang_import" -define(FILEPATH, "src/one.gleam"). -export([unbox/1]). --file("src/one.gleam", 3). +-file("src/one.gleam", 6). -spec unbox(two:box()) -> integer(). unbox(X) -> {box, I} = X, @@ -25,7 +25,7 @@ unbox(X) -> <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<65 byte binary> +<77 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.erl -module(two). diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import_shadowing_prelude.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import_shadowing_prelude.snap index 4b3ad7fa3..5326188ca 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import_shadowing_prelude.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_import_shadowing_prelude.snap @@ -6,7 +6,7 @@ expression: "./cases/erlang_import_shadowing_prelude" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one.cache_meta -<69 byte binary> +<81 byte binary> //// /out/lib/the_package/_gleam_artefacts/one.erl -module(one). @@ -23,7 +23,7 @@ expression: "./cases/erlang_import_shadowing_prelude" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<96 byte binary> +<108 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.erl -module(two). @@ -31,7 +31,7 @@ expression: "./cases/erlang_import_shadowing_prelude" -define(FILEPATH, "src/two.gleam"). -export([main/0]). --file("src/two.gleam", 4). +-file("src/two.gleam", 7). -spec main() -> one:error(). main() -> error. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested.snap index df0b2b32b..9a734a24e 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested.snap @@ -6,7 +6,7 @@ expression: "./cases/erlang_nested" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta -<65 byte binary> +<77 byte binary> //// /out/lib/the_package/_gleam_artefacts/one@two.erl -module(one@two). @@ -14,7 +14,7 @@ expression: "./cases/erlang_nested" -define(FILEPATH, "src/one/two.gleam"). -export([main/0]). --file("src/one/two.gleam", 1). +-file("src/one/two.gleam", 4). -spec main() -> binary(). main() -> <<"Hi there"/utf8>>. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested_qualified_constant.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested_qualified_constant.snap index b590bc69b..da90cede2 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested_qualified_constant.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__erlang_nested_qualified_constant.snap @@ -6,7 +6,7 @@ expression: "./cases/erlang_nested_qualified_constant" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta -<65 byte binary> +<77 byte binary> //// /out/lib/the_package/_gleam_artefacts/one@two.erl -module(one@two). @@ -23,7 +23,7 @@ expression: "./cases/erlang_nested_qualified_constant" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<108 byte binary> +<120 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.erl -module(two). diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_related_modules.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_related_modules.snap index d82ebea3d..c48b28235 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_related_modules.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_related_modules.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/errors_from_related_modules" --- error: Type mismatch - ┌─ src/one.gleam:2:7 + ┌─ src/one.gleam:5:7 │ -2 │ 1 + True +5 │ 1 + True │ ^ The + operator expects arguments of this type: @@ -17,9 +17,9 @@ But this argument has this type: Bool error: Type mismatch - ┌─ src/two.gleam:2:7 + ┌─ src/two.gleam:5:7 │ -2 │ 1 + False +5 │ 1 + False │ ^ The + operator expects arguments of this type: diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_related_skipped_modules.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_related_skipped_modules.snap index ea87789d3..871457999 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_related_skipped_modules.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_related_skipped_modules.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/errors_from_related_skipped_modules" --- error: Type mismatch - ┌─ src/one.gleam:2:7 + ┌─ src/one.gleam:5:7 │ -2 │ 1 + True +5 │ 1 + True │ ^ The + operator expects arguments of this type: diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_unrelated_modules.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_unrelated_modules.snap index 1032ae98e..17a546dae 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_unrelated_modules.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__errors_from_unrelated_modules.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/errors_from_unrelated_modules" --- error: Type mismatch - ┌─ src/one.gleam:2:7 + ┌─ src/one.gleam:5:7 │ -2 │ 1 + True +5 │ 1 + True │ ^ The + operator expects arguments of this type: diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__hello_joe.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__hello_joe.snap index bf4fae5ce..c38e97538 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__hello_joe.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__hello_joe.snap @@ -6,7 +6,7 @@ expression: "./cases/hello_joe" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/hello_joe.cache_meta -<65 byte binary> +<77 byte binary> //// /out/lib/the_package/_gleam_artefacts/hello_joe.erl -module(hello_joe). @@ -14,7 +14,7 @@ expression: "./cases/hello_joe" -define(FILEPATH, "src/hello_joe.gleam"). -export([main/0]). --file("src/hello_joe.gleam", 1). +-file("src/hello_joe.gleam", 4). -spec main() -> binary(). main() -> <<"Hello, Joe!"/utf8>>. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle.snap index aad89d673..fa9dbeda2 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/import_cycle" --- error: Import cycle - ┌─ src/one.gleam:1:1 + ┌─ src/one.gleam:4:1 │ -1 │ import one +4 │ import one │ ^ Imported here The import statements for these modules form a cycle: diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle_multi.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle_multi.snap index 43fe83e3f..f14557ac6 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle_multi.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_cycle_multi.snap @@ -3,19 +3,19 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/import_cycle_multi" --- error: Import cycle - ┌─ src/three.gleam:1:1 + ┌─ src/three.gleam:4:1 │ -1 │ import one +4 │ import one │ ^ Imported here │ - ┌─ src/two.gleam:1:1 + ┌─ src/two.gleam:4:1 │ -1 │ import three +4 │ import three │ ------------ Imported here │ - ┌─ src/one.gleam:1:1 + ┌─ src/one.gleam:4:1 │ -1 │ import two +4 │ import two │ ---------- Imported here The import statements for these modules form a cycle: diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_shadowed_name_warning.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_shadowed_name_warning.snap index 3816a0e9d..77c1472c7 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_shadowed_name_warning.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__import_shadowed_name_warning.snap @@ -6,7 +6,7 @@ expression: "./cases/import_shadowed_name_warning" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one.cache_meta -<65 byte binary> +<77 byte binary> //// /out/lib/the_package/_gleam_artefacts/one.erl -module(one). @@ -23,7 +23,7 @@ expression: "./cases/import_shadowed_name_warning" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<128 byte binary> +<140 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.erl -module(two). @@ -44,7 +44,7 @@ expression: "./cases/import_shadowed_name_warning" -type shadowing() :: port. --file("src/two.gleam", 14). +-file("src/two.gleam", 17). -spec use_type(one:port_()) -> nil. use_type(Port) -> wibble:wobble(Port). @@ -63,10 +63,10 @@ use_type(Port) -> //// Warning warning: Unused private constructor - ┌─ src/two.gleam:9:3 - │ -9 │ Port - │ ^ This private constructor is never used + ┌─ src/two.gleam:12:3 + │ +12 │ Port + │ ^ This private constructor is never used Hint: You can safely remove it. @@ -74,9 +74,9 @@ Hint: You can safely remove it. //// Warning warning: Unused private type - ┌─ src/two.gleam:7:1 - │ -7 │ type Shadowing { - │ ^ This private type is never used + ┌─ src/two.gleam:10:1 + │ +10 │ type Shadowing { + │ ^ This private type is never used Hint: You can safely remove it. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_constants.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_constants.snap index f05324c18..961733526 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_constants.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_constants.snap @@ -6,7 +6,7 @@ expression: "./cases/imported_constants" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one.cache_meta -<97 byte binary> +<109 byte binary> //// /out/lib/the_package/_gleam_artefacts/one.erl -module(one). @@ -27,7 +27,7 @@ expression: "./cases/imported_constants" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<332 byte binary> +<344 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.erl -module(two). @@ -43,37 +43,37 @@ expression: "./cases/imported_constants" -define(DOC(Str), -compile([])). -endif. --file("src/two.gleam", 6). +-file("src/two.gleam", 9). -spec qualified_fn_a() -> one:a(). qualified_fn_a() -> a. --file("src/two.gleam", 12). +-file("src/two.gleam", 15). -spec qualified_fn_b() -> one:b(). qualified_fn_b() -> {b, a, a}. --file("src/two.gleam", 19). +-file("src/two.gleam", 22). -spec unqualified_fn_a() -> one:a(). unqualified_fn_a() -> a. --file("src/two.gleam", 25). +-file("src/two.gleam", 28). -spec unqualified_fn_b() -> one:b(). unqualified_fn_b() -> {b, a, a}. --file("src/two.gleam", 33). +-file("src/two.gleam", 36). -spec aliased_fn_a() -> one:a(). aliased_fn_a() -> a. --file("src/two.gleam", 39). +-file("src/two.gleam", 42). -spec aliased_fn_b() -> one:b(). aliased_fn_b() -> {b, a, a}. --file("src/two.gleam", 45). +-file("src/two.gleam", 48). ?DOC( " For these statements we use the accessors for the record from the other\n" " module\n" @@ -84,20 +84,20 @@ accessors(User) -> Score = erlang:element(3, User), {Name, Score}. --file("src/two.gleam", 52). +-file("src/two.gleam", 55). ?DOC(" For these statements we use destructure the record\n"). -spec destructure_qualified(one:user()) -> {binary(), integer()}. destructure_qualified(User) -> {user, Name, Score} = User, {Name, Score}. --file("src/two.gleam", 57). +-file("src/two.gleam", 60). -spec destructure_unqualified(one:user()) -> {binary(), integer()}. destructure_unqualified(User) -> {user, Name, Score} = User, {Name, Score}. --file("src/two.gleam", 62). +-file("src/two.gleam", 65). -spec destructure_aliased(one:user()) -> {binary(), integer()}. destructure_aliased(User) -> {user, Name, Score} = User, diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_external_fns.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_external_fns.snap index ccfc61090..089e8475c 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_external_fns.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_external_fns.snap @@ -6,7 +6,7 @@ expression: "./cases/imported_external_fns" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one.cache_meta -<77 byte binary> +<89 byte binary> //// /out/lib/the_package/_gleam_artefacts/one.erl -module(one). @@ -14,12 +14,12 @@ expression: "./cases/imported_external_fns" -define(FILEPATH, "src/one.gleam"). -export([thing/0, escaped_thing/0]). --file("src/one.gleam", 2). +-file("src/one.gleam", 5). -spec thing() -> nil. thing() -> thing:new(). --file("src/one.gleam", 6). +-file("src/one.gleam", 9). -spec escaped_thing() -> nil. escaped_thing() -> 'the.thing':'make.new'(). @@ -29,7 +29,7 @@ escaped_thing() -> <.cache binary> //// /out/lib/the_package/_gleam_artefacts/three.cache_meta -<77 byte binary> +<89 byte binary> //// /out/lib/the_package/_gleam_artefacts/three.erl -module(three). @@ -37,12 +37,12 @@ escaped_thing() -> -define(FILEPATH, "src/three.gleam"). -export([thing/0, escaped_thing/0]). --file("src/three.gleam", 2). +-file("src/three.gleam", 5). -spec thing() -> nil. thing() -> thing:new(). --file("src/three.gleam", 6). +-file("src/three.gleam", 9). -spec escaped_thing() -> nil. escaped_thing() -> 'the.thing':'make.new'(). @@ -52,7 +52,7 @@ escaped_thing() -> <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<489 byte binary> +<501 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.erl -module(two). @@ -60,7 +60,7 @@ escaped_thing() -> -define(FILEPATH, "src/two.gleam"). -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]). --file("src/two.gleam", 24). +-file("src/two.gleam", 27). -spec the_consts() -> nil. the_consts() -> _ = fun thing:new/0, @@ -80,67 +80,67 @@ the_consts() -> 'the.thing':'make.new'(), 'the.thing':'make.new'(). --file("src/two.gleam", 45). +-file("src/two.gleam", 48). -spec fn_reference_qualified() -> fun(() -> nil). fn_reference_qualified() -> fun thing:new/0. --file("src/two.gleam", 49). +-file("src/two.gleam", 52). -spec fn_reference_qualified_aliased() -> fun(() -> nil). fn_reference_qualified_aliased() -> fun thing:new/0. --file("src/two.gleam", 53). +-file("src/two.gleam", 56). -spec fn_reference_unqualified() -> fun(() -> nil). fn_reference_unqualified() -> fun thing:new/0. --file("src/two.gleam", 57). +-file("src/two.gleam", 60). -spec fn_reference_unqualified_aliased() -> fun(() -> nil). fn_reference_unqualified_aliased() -> fun thing:new/0. --file("src/two.gleam", 63). +-file("src/two.gleam", 66). -spec fn_call_qualified() -> nil. fn_call_qualified() -> thing:new(). --file("src/two.gleam", 67). +-file("src/two.gleam", 70). -spec fn_call_qualified_aliased() -> nil. fn_call_qualified_aliased() -> thing:new(). --file("src/two.gleam", 71). +-file("src/two.gleam", 74). -spec fn_call_unqualified() -> nil. fn_call_unqualified() -> thing:new(). --file("src/two.gleam", 75). +-file("src/two.gleam", 78). -spec fn_call_unqualified_aliased() -> nil. fn_call_unqualified_aliased() -> thing:new(). --file("src/two.gleam", 97). +-file("src/two.gleam", 100). -spec x(any()) -> nil. x(_) -> nil. --file("src/two.gleam", 81). +-file("src/two.gleam", 84). -spec argument_reference_qualified() -> nil. argument_reference_qualified() -> x(fun 'the.thing':'make.new'/0). --file("src/two.gleam", 85). +-file("src/two.gleam", 88). -spec argument_reference_qualified_aliased() -> nil. argument_reference_qualified_aliased() -> x(fun 'the.thing':'make.new'/0). --file("src/two.gleam", 89). +-file("src/two.gleam", 92). -spec argument_reference_unqualified() -> nil. argument_reference_unqualified() -> x(fun 'the.thing':'make.new'/0). --file("src/two.gleam", 93). +-file("src/two.gleam", 96). -spec argument_reference_unqualified_aliased() -> nil. argument_reference_unqualified_aliased() -> x(fun 'the.thing':'make.new'/0). diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_record_constructors.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_record_constructors.snap index aef49490f..940f6f232 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_record_constructors.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__imported_record_constructors.snap @@ -6,7 +6,7 @@ expression: "./cases/imported_record_constructors" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one@one.cache_meta -<97 byte binary> +<109 byte binary> //// /out/lib/the_package/_gleam_artefacts/one@one.erl -module(one@one). @@ -27,7 +27,7 @@ expression: "./cases/imported_record_constructors" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta -<97 byte binary> +<109 byte binary> //// /out/lib/the_package/_gleam_artefacts/one@two.erl -module(one@two). @@ -48,7 +48,7 @@ expression: "./cases/imported_record_constructors" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<499 byte binary> +<511 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.erl -module(two). @@ -64,47 +64,47 @@ expression: "./cases/imported_record_constructors" -define(DOC(Str), -compile([])). -endif. --file("src/two.gleam", 7). +-file("src/two.gleam", 10). -spec qualified_fn_a() -> one@one:a(). qualified_fn_a() -> a. --file("src/two.gleam", 13). +-file("src/two.gleam", 16). -spec qualified_fn_b() -> one@one:b(). qualified_fn_b() -> {b, a, a}. --file("src/two.gleam", 19). +-file("src/two.gleam", 22). -spec qualified_aliased_fn_a() -> one@two:a(). qualified_aliased_fn_a() -> a. --file("src/two.gleam", 25). +-file("src/two.gleam", 28). -spec qualified_aliased_fn_b() -> one@two:b(). qualified_aliased_fn_b() -> {b, a, a}. --file("src/two.gleam", 32). +-file("src/two.gleam", 35). -spec unqualified_fn_a() -> one@one:a(). unqualified_fn_a() -> a. --file("src/two.gleam", 38). +-file("src/two.gleam", 41). -spec unqualified_fn_b() -> one@one:b(). unqualified_fn_b() -> {b, a, a}. --file("src/two.gleam", 46). +-file("src/two.gleam", 49). -spec aliased_fn_a() -> one@one:a(). aliased_fn_a() -> a. --file("src/two.gleam", 52). +-file("src/two.gleam", 55). -spec aliased_fn_b() -> one@one:b(). aliased_fn_b() -> {b, a, a}. --file("src/two.gleam", 58). +-file("src/two.gleam", 61). ?DOC( " For these statements we use the accessors for the record from the other\n" " module\n" @@ -115,48 +115,48 @@ accessors(User) -> Score = erlang:element(3, User), {Name, Score}. --file("src/two.gleam", 65). +-file("src/two.gleam", 68). ?DOC(" For these statements we use destructure the record\n"). -spec destructure_qualified(one@one:user()) -> {binary(), integer()}. destructure_qualified(User) -> {user, Name, Score} = User, {Name, Score}. --file("src/two.gleam", 70). +-file("src/two.gleam", 73). -spec destructure_qualified_aliased(one@two:user()) -> {binary(), integer()}. destructure_qualified_aliased(User) -> {user, Name, Score} = User, {Name, Score}. --file("src/two.gleam", 75). +-file("src/two.gleam", 78). -spec destructure_unqualified(one@one:user()) -> {binary(), integer()}. destructure_unqualified(User) -> {user, Name, Score} = User, {Name, Score}. --file("src/two.gleam", 80). +-file("src/two.gleam", 83). -spec destructure_aliased(one@one:user()) -> {binary(), integer()}. destructure_aliased(User) -> {user, Name, Score} = User, {Name, Score}. --file("src/two.gleam", 86). +-file("src/two.gleam", 89). ?DOC(" For these statements we use update the record\n"). -spec update_qualified(one@one:user()) -> one@one:user(). update_qualified(User) -> {user, <<"wibble"/utf8>>, erlang:element(3, User)}. --file("src/two.gleam", 90). +-file("src/two.gleam", 93). -spec update_qualified_aliased(one@two:user()) -> one@two:user(). update_qualified_aliased(User) -> {user, <<"wibble"/utf8>>, erlang:element(3, User)}. --file("src/two.gleam", 94). +-file("src/two.gleam", 97). -spec update_unqualified(one@one:user()) -> one@one:user(). update_unqualified(User) -> {user, <<"wibble"/utf8>>, erlang:element(3, User)}. --file("src/two.gleam", 98). +-file("src/two.gleam", 101). -spec update_aliased(one@one:user()) -> one@one:user(). update_aliased(User) -> {user, <<"wibble"/utf8>>, erlang:element(3, User)}. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_d_ts.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_d_ts.snap index 9a61663e4..afab0612a 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_d_ts.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_d_ts.snap @@ -6,7 +6,7 @@ expression: "./cases/javascript_d_ts" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/hello.cache_meta -<81 byte binary> +<93 byte binary> //// /out/lib/the_package/gleam.d.mts export * from "../prelude.mjs"; diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_empty.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_empty.snap index 091bf4b6e..7e3452d52 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_empty.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_empty.snap @@ -6,7 +6,7 @@ expression: "./cases/javascript_empty" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/empty.cache_meta -<57 byte binary> +<69 byte binary> //// /out/lib/the_package/empty.mjs export {} diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_import.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_import.snap index 632730900..da2212c9f 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_import.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_import.snap @@ -6,13 +6,13 @@ expression: "./cases/javascript_import" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/one@two.cache_meta -<65 byte binary> +<77 byte binary> //// /out/lib/the_package/_gleam_artefacts/two.cache <.cache binary> //// /out/lib/the_package/_gleam_artefacts/two.cache_meta -<88 byte binary> +<100 byte binary> //// /out/lib/the_package/gleam.d.mts export * from "../prelude.mjs"; diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_sourcemaps.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_sourcemaps.snap index 914a3d975..6008bbf6b 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_sourcemaps.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__javascript_sourcemaps.snap @@ -6,13 +6,16 @@ expression: "./cases/javascript_sourcemaps" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/hello.cache_meta -<81 byte binary> +<93 byte binary> //// /out/lib/the_package/gleam.mjs export * from "../prelude.mjs"; //// /out/lib/the_package/hello.gleam +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub type Wibble { Woo } @@ -37,4 +40,4 @@ export function wobble() { //// /out/lib/the_package/hello.mjs.map -{"version":3,"file":"hello.mjs","sources":["hello.gleam"],"names":[],"mappings":";;;AAAA,AACE;AAAA;;AAAA,4DACD;;AAED;EACE;CACD"} +{"version":3,"file":"hello.mjs","sources":["hello.gleam"],"names":[],"mappings":";;;AAGA,AACE;AAAA;;AAAA,4DACD;;AAED;EACE;CACD"} diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__not_overwriting_erlang_module.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__not_overwriting_erlang_module.snap index e7a67b55d..bdd3bee74 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__not_overwriting_erlang_module.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__not_overwriting_erlang_module.snap @@ -6,7 +6,7 @@ expression: "./cases/not_overwriting_erlang_module" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/app@code.cache_meta -<73 byte binary> +<85 byte binary> //// /out/lib/the_package/_gleam_artefacts/app@code.erl -module(app@code). diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_accessor.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_accessor.snap index 5d7b76e42..c9879ce88 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_accessor.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_accessor.snap @@ -3,10 +3,10 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/opaque_type_accessor" --- error: Unknown record field - ┌─ src/two.gleam:7:19 - │ -7 │ let name = user.name - │ ^ This field does not exist + ┌─ src/two.gleam:10:19 + │ +10 │ let name = user.name + │ ^ This field does not exist The value being accessed has this type: @@ -15,10 +15,10 @@ The value being accessed has this type: It does not have any fields. error: Unknown record field - ┌─ src/two.gleam:8:20 - │ -8 │ let score = user.score - │ ^ This field does not exist + ┌─ src/two.gleam:11:20 + │ +11 │ let score = user.score + │ ^ This field does not exist The value being accessed has this type: diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_destructure.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_destructure.snap index 0282ce434..0b665c244 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_destructure.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__opaque_type_destructure.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/opaque_type_destructure" --- error: Unknown module value - ┌─ src/two.gleam:7:7 - │ -7 │ let one.User(name: name, score: score) = user - │ ^ + ┌─ src/two.gleam:10:7 + │ +10 │ let one.User(name: name, score: score) = user + │ ^ The module `one` does not have a `User` value. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_dev.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_dev.snap index b2ea8f0c9..789b57cc4 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_dev.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_dev.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/src_importing_dev" --- error: App importing dev module - ┌─ src/one.gleam:3:1 + ┌─ src/one.gleam:6:1 │ -3 │ import two +6 │ import two │ ^ Imported here The application module `one` is importing the development module `two`. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_test.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_test.snap index 3a305e07a..213b63907 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_test.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__src_importing_test.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/src_importing_test" --- error: App importing test module - ┌─ src/one.gleam:3:1 + ┌─ src/one.gleam:6:1 │ -3 │ import two +6 │ import two │ ^ Imported here The application module `one` is importing the test module `two`. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_constant.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_constant.snap index aa1970b3b..32b5879c6 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_constant.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_constant.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/unknown_module_field_in_constant" --- error: Unknown module value - ┌─ src/two.gleam:3:16 + ┌─ src/two.gleam:6:16 │ -3 │ pub const it = one.B +6 │ pub const it = one.B │ ^ Did you mean `A`? The module `one` does not have a `B` value. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_expression.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_expression.snap index 4cf1cc999..6ca35b718 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_expression.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_expression.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/unknown_module_field_in_expression" --- error: Unknown module value - ┌─ src/two.gleam:4:7 + ┌─ src/two.gleam:7:7 │ -4 │ one.B +7 │ one.B │ ^ Did you mean `A`? The module `one` does not have a `B` value. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_import.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_import.snap index bc5821f50..b1b8835b3 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_import.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__unknown_module_field_in_import.snap @@ -3,9 +3,9 @@ source: test-package-compiler/src/generated_tests.rs expression: "./cases/unknown_module_field_in_import" --- error: Unknown module value - ┌─ src/two.gleam:1:13 + ┌─ src/two.gleam:4:13 │ -1 │ import one.{B} +4 │ import one.{B} │ ^ Did you mean `A`? The module `one` does not have a `B` value. diff --git a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__variable_or_module.snap b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__variable_or_module.snap index e6e0031c6..181ea6568 100644 --- a/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__variable_or_module.snap +++ b/test-package-compiler/src/snapshots/test_package_compiler__generated_tests__variable_or_module.snap @@ -6,7 +6,7 @@ expression: "./cases/variable_or_module" <.cache binary> //// /out/lib/the_package/_gleam_artefacts/main.cache_meta -<126 byte binary> +<138 byte binary> //// /out/lib/the_package/_gleam_artefacts/main.erl -module(main). @@ -14,12 +14,12 @@ expression: "./cases/variable_or_module" -define(FILEPATH, "src/main.gleam"). -export([module_function/1, record_field/1]). --file("src/main.gleam", 4). +-file("src/main.gleam", 7). -spec module_function(power:power()) -> integer(). module_function(Power) -> power:to_int(Power). --file("src/main.gleam", 10). +-file("src/main.gleam", 13). -spec record_field(power:power()) -> integer(). record_field(Power) -> erlang:element(2, Power). @@ -29,7 +29,7 @@ record_field(Power) -> <.cache binary> //// /out/lib/the_package/_gleam_artefacts/power.cache_meta -<85 byte binary> +<97 byte binary> //// /out/lib/the_package/_gleam_artefacts/power.erl -module(power). @@ -40,7 +40,7 @@ record_field(Power) -> -type power() :: {power, integer()}. --file("src/power.gleam", 6). +-file("src/power.gleam", 9). -spec to_int(power()) -> integer(). to_int(P) -> erlang:element(2, P) * 9000. diff --git a/test-project-compiler/Cargo.toml b/test-project-compiler/Cargo.toml index 59bc71b97..1ecb7436f 100644 --- a/test-project-compiler/Cargo.toml +++ b/test-project-compiler/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + [package] name = "test-project-compiler" version = "1.17.0" diff --git a/test-project-compiler/build.rs b/test-project-compiler/build.rs index e94252ec3..e6339f04a 100644 --- a/test-project-compiler/build.rs +++ b/test-project-compiler/build.rs @@ -1,9 +1,15 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + use std::path::PathBuf; pub fn main() { println!("cargo:rerun-if-changed=cases"); - let mut module = "//! This file is generated by build.rs + let mut module = "// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + +//! This file is generated by build.rs //! Do not edit it directly, instead add new test cases to ./cases use gleam_core::build::Mode; diff --git a/test-project-compiler/cases/erlang_source_maps/gleam.toml b/test-project-compiler/cases/erlang_source_maps/gleam.toml index 05e2ac0a2..2b5905b80 100644 --- a/test-project-compiler/cases/erlang_source_maps/gleam.toml +++ b/test-project-compiler/cases/erlang_source_maps/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "example" version = "1.0.0" target = "erlang" diff --git a/test-project-compiler/cases/erlang_source_maps/src/example.gleam b/test-project-compiler/cases/erlang_source_maps/src/example.gleam index 274240588..3a148dc85 100644 --- a/test-project-compiler/cases/erlang_source_maps/src/example.gleam +++ b/test-project-compiler/cases/erlang_source_maps/src/example.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub fn main() { 0 } diff --git a/test-project-compiler/cases/erlang_typescript_declarations/gleam.toml b/test-project-compiler/cases/erlang_typescript_declarations/gleam.toml index 4a10947a7..3ea9edd0e 100644 --- a/test-project-compiler/cases/erlang_typescript_declarations/gleam.toml +++ b/test-project-compiler/cases/erlang_typescript_declarations/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + name = "example" version = "1.0.0" target = "erlang" diff --git a/test-project-compiler/cases/erlang_typescript_declarations/src/example.gleam b/test-project-compiler/cases/erlang_typescript_declarations/src/example.gleam index 274240588..3a148dc85 100644 --- a/test-project-compiler/cases/erlang_typescript_declarations/src/example.gleam +++ b/test-project-compiler/cases/erlang_typescript_declarations/src/example.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub fn main() { 0 } diff --git a/test-project-compiler/cases/javascript_source_maps/gleam.toml b/test-project-compiler/cases/javascript_source_maps/gleam.toml index 15b783328..1bad63fa4 100644 --- a/test-project-compiler/cases/javascript_source_maps/gleam.toml +++ b/test-project-compiler/cases/javascript_source_maps/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "example" version = "1.0.0" target = "javascript" diff --git a/test-project-compiler/cases/javascript_source_maps/src/example.gleam b/test-project-compiler/cases/javascript_source_maps/src/example.gleam index 274240588..3a148dc85 100644 --- a/test-project-compiler/cases/javascript_source_maps/src/example.gleam +++ b/test-project-compiler/cases/javascript_source_maps/src/example.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub fn main() { 0 } diff --git a/test-project-compiler/cases/javascript_typescript_declarations/gleam.toml b/test-project-compiler/cases/javascript_typescript_declarations/gleam.toml index 55770356c..6b7a4b827 100644 --- a/test-project-compiler/cases/javascript_typescript_declarations/gleam.toml +++ b/test-project-compiler/cases/javascript_typescript_declarations/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "example" version = "1.0.0" target = "javascript" diff --git a/test-project-compiler/cases/javascript_typescript_declarations/src/example.gleam b/test-project-compiler/cases/javascript_typescript_declarations/src/example.gleam index 274240588..3a148dc85 100644 --- a/test-project-compiler/cases/javascript_typescript_declarations/src/example.gleam +++ b/test-project-compiler/cases/javascript_typescript_declarations/src/example.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub fn main() { 0 } diff --git a/test-project-compiler/cases/with_dep/gleam.toml b/test-project-compiler/cases/with_dep/gleam.toml index d36c13535..bb4217e8b 100644 --- a/test-project-compiler/cases/with_dep/gleam.toml +++ b/test-project-compiler/cases/with_dep/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "example" version = "1.0.0" diff --git a/test-project-compiler/cases/with_dep/src/example.gleam b/test-project-compiler/cases/with_dep/src/example.gleam index 274240588..3a148dc85 100644 --- a/test-project-compiler/cases/with_dep/src/example.gleam +++ b/test-project-compiler/cases/with_dep/src/example.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub fn main() { 0 } diff --git a/test-project-compiler/cases/with_dev_dep/gleam.toml b/test-project-compiler/cases/with_dev_dep/gleam.toml index 0d792c172..abfd8ed43 100644 --- a/test-project-compiler/cases/with_dev_dep/gleam.toml +++ b/test-project-compiler/cases/with_dev_dep/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "example" version = "1.0.0" diff --git a/test-project-compiler/cases/with_dev_dep/src/example.gleam b/test-project-compiler/cases/with_dev_dep/src/example.gleam index 274240588..3a148dc85 100644 --- a/test-project-compiler/cases/with_dev_dep/src/example.gleam +++ b/test-project-compiler/cases/with_dev_dep/src/example.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub fn main() { 0 } diff --git a/test-project-compiler/src/generated_tests.rs b/test-project-compiler/src/generated_tests.rs index 488c9f25e..c75c51c29 100644 --- a/test-project-compiler/src/generated_tests.rs +++ b/test-project-compiler/src/generated_tests.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + //! This file is generated by build.rs //! Do not edit it directly, instead add new test cases to ./cases diff --git a/test-project-compiler/src/lib.rs b/test-project-compiler/src/lib.rs index 738401f9d..c5a92a716 100644 --- a/test-project-compiler/src/lib.rs +++ b/test-project-compiler/src/lib.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + #[cfg(test)] mod generated_tests; diff --git a/test-project-compiler/support/package_a/gleam.toml b/test-project-compiler/support/package_a/gleam.toml index f68973808..bdc54be46 100644 --- a/test-project-compiler/support/package_a/gleam.toml +++ b/test-project-compiler/support/package_a/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "package_a" version = "1.0.0" diff --git a/test-project-compiler/support/package_a/src/package_a.gleam b/test-project-compiler/support/package_a/src/package_a.gleam index a2ee567b9..9a52baa8a 100644 --- a/test-project-compiler/support/package_a/src/package_a.gleam +++ b/test-project-compiler/support/package_a/src/package_a.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + pub fn main() { "package_a" } diff --git a/test/assert/gleam.toml b/test/assert/gleam.toml index ac6389381..369c16e25 100644 --- a/test/assert/gleam.toml +++ b/test/assert/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "project" version = "1.0.0" description = "A Gleam project" diff --git a/test/assert/manifest.toml b/test/assert/manifest.toml index ccd1121bf..b180a2b20 100644 --- a/test/assert/manifest.toml +++ b/test/assert/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/assert/run_tests.sh b/test/assert/run_tests.sh index fbe5918d5..27bc675df 100755 --- a/test/assert/run_tests.sh +++ b/test/assert/run_tests.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + #/usr/bin/env sh set -eu diff --git a/test/assert/src/failing1.gleam b/test/assert/src/failing1.gleam index 802e9f087..f5dcfec27 100644 --- a/test/assert/src/failing1.gleam +++ b/test/assert/src/failing1.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn main() { let x = True assert !x diff --git a/test/assert/src/failing2.gleam b/test/assert/src/failing2.gleam index 507898269..bfe5ff563 100644 --- a/test/assert/src/failing2.gleam +++ b/test/assert/src/failing2.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/int pub fn main() { diff --git a/test/assert/src/failing3.gleam b/test/assert/src/failing3.gleam index 0faa89ab3..29665db52 100644 --- a/test/assert/src/failing3.gleam +++ b/test/assert/src/failing3.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/bool import gleam/result diff --git a/test/assert/src/failing4.gleam b/test/assert/src/failing4.gleam index 833f40c36..a2c121f84 100644 --- a/test/assert/src/failing4.gleam +++ b/test/assert/src/failing4.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/int pub fn main() { diff --git a/test/assert/src/passing.gleam b/test/assert/src/passing.gleam index 9cd06eb0d..be7499d43 100644 --- a/test/assert/src/passing.gleam +++ b/test/assert/src/passing.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/bool import gleam/int import gleam/result diff --git a/test/compile_package0/gleam.toml b/test/compile_package0/gleam.toml index cb2009d90..9c913178b 100644 --- a/test/compile_package0/gleam.toml +++ b/test/compile_package0/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "package" version = "1.0.0" diff --git a/test/compile_package0/manifest.toml b/test/compile_package0/manifest.toml index c5d779a3f..b6d79320e 100644 --- a/test/compile_package0/manifest.toml +++ b/test/compile_package0/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/compile_package0/src/one.gleam b/test/compile_package0/src/one.gleam index 223b31fff..6e06f1cab 100644 --- a/test/compile_package0/src/one.gleam +++ b/test/compile_package0/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub fn hello() -> String { "Hello" } diff --git a/test/compile_package0/src/two.gleam b/test/compile_package0/src/two.gleam index ee5372966..0bba81412 100644 --- a/test/compile_package0/src/two.gleam +++ b/test/compile_package0/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import one pub fn main() -> String { diff --git a/test/compile_package0/test/three.gleam b/test/compile_package0/test/three.gleam index e2e41244d..d874db9aa 100644 --- a/test/compile_package0/test/three.gleam +++ b/test/compile_package0/test/three.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import one import two diff --git a/test/compile_package1/app1/gleam.toml b/test/compile_package1/app1/gleam.toml index 8b9ed78fc..268a06a32 100644 --- a/test/compile_package1/app1/gleam.toml +++ b/test/compile_package1/app1/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "app1" version = "1.0.0" diff --git a/test/compile_package1/app1/src/one.gleam b/test/compile_package1/app1/src/one.gleam index 223b31fff..6e06f1cab 100644 --- a/test/compile_package1/app1/src/one.gleam +++ b/test/compile_package1/app1/src/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub fn hello() -> String { "Hello" } diff --git a/test/compile_package1/app1/src/one/nested.gleam b/test/compile_package1/app1/src/one/nested.gleam index d46749848..4bce0f31c 100644 --- a/test/compile_package1/app1/src/one/nested.gleam +++ b/test/compile_package1/app1/src/one/nested.gleam @@ -1,5 +1,8 @@ //// This module is used to test resolution of nested modules +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub fn id(a) { a } diff --git a/test/compile_package1/app2/gleam.toml b/test/compile_package1/app2/gleam.toml index bc8f31985..053d532de 100644 --- a/test/compile_package1/app2/gleam.toml +++ b/test/compile_package1/app2/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "app2" version = "1.0.0" diff --git a/test/compile_package1/app2/src/two.gleam b/test/compile_package1/app2/src/two.gleam index 2420584e1..3e6e2118e 100644 --- a/test/compile_package1/app2/src/two.gleam +++ b/test/compile_package1/app2/src/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import one import one/nested diff --git a/test/erlang_shipment_no_dev_deps/gleam.toml b/test/erlang_shipment_no_dev_deps/gleam.toml index c289e552f..53645471b 100644 --- a/test/erlang_shipment_no_dev_deps/gleam.toml +++ b/test/erlang_shipment_no_dev_deps/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + name = "shipment_test" version = "0.1.0" diff --git a/test/erlang_shipment_no_dev_deps/manifest.toml b/test/erlang_shipment_no_dev_deps/manifest.toml index 86fa12939..6d6c584c6 100644 --- a/test/erlang_shipment_no_dev_deps/manifest.toml +++ b/test/erlang_shipment_no_dev_deps/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/erlang_shipment_no_dev_deps/src/shipment_test.gleam b/test/erlang_shipment_no_dev_deps/src/shipment_test.gleam index 1fb170537..c311923ad 100644 --- a/test/erlang_shipment_no_dev_deps/src/shipment_test.gleam +++ b/test/erlang_shipment_no_dev_deps/src/shipment_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/erlang_shipment_no_dev_deps/test.sh b/test/erlang_shipment_no_dev_deps/test.sh index cc7852d91..de7525447 100755 --- a/test/erlang_shipment_no_dev_deps/test.sh +++ b/test/erlang_shipment_no_dev_deps/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/errors/type_unify_int_string/gleam.toml b/test/errors/type_unify_int_string/gleam.toml index 8b94d04e0..894a666e3 100644 --- a/test/errors/type_unify_int_string/gleam.toml +++ b/test/errors/type_unify_int_string/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "type_unify_int_string" # [docs] diff --git a/test/errors/type_unify_int_string/src/type_unify_int_string.gleam b/test/errors/type_unify_int_string/src/type_unify_int_string.gleam index d9032b2cb..8ad92a357 100644 --- a/test/errors/type_unify_int_string/src/type_unify_int_string.gleam +++ b/test/errors/type_unify_int_string/src/type_unify_int_string.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub fn hello_world() { let x: Int = "Eh?" x diff --git a/test/external_only_erlang/README.md b/test/external_only_erlang/README.md index c959d07c0..71246f374 100644 --- a/test/external_only_erlang/README.md +++ b/test/external_only_erlang/README.md @@ -1,3 +1,8 @@ + + # external_only_erlang A project that can only be run on Erlang due to an external function. diff --git a/test/external_only_erlang/gleam.toml b/test/external_only_erlang/gleam.toml index 768b6932b..93d85b794 100644 --- a/test/external_only_erlang/gleam.toml +++ b/test/external_only_erlang/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "external_only_erlang" version = "1.0.0" target = "erlang" diff --git a/test/external_only_erlang/manifest.toml b/test/external_only_erlang/manifest.toml index d0849e8b0..3bd9b9a6b 100644 --- a/test/external_only_erlang/manifest.toml +++ b/test/external_only_erlang/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/external_only_erlang/src/external_only_erlang.gleam b/test/external_only_erlang/src/external_only_erlang.gleam index b21f69916..064e805b7 100644 --- a/test/external_only_erlang/src/external_only_erlang.gleam +++ b/test/external_only_erlang/src/external_only_erlang.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + // This function is only implemented for Erlang, so if we try and call it from // JavaScript, or build this package for JavaScript, then the compiler will // (should) emit an error. diff --git a/test/external_only_erlang/src/external_only_erlang_ffi.erl b/test/external_only_erlang/src/external_only_erlang_ffi.erl index ec95eba7e..a95ca6f0b 100644 --- a/test/external_only_erlang/src/external_only_erlang_ffi.erl +++ b/test/external_only_erlang/src/external_only_erlang_ffi.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2024 The Gleam contributors + -module(external_only_erlang_ffi). -export([main/0]). diff --git a/test/external_only_erlang/test.sh b/test/external_only_erlang/test.sh index ce3147ea0..10d95ea54 100755 --- a/test/external_only_erlang/test.sh +++ b/test/external_only_erlang/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/external_only_javascript/README.md b/test/external_only_javascript/README.md index 3780fdfd9..951532761 100644 --- a/test/external_only_javascript/README.md +++ b/test/external_only_javascript/README.md @@ -1,3 +1,8 @@ + + # external_only_javascript A project that can only be run on JavaScript due to an external function. diff --git a/test/external_only_javascript/gleam.toml b/test/external_only_javascript/gleam.toml index cf84c145f..cad592579 100644 --- a/test/external_only_javascript/gleam.toml +++ b/test/external_only_javascript/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "external_only_javascript" version = "1.0.0" target = "javascript" diff --git a/test/external_only_javascript/manifest.toml b/test/external_only_javascript/manifest.toml index d0849e8b0..3bd9b9a6b 100644 --- a/test/external_only_javascript/manifest.toml +++ b/test/external_only_javascript/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/external_only_javascript/src/external_only_javascript.gleam b/test/external_only_javascript/src/external_only_javascript.gleam index d7c42c9f1..776d45d0e 100644 --- a/test/external_only_javascript/src/external_only_javascript.gleam +++ b/test/external_only_javascript/src/external_only_javascript.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + // This function is only implemented for JavaScript, so if we try and call it // from Erlang, or build this package for Erlang, then the compiler will // (should) emit an error. diff --git a/test/external_only_javascript/src/external_only_javascript_ffi.mjs b/test/external_only_javascript/src/external_only_javascript_ffi.mjs index 5cef0c6cf..5305238b4 100644 --- a/test/external_only_javascript/src/external_only_javascript_ffi.mjs +++ b/test/external_only_javascript/src/external_only_javascript_ffi.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + export function main() { console.log("Hello"); } diff --git a/test/external_only_javascript/test.sh b/test/external_only_javascript/test.sh index be9e472b4..e744adaa4 100755 --- a/test/external_only_javascript/test.sh +++ b/test/external_only_javascript/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/hello_world/LICENSE b/test/hello_world/LICENSE deleted file mode 100644 index c1dabd08e..000000000 --- a/test/hello_world/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2018, Louis Pilfold . - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/test/hello_world/README.md b/test/hello_world/README.md index 303f3c7eb..289e81242 100644 --- a/test/hello_world/README.md +++ b/test/hello_world/README.md @@ -1,3 +1,8 @@ + + hello_world ===== diff --git a/test/hello_world/gleam.toml b/test/hello_world/gleam.toml index c742d2470..a8e52059d 100644 --- a/test/hello_world/gleam.toml +++ b/test/hello_world/gleam.toml @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2019 The Gleam contributors + name = "hello_world" tool = "other" diff --git a/test/hello_world/manifest.toml b/test/hello_world/manifest.toml index c5d779a3f..b6d79320e 100644 --- a/test/hello_world/manifest.toml +++ b/test/hello_world/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/hello_world/rebar.config b/test/hello_world/rebar.config deleted file mode 100644 index dfa71219d..000000000 --- a/test/hello_world/rebar.config +++ /dev/null @@ -1,11 +0,0 @@ -{erl_opts, [debug_info]}. -{src_dirs, ["src", "gen/src"]}. - -{profiles, [ - {test, [ - {src_dirs, ["src", "test", "gen/src", "gen/test"]} - ]} -]}. - -{deps, [ -]}. diff --git a/test/hello_world/rebar.lock b/test/hello_world/rebar.lock deleted file mode 100644 index 57afcca04..000000000 --- a/test/hello_world/rebar.lock +++ /dev/null @@ -1 +0,0 @@ -[]. diff --git a/test/hello_world/src/hello_world.app.src b/test/hello_world/src/hello_world.app.src deleted file mode 100644 index 8ba80713e..000000000 --- a/test/hello_world/src/hello_world.app.src +++ /dev/null @@ -1,15 +0,0 @@ -{application, hello_world, - [{description, "An OTP library"}, - {vsn, "0.1.0"}, - {registered, []}, - {applications, - [kernel, - stdlib - ]}, - {env,[]}, - {modules, []}, - - {maintainers, []}, - {licenses, ["Apache 2.0"]}, - {links, []} - ]}. diff --git a/test/hello_world/src/hello_world.gleam b/test/hello_world/src/hello_world.gleam index 8b1378917..34fbb2f62 100644 --- a/test/hello_world/src/hello_world.gleam +++ b/test/hello_world/src/hello_world.gleam @@ -1 +1,2 @@ - +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors diff --git a/test/hello_world/src/nest/bird!.gleam b/test/hello_world/src/nest/bird!.gleam index 8b1378917..9bed2f9dd 100644 --- a/test/hello_world/src/nest/bird!.gleam +++ b/test/hello_world/src/nest/bird!.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2019 The Gleam contributors + diff --git a/test/hello_world/src/nest/bird.gleam b/test/hello_world/src/nest/bird.gleam index 8b1378917..5ed9dc636 100644 --- a/test/hello_world/src/nest/bird.gleam +++ b/test/hello_world/src/nest/bird.gleam @@ -1 +1,2 @@ - +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2019 The Gleam contributors diff --git a/test/hello_world/src/nest/bird.js b/test/hello_world/src/nest/bird.js index e69de29bb..92f0313a2 100644 --- a/test/hello_world/src/nest/bird.js +++ b/test/hello_world/src/nest/bird.js @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2019 The Gleam contributors + diff --git a/test/hello_world/src/other.gleam b/test/hello_world/src/other.gleam index 3ff230200..f3c3ebf3b 100644 --- a/test/hello_world/src/other.gleam +++ b/test/hello_world/src/other.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2019 The Gleam contributors + pub fn add(a, b) { a + b } diff --git a/test/hello_world/test/hello_test.gleam b/test/hello_world/test/hello_test.gleam index 274c595b9..43d0f4469 100644 --- a/test/hello_world/test/hello_test.gleam +++ b/test/hello_world/test/hello_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2019 The Gleam contributors + import hello_world fn run(x, y) { diff --git a/test/hextarball/gleam.toml b/test/hextarball/gleam.toml index 88aee109b..229f6f7f8 100644 --- a/test/hextarball/gleam.toml +++ b/test/hextarball/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + name = "hextarball" version = "0.1.0" description = "Test project to construct a hex tarball" diff --git a/test/hextarball/manifest.toml b/test/hextarball/manifest.toml index c5d779a3f..b6d79320e 100644 --- a/test/hextarball/manifest.toml +++ b/test/hextarball/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/hextarball/src/external_module.erl b/test/hextarball/src/external_module.erl index c28d1c353..e7daf413c 100644 --- a/test/hextarball/src/external_module.erl +++ b/test/hextarball/src/external_module.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2026 The Gleam contributors + -module(external_module). -export([hello/0]). diff --git a/test/hextarball/src/hextarball.gleam b/test/hextarball/src/hextarball.gleam index 86ee73c17..ff5aa5f40 100644 --- a/test/hextarball/src/hextarball.gleam +++ b/test/hextarball/src/hextarball.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + pub fn something() { "Just a thing to export" } diff --git a/test/javascript_prelude/main.mjs b/test/javascript_prelude/main.mjs index 4f8bd6d2f..5b6c85a6c 100755 --- a/test/javascript_prelude/main.mjs +++ b/test/javascript_prelude/main.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import { BitArray, BitArray$BitArray, diff --git a/test/language/gleam.toml b/test/language/gleam.toml index 404c4fcf8..3ffd0b1b1 100644 --- a/test/language/gleam.toml +++ b/test/language/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "language" version = "1.0.0" diff --git a/test/language/manifest.toml b/test/language/manifest.toml index bcbc16fe7..d23088378 100644 --- a/test/language/manifest.toml +++ b/test/language/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/language/src/language.gleam b/test/language/src/language.gleam index 4ead3b10c..056a95137 100644 --- a/test/language/src/language.gleam +++ b/test/language/src/language.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors + pub fn main() { Nil } diff --git a/test/language/test/ffi.gleam b/test/language/test/ffi.gleam index 77499d3f6..f8089abac 100644 --- a/test/language/test/ffi.gleam +++ b/test/language/test/ffi.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub type Dynamic @external(erlang, "ffi_erlang", "print") diff --git a/test/language/test/ffi_erlang.erl b/test/language/test/ffi_erlang.erl index c9edb0d27..fd4868d45 100644 --- a/test/language/test/ffi_erlang.erl +++ b/test/language/test/ffi_erlang.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2021 The Gleam contributors + -module(ffi_erlang). -export([ diff --git a/test/language/test/ffi_javascript.mjs b/test/language/test/ffi_javascript.mjs index 4496cf52f..bb642607a 100644 --- a/test/language/test/ffi_javascript.mjs +++ b/test/language/test/ffi_javascript.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import { UtfCodepoint, BitArray$BitArray$data } from "./gleam.mjs"; let fs; diff --git a/test/language/test/ffi_typescript.ts b/test/language/test/ffi_typescript.ts index d85cca134..7977594cc 100644 --- a/test/language/test/ffi_typescript.ts +++ b/test/language/test/ffi_typescript.ts @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2022 The Gleam contributors + export function append(a: string, b: string) { return a + b; } diff --git a/test/language/test/importable.gleam b/test/language/test/importable.gleam index f6ca012fa..2fd16170c 100644 --- a/test/language/test/importable.gleam +++ b/test/language/test/importable.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub type NoFields { NoFields } diff --git a/test/language/test/language/alternative_pattern.gleam b/test/language/test/language/alternative_pattern.gleam index a028ccf73..f16ff1120 100644 --- a/test/language/test/language/alternative_pattern.gleam +++ b/test/language/test/language/alternative_pattern.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + fn make_int_zero() { 0 } diff --git a/test/language/test/language/anonymous_function_test.gleam b/test/language/test/language/anonymous_function_test.gleam index 554f4f35e..d798aa1b1 100644 --- a/test/language/test/language/anonymous_function_test.gleam +++ b/test/language/test/language/anonymous_function_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + // https://github.com/gleam-lang/gleam/issues/1637 pub fn anonymous_function_test() { let f = fn(x) { diff --git a/test/language/test/language/assertion_test.gleam b/test/language/test/language/assertion_test.gleam index 4490bbff5..d14c8fd76 100644 --- a/test/language/test/language/assertion_test.gleam +++ b/test/language/test/language/assertion_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn let_assert_ok_discard_test() { let result = { let x = ok_one() diff --git a/test/language/test/language/bit_array_dynamic_size_test.gleam b/test/language/test/language/bit_array_dynamic_size_test.gleam index 9049050d4..2a1ca380b 100644 --- a/test/language/test/language/bit_array_dynamic_size_test.gleam +++ b/test/language/test/language/bit_array_dynamic_size_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn dynamic_size_1_test() { let size = 8 let assert <> = <<42>> diff --git a/test/language/test/language/bit_array_match_test.gleam b/test/language/test/language/bit_array_match_test.gleam index 278896547..00e33b12f 100644 --- a/test/language/test/language/bit_array_match_test.gleam +++ b/test/language/test/language/bit_array_match_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import importable pub fn match_1_test() { diff --git a/test/language/test/language/bit_array_test.gleam b/test/language/test/language/bit_array_test.gleam index 54ba3ba67..05ac697e8 100644 --- a/test/language/test/language/bit_array_test.gleam +++ b/test/language/test/language/bit_array_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import ffi import gleam/bit_array diff --git a/test/language/test/language/block_test.gleam b/test/language/test/language/block_test.gleam index ca3b3a39c..5c4e9d7a6 100644 --- a/test/language/test/language/block_test.gleam +++ b/test/language/test/language/block_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + // https://github.com/gleam-lang/gleam/issues/1991 pub fn block_scoping_test() { let x = 1 diff --git a/test/language/test/language/bool_negation_test.gleam b/test/language/test/language/bool_negation_test.gleam index 32abd026a..58b43f661 100644 --- a/test/language/test/language/bool_negation_test.gleam +++ b/test/language/test/language/bool_negation_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn negation_true_test() { assert !True == False } diff --git a/test/language/test/language/build_files_test.gleam b/test/language/test/language/build_files_test.gleam index ab974a3d6..c42cd8229 100644 --- a/test/language/test/language/build_files_test.gleam +++ b/test/language/test/language/build_files_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import ffi @target(javascript) diff --git a/test/language/test/language/clause_guard_test.gleam b/test/language/test/language/clause_guard_test.gleam index 6931a3bdc..face28b78 100644 --- a/test/language/test/language/clause_guard_test.gleam +++ b/test/language/test/language/clause_guard_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import importable // Constructor functions are used rather than literals to stop the Erlang diff --git a/test/language/test/language/constant_test.gleam b/test/language/test/language/constant_test.gleam index 167fe4637..c28519cee 100644 --- a/test/language/test/language/constant_test.gleam +++ b/test/language/test/language/constant_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + const const_int = 5 const const_float = 1.0 diff --git a/test/language/test/language/directly_matching_case_subject_test.gleam b/test/language/test/language/directly_matching_case_subject_test.gleam index ebb3019ed..1f5514b4f 100644 --- a/test/language/test/language/directly_matching_case_subject_test.gleam +++ b/test/language/test/language/directly_matching_case_subject_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + fn identity(x: a) -> a { x } diff --git a/test/language/test/language/equality_test.gleam b/test/language/test/language/equality_test.gleam index a0683b2e6..0159c69cb 100644 --- a/test/language/test/language/equality_test.gleam +++ b/test/language/test/language/equality_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn list_eq_1_test() { let left = [] let right = [] diff --git a/test/language/test/language/float_test.gleam b/test/language/test/language/float_test.gleam index 48a37a651..d4952ff38 100644 --- a/test/language/test/language/float_test.gleam +++ b/test/language/test/language/float_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn addition_1_test() { assert 0.0 +. 0.0 == 0.0 } diff --git a/test/language/test/language/imported_custom_type_test.gleam b/test/language/test/language/imported_custom_type_test.gleam index 27fd253ac..2cefc2bea 100644 --- a/test/language/test/language/imported_custom_type_test.gleam +++ b/test/language/test/language/imported_custom_type_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import importable.{NoFields} pub fn no_fields_qualified_and_unqualified_test() { diff --git a/test/language/test/language/importing_test.gleam b/test/language/test/language/importing_test.gleam index 11ab7c585..42374c39f 100644 --- a/test/language/test/language/importing_test.gleam +++ b/test/language/test/language/importing_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import mod_with_numbers_0123456789 import shadowed_module.{ShadowPerson} diff --git a/test/language/test/language/int_negation_test.gleam b/test/language/test/language/int_negation_test.gleam index 6c660069e..d2dc81180 100644 --- a/test/language/test/language/int_negation_test.gleam +++ b/test/language/test/language/int_negation_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn negation_1_test() { let a = 3 let b = -a diff --git a/test/language/test/language/int_test.gleam b/test/language/test/language/int_test.gleam index 28716868e..fdbe18990 100644 --- a/test/language/test/language/int_test.gleam +++ b/test/language/test/language/int_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn addition_1_test() { assert 0 + 0 == 0 } diff --git a/test/language/test/language/list_prepend_test.gleam b/test/language/test/language/list_prepend_test.gleam index 53a529f37..dc3c9362a 100644 --- a/test/language/test/language/list_prepend_test.gleam +++ b/test/language/test/language/list_prepend_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn prepend_1_test() { let left = [1, ..[]] let right = [1] diff --git a/test/language/test/language/mixed_arg_match_test.gleam b/test/language/test/language/mixed_arg_match_test.gleam index c2368ed42..40c3968e4 100644 --- a/test/language/test/language/mixed_arg_match_test.gleam +++ b/test/language/test/language/mixed_arg_match_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + type Cat { Cat(String, cuteness: Int) } diff --git a/test/language/test/language/multiple_case_subject_test.gleam b/test/language/test/language/multiple_case_subject_test.gleam index 8d8283a33..1aea8a99d 100644 --- a/test/language/test/language/multiple_case_subject_test.gleam +++ b/test/language/test/language/multiple_case_subject_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn wildcard_test() { let x = true() let y = false() diff --git a/test/language/test/language/non_utf8_string_bit_array_test.gleam b/test/language/test/language/non_utf8_string_bit_array_test.gleam index d85e9993f..0312fce11 100644 --- a/test/language/test/language/non_utf8_string_bit_array_test.gleam +++ b/test/language/test/language/non_utf8_string_bit_array_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import ffi pub fn utf16_pattern_match_test() { diff --git a/test/language/test/language/pipe_test.gleam b/test/language/test/language/pipe_test.gleam index 39db63a8b..ead82dda4 100644 --- a/test/language/test/language/pipe_test.gleam +++ b/test/language/test/language/pipe_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + fn identity(x: a) -> a { x } diff --git a/test/language/test/language/precedence_test.gleam b/test/language/test/language/precedence_test.gleam index bd3bf2aea..52255e7ca 100644 --- a/test/language/test/language/precedence_test.gleam +++ b/test/language/test/language/precedence_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn precedence_1_test() { assert 7 == 1 + 2 * 3 } diff --git a/test/language/test/language/prelude_test.gleam b/test/language/test/language/prelude_test.gleam index 196859ee6..4df75d93a 100644 --- a/test/language/test/language/prelude_test.gleam +++ b/test/language/test/language/prelude_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import gleam pub fn gleam_ok_test() { diff --git a/test/language/test/language/record_access_test.gleam b/test/language/test/language/record_access_test.gleam index 6e7bb344d..ed4d9455e 100644 --- a/test/language/test/language/record_access_test.gleam +++ b/test/language/test/language/record_access_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + type Person { Person(name: String, age: Int, country: String) } diff --git a/test/language/test/language/record_update_test.gleam b/test/language/test/language/record_update_test.gleam index 3d995f085..87c29eaa6 100644 --- a/test/language/test/language/record_update_test.gleam +++ b/test/language/test/language/record_update_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import record_update type Person { diff --git a/test/language/test/language/record_with_field_named_constructor.gleam b/test/language/test/language/record_with_field_named_constructor.gleam index 2d7b9b699..abe7b6aed 100644 --- a/test/language/test/language/record_with_field_named_constructor.gleam +++ b/test/language/test/language/record_with_field_named_constructor.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub type Box { Box(constructor: Int) } diff --git a/test/language/test/language/remainder_test.gleam b/test/language/test/language/remainder_test.gleam index 89898edf4..f82260ecc 100644 --- a/test/language/test/language/remainder_test.gleam +++ b/test/language/test/language/remainder_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn remainder_1_test() { assert 1 % 1 == 0 } diff --git a/test/language/test/language/sized_bit_array_test.gleam b/test/language/test/language/sized_bit_array_test.gleam index 3f7d2f7f7..b49565aa9 100644 --- a/test/language/test/language/sized_bit_array_test.gleam +++ b/test/language/test/language/sized_bit_array_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn size_8_literal_test() { let left = <<257:size(8)>> let right = <<1>> diff --git a/test/language/test/language/string_pattern_matching_test.gleam b/test/language/test/language/string_pattern_matching_test.gleam index 17c1cb8a8..ad6e450c4 100644 --- a/test/language/test/language/string_pattern_matching_test.gleam +++ b/test/language/test/language/string_pattern_matching_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn case_string_prefix_match_test() { let string = "12345" let string_2 = case string { diff --git a/test/language/test/language/string_test.gleam b/test/language/test/language/string_test.gleam index e498dbb8a..25a3d9ce6 100644 --- a/test/language/test/language/string_test.gleam +++ b/test/language/test/language/string_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn empty_strings_equal_test() { assert "" == "" } diff --git a/test/language/test/language/tail_call_test.gleam b/test/language/test/language/tail_call_test.gleam index 173b87f6c..b295f65e0 100644 --- a/test/language/test/language/tail_call_test.gleam +++ b/test/language/test/language/tail_call_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + fn count_down(from i) { case i { 0 -> Nil diff --git a/test/language/test/language/tuple_access_test.gleam b/test/language/test/language/tuple_access_test.gleam index 480bd17ae..485ddff21 100644 --- a/test/language/test/language/tuple_access_test.gleam +++ b/test/language/test/language/tuple_access_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + type ContainsTuple { ContainsTuple(data: #(Int, #(Int, Person))) } diff --git a/test/language/test/language/unaligned_bit_array_expression_test.gleam b/test/language/test/language/unaligned_bit_array_expression_test.gleam index affea177f..518758e96 100644 --- a/test/language/test/language/unaligned_bit_array_expression_test.gleam +++ b/test/language/test/language/unaligned_bit_array_expression_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn unaligned_1_test() { let left = <<0xFF:6, 0:2>> let right = <<0xFC>> diff --git a/test/language/test/language/unaligned_bit_array_pattern_test.gleam b/test/language/test/language/unaligned_bit_array_pattern_test.gleam index 65586e0e5..05b326628 100644 --- a/test/language/test/language/unaligned_bit_array_pattern_test.gleam +++ b/test/language/test/language/unaligned_bit_array_pattern_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn unaligned_1_test() { let assert <> = <<0xAB, 0b11010101>> assert #(a, b, c, d, e) == #(0xA, 0xB, 0b110, 0b1010, 0b1) diff --git a/test/language/test/language/utf_bit_array_string_segment_test.gleam b/test/language/test/language/utf_bit_array_string_segment_test.gleam index 5f80b089d..b963f45b7 100644 --- a/test/language/test/language/utf_bit_array_string_segment_test.gleam +++ b/test/language/test/language/utf_bit_array_string_segment_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + pub fn literal_utf8_string_segment_test() { let bit_array = <<"abc":utf8>> assert bit_array == <<97, 98, 99>> diff --git a/test/language/test/language_test.gleam b/test/language/test/language_test.gleam index ecd12adf5..01bb1bc60 100644 --- a/test/language/test/language_test.gleam +++ b/test/language/test/language_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import gleeunit pub fn main() { diff --git a/test/language/test/mod_with_numbers_0123456789.gleam b/test/language/test/mod_with_numbers_0123456789.gleam index 4703bfbaa..7e98f075d 100644 --- a/test/language/test/mod_with_numbers_0123456789.gleam +++ b/test/language/test/mod_with_numbers_0123456789.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + pub fn hello() { "world" } diff --git a/test/language/test/port.gleam b/test/language/test/port.gleam index e44c7c631..0a2e21414 100644 --- a/test/language/test/port.gleam +++ b/test/language/test/port.gleam @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub type Port diff --git a/test/language/test/record_update.gleam b/test/language/test/record_update.gleam index 17cbc3918..6fdeb271f 100644 --- a/test/language/test/record_update.gleam +++ b/test/language/test/record_update.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2020 The Gleam contributors + pub type Box(a) { Box(tag: String, value: a) } diff --git a/test/language/test/shadowed_module.gleam b/test/language/test/shadowed_module.gleam index ec7f389b0..6328a4bfe 100644 --- a/test/language/test/shadowed_module.gleam +++ b/test/language/test/shadowed_module.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub type ShadowPerson { ShadowPerson(age: Int) } diff --git a/test/multi_namespace/README.md b/test/multi_namespace/README.md index 622f79bfc..391459d54 100644 --- a/test/multi_namespace/README.md +++ b/test/multi_namespace/README.md @@ -1,3 +1,8 @@ + + # Multi namespace project should not be published! diff --git a/test/multi_namespace/gleam.toml b/test/multi_namespace/gleam.toml index 7e87bd8ce..e37ff47e2 100644 --- a/test/multi_namespace/gleam.toml +++ b/test/multi_namespace/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "multi_namespace" version = "1.0.0" description = "Test project for multi namespace" diff --git a/test/multi_namespace/manifest.toml b/test/multi_namespace/manifest.toml index c5d779a3f..b6d79320e 100644 --- a/test/multi_namespace/manifest.toml +++ b/test/multi_namespace/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/multi_namespace/src/multi_namespace.gleam b/test/multi_namespace/src/multi_namespace.gleam index e68bfe186..954c84546 100644 --- a/test/multi_namespace/src/multi_namespace.gleam +++ b/test/multi_namespace/src/multi_namespace.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { "Hello from multi_namespace!" } diff --git a/test/multi_namespace/src/second.gleam b/test/multi_namespace/src/second.gleam index d0737279e..e79cd3b3b 100644 --- a/test/multi_namespace/src/second.gleam +++ b/test/multi_namespace/src/second.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { "Hello from second!" } diff --git a/test/multi_namespace/test.sh b/test/multi_namespace/test.sh index 91560f63c..e163d0bbe 100755 --- a/test/multi_namespace/test.sh +++ b/test/multi_namespace/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/multi_namespace_not_top_level/README.md b/test/multi_namespace_not_top_level/README.md index 622f79bfc..391459d54 100644 --- a/test/multi_namespace_not_top_level/README.md +++ b/test/multi_namespace_not_top_level/README.md @@ -1,3 +1,8 @@ + + # Multi namespace project should not be published! diff --git a/test/multi_namespace_not_top_level/gleam.toml b/test/multi_namespace_not_top_level/gleam.toml index 7e87bd8ce..e37ff47e2 100644 --- a/test/multi_namespace_not_top_level/gleam.toml +++ b/test/multi_namespace_not_top_level/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "multi_namespace" version = "1.0.0" description = "Test project for multi namespace" diff --git a/test/multi_namespace_not_top_level/src/module1/sub.gleam b/test/multi_namespace_not_top_level/src/module1/sub.gleam index e68bfe186..954c84546 100644 --- a/test/multi_namespace_not_top_level/src/module1/sub.gleam +++ b/test/multi_namespace_not_top_level/src/module1/sub.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { "Hello from multi_namespace!" } diff --git a/test/multi_namespace_not_top_level/src/module2/sub.gleam b/test/multi_namespace_not_top_level/src/module2/sub.gleam index d0737279e..e79cd3b3b 100644 --- a/test/multi_namespace_not_top_level/src/module2/sub.gleam +++ b/test/multi_namespace_not_top_level/src/module2/sub.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { "Hello from second!" } diff --git a/test/multi_namespace_not_top_level/test.sh b/test/multi_namespace_not_top_level/test.sh index 945222ff2..0364a87c3 100755 --- a/test/multi_namespace_not_top_level/test.sh +++ b/test/multi_namespace_not_top_level/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + #!/bin/sh # https://github.com/gleam-lang/gleam/pull/4445 diff --git a/test/package.jsonc b/test/package.jsonc deleted file mode 100644 index c1efa70cd..000000000 --- a/test/package.jsonc +++ /dev/null @@ -1,152 +0,0 @@ -// An idea for how generated docs could contain information on modules within -// the package in a machine readable format. -{ - "publishing-gleam-version": "0.20.0", - "name": "my_package", - "modules": { - "my_module": { - "documentation": "...", - "types": { - // pub type MyType1 { One Two(String) } - "MyType1": { - "documentation": "...", - "parameters": 0, - "constructors": ["One", "Two"] - }, - // pub type MyType2 - "MyType2": { - "documentation": "...", - "parameters": 0, - "constructors": [] - }, - // pub type MyType3(a) { One(a, Int) } - "MyType3": { - "documentation": "...", - "parameters": 1, - "constructors": ["One"] - }, - // pub type MyType4(a, b) - "MyType4": { - "documentation": "...", - "parameters": 2, - "constructors": [] - }, - // pub opaque type MyType5(a, b) { One Two } - "MyType5": { - "documentation": "...", - "parameters": 2, - "constructors": [] - } - }, - "values": { - // pub const nil_constant = Nil - "nil_constant": { - "documentation": "...", - "type": { "kind": "Nil" } - }, - // pub const tuple_constant = #(1, "2", 3.0) - "tuple_constant": { - "documentation": "...", - "type": { - "kind": "Tuple", - "elements": [ - { "kind": "Int" }, - { "kind": "String" }, - { "kind": "Float" } - ] - } - }, - // pub const ok_constant = Ok(1) - "ok_constant": { - "documentation": "...", - "type": { - "kind": "Result", - "ok": { "kind": "Int" }, - "error": { "kind": "Variable", "id": 0 } - } - }, - // pub const error_constant = Error(Nil) - "error_constant": { - "documentation": "...", - "type": { - "kind": "Result", - "ok": { "kind": "Nil" }, - "error": { "kind": "Variable", "id": 0 } - } - }, - // pub const empty_list_constant = [] - "empty_list_constant": { - "documentation": "...", - "type": { - "kind": "List", - "elements": { "kind": "Variable", "id": 0 } - } - }, - // pub const int_list_constant = [1, 2, 3] - "int_list_constant": { - "documentation": "...", - "type": { - "kind": "List", - "elements": { "kind": "Int" } - } - }, - // pub type Wibble { Wobble(String) } - // pub const custom_type_constant1 = Wobble("Hi") - "custom_type_constant1": { - "documentation": "...", - "type": { - "kind": "Named", - "package": "my_package", - "module": "my_module", - "parameters": [] - } - }, - // pub type Blip(a) { Blap(a) } - // pub const custom_type_constant2 = Blap(1) - "custom_type_constant2": { - "documentation": "...", - "type": { - "kind": "Named", - "package": "my_package", - "module": "my_module", - "parameters": [ - { "kind": "Int" } - ] - } - }, - // import some/module - // pub const imported_custom_type: module.Something = module.SomethingConstructor - "imported_custom_type": { - "documentation": "...", - "type": { - "kind": "Named", - "package": "other_package", - "module": "some/module", - "parameters": [] - } - }, - // pub fn main() -> Nil { ... } - "main": { - "documentation": "...", - "type": { - "kind": "Fn", - "parameters": [], - "return": { "kind": "Nil" } - } - }, - // pub fn multiply(x: Int, x: Int) -> Int { ... } - "multiply": { - "documentation": "...", - "type": { - "kind": "Fn", - "parameters": [ - { "kind": "Int" }, - { "kind": "Int" } - ], - "return": { "kind": "Int" } - } - } - } - } - } -} diff --git a/test/project_deno/README.md b/test/project_deno/README.md index 5954dd269..eb64a9fcf 100644 --- a/test/project_deno/README.md +++ b/test/project_deno/README.md @@ -1,3 +1,8 @@ + + # Project A test Gleam project using the Deno runtime. diff --git a/test/project_deno/gleam.toml b/test/project_deno/gleam.toml index d130a3c7e..7b55cfc02 100644 --- a/test/project_deno/gleam.toml +++ b/test/project_deno/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "project" version = "0.1.0" target = "javascript" diff --git a/test/project_deno/manifest.toml b/test/project_deno/manifest.toml index 35bf661ae..137462f6e 100644 --- a/test/project_deno/manifest.toml +++ b/test/project_deno/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/project_deno/src/project.gleam b/test/project_deno/src/project.gleam index 125e6ccd5..04df1c831 100644 --- a/test/project_deno/src/project.gleam +++ b/test/project_deno/src/project.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub type Location { Location( href: String, diff --git a/test/project_deno/src/project_ffi.mjs b/test/project_deno/src/project_ffi.mjs index 780fe7a80..4c2097028 100644 --- a/test/project_deno/src/project_ffi.mjs +++ b/test/project_deno/src/project_ffi.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + export function location() { return globalThis.location; } diff --git a/test/project_deno/test/project_test.gleam b/test/project_deno/test/project_test.gleam index c071b89b8..f383de961 100644 --- a/test/project_deno/test/project_test.gleam +++ b/test/project_deno/test/project_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import project pub fn main() { diff --git a/test/project_erlang/README.md b/test/project_erlang/README.md index 862b1958f..c44fa2e7e 100644 --- a/test/project_erlang/README.md +++ b/test/project_erlang/README.md @@ -1,3 +1,8 @@ + + # Project A test Gleam project. diff --git a/test/project_erlang/gleam.toml b/test/project_erlang/gleam.toml index 9dc75130b..2f8a21984 100644 --- a/test/project_erlang/gleam.toml +++ b/test/project_erlang/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "project" version = "0.1.0" diff --git a/test/project_erlang/manifest.toml b/test/project_erlang/manifest.toml index 675b0e6cb..ea9e67854 100644 --- a/test/project_erlang/manifest.toml +++ b/test/project_erlang/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/project_erlang/src/elixir_file.ex b/test/project_erlang/src/elixir_file.ex index c159b1c9b..5e4f450f5 100644 --- a/test/project_erlang/src/elixir_file.ex +++ b/test/project_erlang/src/elixir_file.ex @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + defmodule ElixirFile do def main() do "Hello, from the Elixir module!" diff --git a/test/project_erlang/src/erlang_file.erl b/test/project_erlang/src/erlang_file.erl index 06c24ba16..983a8cef7 100644 --- a/test/project_erlang/src/erlang_file.erl +++ b/test/project_erlang/src/erlang_file.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2021 The Gleam contributors + -module(erlang_file). -export([main/0]). diff --git a/test/project_erlang/src/erlang_header.hrl b/test/project_erlang/src/erlang_header.hrl index 488a0702e..09a4068e2 100644 --- a/test/project_erlang/src/erlang_header.hrl +++ b/test/project_erlang/src/erlang_header.hrl @@ -1,2 +1,5 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2021 The Gleam contributors + header_function() -> <<"Hello, from the Erlang header!">>. diff --git a/test/project_erlang/src/project.gleam b/test/project_erlang/src/project.gleam index a5ece68a2..1789d5018 100644 --- a/test/project_erlang/src/project.gleam +++ b/test/project_erlang/src/project.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/project_erlang/test/elixir_test_file.ex b/test/project_erlang/test/elixir_test_file.ex index ac1a33641..7cc2edfef 100644 --- a/test/project_erlang/test/elixir_test_file.ex +++ b/test/project_erlang/test/elixir_test_file.ex @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + defmodule ElixirTestFile do def main() do "Hello, from the Elixir test module!" diff --git a/test/project_erlang/test/erlang_test_file.erl b/test/project_erlang/test/erlang_test_file.erl index 25cff8ec6..359bb0797 100644 --- a/test/project_erlang/test/erlang_test_file.erl +++ b/test/project_erlang/test/erlang_test_file.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2021 The Gleam contributors + -module(erlang_test_file). -export([main/0]). diff --git a/test/project_erlang/test/erlang_test_header.hrl b/test/project_erlang/test/erlang_test_header.hrl index 679432fe8..db7e50771 100644 --- a/test/project_erlang/test/erlang_test_header.hrl +++ b/test/project_erlang/test/erlang_test_header.hrl @@ -1,2 +1,5 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2021 The Gleam contributors + header_function() -> <<"Hello, from the Erlang test header!">>. diff --git a/test/project_erlang/test/project_test.gleam b/test/project_erlang/test/project_test.gleam index f54aa7dd6..8e88818df 100644 --- a/test/project_erlang/test/project_test.gleam +++ b/test/project_erlang/test/project_test.gleam @@ -1,8 +1,11 @@ -import gleam/io +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import gleam/dynamic.{type Dynamic} -import project -import gleeunit import gleam/erlang/atom.{from_string as atom_from_string} +import gleam/io +import gleeunit +import project pub fn main() { project.main() diff --git a/test/project_erlang_windows/gleam.toml b/test/project_erlang_windows/gleam.toml index 1b4606592..bd215d316 100644 --- a/test/project_erlang_windows/gleam.toml +++ b/test/project_erlang_windows/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + name = "project" version = "0.1.0" diff --git a/test/project_erlang_windows/manifest.toml b/test/project_erlang_windows/manifest.toml index 7b4e48043..0d812554a 100644 --- a/test/project_erlang_windows/manifest.toml +++ b/test/project_erlang_windows/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/project_erlang_windows/src/elixir_file.ex b/test/project_erlang_windows/src/elixir_file.ex index c159b1c9b..5e4f450f5 100644 --- a/test/project_erlang_windows/src/elixir_file.ex +++ b/test/project_erlang_windows/src/elixir_file.ex @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + defmodule ElixirFile do def main() do "Hello, from the Elixir module!" diff --git a/test/project_erlang_windows/src/erlang_file.erl b/test/project_erlang_windows/src/erlang_file.erl index 06c24ba16..983a8cef7 100644 --- a/test/project_erlang_windows/src/erlang_file.erl +++ b/test/project_erlang_windows/src/erlang_file.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2021 The Gleam contributors + -module(erlang_file). -export([main/0]). diff --git a/test/project_erlang_windows/src/erlang_header.hrl b/test/project_erlang_windows/src/erlang_header.hrl index 488a0702e..09a4068e2 100644 --- a/test/project_erlang_windows/src/erlang_header.hrl +++ b/test/project_erlang_windows/src/erlang_header.hrl @@ -1,2 +1,5 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2021 The Gleam contributors + header_function() -> <<"Hello, from the Erlang header!">>. diff --git a/test/project_erlang_windows/src/project.gleam b/test/project_erlang_windows/src/project.gleam index a5ece68a2..1789d5018 100644 --- a/test/project_erlang_windows/src/project.gleam +++ b/test/project_erlang_windows/src/project.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/project_erlang_windows/test/elixir_test_file.ex b/test/project_erlang_windows/test/elixir_test_file.ex index ac1a33641..7cc2edfef 100644 --- a/test/project_erlang_windows/test/elixir_test_file.ex +++ b/test/project_erlang_windows/test/elixir_test_file.ex @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + defmodule ElixirTestFile do def main() do "Hello, from the Elixir test module!" diff --git a/test/project_erlang_windows/test/erlang_test_file.erl b/test/project_erlang_windows/test/erlang_test_file.erl index 25cff8ec6..359bb0797 100644 --- a/test/project_erlang_windows/test/erlang_test_file.erl +++ b/test/project_erlang_windows/test/erlang_test_file.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2021 The Gleam contributors + -module(erlang_test_file). -export([main/0]). diff --git a/test/project_erlang_windows/test/erlang_test_header.hrl b/test/project_erlang_windows/test/erlang_test_header.hrl index 679432fe8..db7e50771 100644 --- a/test/project_erlang_windows/test/erlang_test_header.hrl +++ b/test/project_erlang_windows/test/erlang_test_header.hrl @@ -1,2 +1,5 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2021 The Gleam contributors + header_function() -> <<"Hello, from the Erlang test header!">>. diff --git a/test/project_erlang_windows/test/project_test.gleam b/test/project_erlang_windows/test/project_test.gleam index f54aa7dd6..8e88818df 100644 --- a/test/project_erlang_windows/test/project_test.gleam +++ b/test/project_erlang_windows/test/project_test.gleam @@ -1,8 +1,11 @@ -import gleam/io +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import gleam/dynamic.{type Dynamic} -import project -import gleeunit import gleam/erlang/atom.{from_string as atom_from_string} +import gleam/io +import gleeunit +import project pub fn main() { project.main() diff --git a/test/project_git_deps/gleam.toml b/test/project_git_deps/gleam.toml index fcb687e7d..d238c9105 100644 --- a/test/project_git_deps/gleam.toml +++ b/test/project_git_deps/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "git_deps" version = "0.1.0" description = "Test project to test git dependencies" diff --git a/test/project_git_deps/manifest.toml b/test/project_git_deps/manifest.toml index 4cf22046d..796340563 100644 --- a/test/project_git_deps/manifest.toml +++ b/test/project_git_deps/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/project_git_deps/src/git_deps.gleam b/test/project_git_deps/src/git_deps.gleam index b9b439129..236a1bb12 100644 --- a/test/project_git_deps/src/git_deps.gleam +++ b/test/project_git_deps/src/git_deps.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/project_javascript/README.md b/test/project_javascript/README.md index 9281955d2..8d6fd1f29 100644 --- a/test/project_javascript/README.md +++ b/test/project_javascript/README.md @@ -1,3 +1,8 @@ + + # Project A test Gleam project. diff --git a/test/project_javascript/gleam.toml b/test/project_javascript/gleam.toml index b3fbff8eb..2b37cf3b0 100644 --- a/test/project_javascript/gleam.toml +++ b/test/project_javascript/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + name = "project" version = "0.1.0" target = "javascript" diff --git a/test/project_javascript/manifest.toml b/test/project_javascript/manifest.toml index 35bf661ae..137462f6e 100644 --- a/test/project_javascript/manifest.toml +++ b/test/project_javascript/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/project_javascript/src/project.gleam b/test/project_javascript/src/project.gleam index 87c13262b..3fd26b764 100644 --- a/test/project_javascript/src/project.gleam +++ b/test/project_javascript/src/project.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + pub fn main() { println("Hello, from project_javascript!") } diff --git a/test/project_javascript/src/project_ffi.mjs b/test/project_javascript/src/project_ffi.mjs index 5b5832770..e98e392d7 100644 --- a/test/project_javascript/src/project_ffi.mjs +++ b/test/project_javascript/src/project_ffi.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + export function log(x) { console.log(x); } diff --git a/test/project_javascript/test/project_test.gleam b/test/project_javascript/test/project_test.gleam index 3565f474e..c66bd7b7e 100644 --- a/test/project_javascript/test/project_test.gleam +++ b/test/project_javascript/test/project_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import project pub fn main() { diff --git a/test/project_path_deps/README.md b/test/project_path_deps/README.md index 52abfa028..0673b786c 100644 --- a/test/project_path_deps/README.md +++ b/test/project_path_deps/README.md @@ -1,3 +1,8 @@ + + This directory contains four projects used in CI test `test/project_path_deps`. The dependency graph of these projects is as follows: diff --git a/test/project_path_deps/project_a/gleam.toml b/test/project_path_deps/project_a/gleam.toml index 08f87a51a..7fd3844f4 100644 --- a/test/project_path_deps/project_a/gleam.toml +++ b/test/project_path_deps/project_a/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + name = "project_a" version = "0.1.0" diff --git a/test/project_path_deps/project_a/manifest.toml b/test/project_path_deps/project_a/manifest.toml index de31c4628..a6663c250 100644 --- a/test/project_path_deps/project_a/manifest.toml +++ b/test/project_path_deps/project_a/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/project_path_deps/project_a/src/project_a.gleam b/test/project_path_deps/project_a/src/project_a.gleam index c960ecc7d..cc4e9367b 100644 --- a/test/project_path_deps/project_a/src/project_a.gleam +++ b/test/project_path_deps/project_a/src/project_a.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + import project_b import project_c diff --git a/test/project_path_deps/project_a/test/project_a_test.gleam b/test/project_path_deps/project_a/test/project_a_test.gleam index 3831e7a97..157ecb3e4 100644 --- a/test/project_path_deps/project_a/test/project_a_test.gleam +++ b/test/project_path_deps/project_a/test/project_a_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + import gleeunit import gleeunit/should diff --git a/test/project_path_deps/project_b/gleam.toml b/test/project_path_deps/project_b/gleam.toml index 5f987a019..11db6aba9 100644 --- a/test/project_path_deps/project_b/gleam.toml +++ b/test/project_path_deps/project_b/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + name = "project_b" version = "0.1.0" description = "A Gleam project" diff --git a/test/project_path_deps/project_b/manifest.toml b/test/project_path_deps/project_b/manifest.toml index 1e9e78280..aa0843f3b 100644 --- a/test/project_path_deps/project_b/manifest.toml +++ b/test/project_path_deps/project_b/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/project_path_deps/project_b/src/project_b.gleam b/test/project_path_deps/project_b/src/project_b.gleam index 4e5ff22e8..5234b4397 100644 --- a/test/project_path_deps/project_b/src/project_b.gleam +++ b/test/project_path_deps/project_b/src/project_b.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + import project_d pub type TypeB { diff --git a/test/project_path_deps/project_c/gleam.toml b/test/project_path_deps/project_c/gleam.toml index dac0da5a0..033919b8c 100644 --- a/test/project_path_deps/project_c/gleam.toml +++ b/test/project_path_deps/project_c/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + name = "project_c" version = "0.1.0" diff --git a/test/project_path_deps/project_c/manifest.toml b/test/project_path_deps/project_c/manifest.toml index 9eea22876..113f4d88d 100644 --- a/test/project_path_deps/project_c/manifest.toml +++ b/test/project_path_deps/project_c/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/project_path_deps/project_c/src/project_c.gleam b/test/project_path_deps/project_c/src/project_c.gleam index 274853197..3059fdbd5 100644 --- a/test/project_path_deps/project_c/src/project_c.gleam +++ b/test/project_path_deps/project_c/src/project_c.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + import project_d pub type TypeC { diff --git a/test/project_path_deps/project_d/gleam.toml b/test/project_path_deps/project_d/gleam.toml index aa8058d85..5a5884193 100644 --- a/test/project_path_deps/project_d/gleam.toml +++ b/test/project_path_deps/project_d/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + name = "project_d" version = "1.0.0" diff --git a/test/project_path_deps/project_d/manifest.toml b/test/project_path_deps/project_d/manifest.toml index 93213e770..020ce3c7b 100644 --- a/test/project_path_deps/project_d/manifest.toml +++ b/test/project_path_deps/project_d/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/project_path_deps/project_d/src/project_d.gleam b/test/project_path_deps/project_d/src/project_d.gleam index 2ab5318c6..fb16fd351 100644 --- a/test/project_path_deps/project_d/src/project_d.gleam +++ b/test/project_path_deps/project_d/src/project_d.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + pub type TypeD { ConstructorD(String) } diff --git a/test/project_path_deps/project_d/test/project_d_test.gleam b/test/project_path_deps/project_d/test/project_d_test.gleam index 48083af5c..ec2739db9 100644 --- a/test/project_path_deps/project_d/test/project_d_test.gleam +++ b/test/project_path_deps/project_d/test/project_d_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + import gleam/bitwise pub fn main() { diff --git a/test/publishing_default_main/gleam.toml b/test/publishing_default_main/gleam.toml index f3ef1bbc4..468bd4f89 100644 --- a/test/publishing_default_main/gleam.toml +++ b/test/publishing_default_main/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "default_main" version = "1.0.0" description = "Test project for default main" diff --git a/test/publishing_default_main/manifest.toml b/test/publishing_default_main/manifest.toml index 88377adc6..25b941f47 100644 --- a/test/publishing_default_main/manifest.toml +++ b/test/publishing_default_main/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/publishing_default_main/src/default_main.gleam b/test/publishing_default_main/src/default_main.gleam index 2abebbac8..2618b3378 100644 --- a/test/publishing_default_main/src/default_main.gleam +++ b/test/publishing_default_main/src/default_main.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/io pub fn main() -> Nil { diff --git a/test/publishing_default_main/src/default_main/one.gleam b/test/publishing_default_main/src/default_main/one.gleam index b21684fe4..19423dda8 100644 --- a/test/publishing_default_main/src/default_main/one.gleam +++ b/test/publishing_default_main/src/default_main/one.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn one() { "hello from one!" } diff --git a/test/publishing_default_main/src/default_main/two.gleam b/test/publishing_default_main/src/default_main/two.gleam index 0f3327c61..2be27e963 100644 --- a/test/publishing_default_main/src/default_main/two.gleam +++ b/test/publishing_default_main/src/default_main/two.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + pub fn two() { "hello from two!" } diff --git a/test/publishing_default_main/test.sh b/test/publishing_default_main/test.sh index d534ee479..aff6e82cd 100755 --- a/test/publishing_default_main/test.sh +++ b/test/publishing_default_main/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/publishing_default_readme/README.md b/test/publishing_default_readme/README.md index 6cc473c53..c8299015a 100644 --- a/test/publishing_default_readme/README.md +++ b/test/publishing_default_readme/README.md @@ -1,3 +1,8 @@ + + # default_readme [![Package Version](https://img.shields.io/hexpm/v/default_readme)](https://hex.pm/packages/default_readme) diff --git a/test/publishing_default_readme/gleam.toml b/test/publishing_default_readme/gleam.toml index 76042ba24..30f22c672 100644 --- a/test/publishing_default_readme/gleam.toml +++ b/test/publishing_default_readme/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "default_readme" version = "1.0.0" description = "Test project for default readme" diff --git a/test/publishing_default_readme/manifest.toml b/test/publishing_default_readme/manifest.toml index 88377adc6..25b941f47 100644 --- a/test/publishing_default_readme/manifest.toml +++ b/test/publishing_default_readme/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/publishing_default_readme/src/default_readme.gleam b/test/publishing_default_readme/src/default_readme.gleam index 85abef091..aac46c8e2 100644 --- a/test/publishing_default_readme/src/default_readme.gleam +++ b/test/publishing_default_readme/src/default_readme.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import gleam/io /// This tests that a project with a default readme doesn't get published. diff --git a/test/publishing_default_readme/test.sh b/test/publishing_default_readme/test.sh index d534ee479..aff6e82cd 100755 --- a/test/publishing_default_readme/test.sh +++ b/test/publishing_default_readme/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/publishing_empty_readme/README.md b/test/publishing_empty_readme/README.md index e69de29bb..a2d14114e 100644 --- a/test/publishing_empty_readme/README.md +++ b/test/publishing_empty_readme/README.md @@ -0,0 +1,5 @@ + + diff --git a/test/publishing_empty_readme/gleam.toml b/test/publishing_empty_readme/gleam.toml index d97b24244..cd89711c3 100644 --- a/test/publishing_empty_readme/gleam.toml +++ b/test/publishing_empty_readme/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "empty_readme" version = "1.0.0" description = "Test project for empty readme" diff --git a/test/publishing_empty_readme/manifest.toml b/test/publishing_empty_readme/manifest.toml index 88377adc6..25b941f47 100644 --- a/test/publishing_empty_readme/manifest.toml +++ b/test/publishing_empty_readme/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/publishing_empty_readme/src/empty_readme.gleam b/test/publishing_empty_readme/src/empty_readme.gleam index d2318ee3e..bd037c982 100644 --- a/test/publishing_empty_readme/src/empty_readme.gleam +++ b/test/publishing_empty_readme/src/empty_readme.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import gleam/io /// This tests that a project with an empty readme doesn't get published. diff --git a/test/publishing_empty_readme/test.sh b/test/publishing_empty_readme/test.sh index d534ee479..aff6e82cd 100755 --- a/test/publishing_empty_readme/test.sh +++ b/test/publishing_empty_readme/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/publishing_no_readme/gleam.toml b/test/publishing_no_readme/gleam.toml index 4e33df4fe..3f21598ac 100644 --- a/test/publishing_no_readme/gleam.toml +++ b/test/publishing_no_readme/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + name = "no_readme" version = "1.0.0" description = "Test project for no readme" diff --git a/test/publishing_no_readme/manifest.toml b/test/publishing_no_readme/manifest.toml index 88377adc6..25b941f47 100644 --- a/test/publishing_no_readme/manifest.toml +++ b/test/publishing_no_readme/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/publishing_no_readme/src/no_readme.gleam b/test/publishing_no_readme/src/no_readme.gleam index 65db7252d..4fece6e7d 100644 --- a/test/publishing_no_readme/src/no_readme.gleam +++ b/test/publishing_no_readme/src/no_readme.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2026 The Gleam contributors + import gleam/io /// This tests that a project with no readme doesn't get published. diff --git a/test/publishing_no_readme/test.sh b/test/publishing_no_readme/test.sh index d534ee479..aff6e82cd 100755 --- a/test/publishing_no_readme/test.sh +++ b/test/publishing_no_readme/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2025 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/publishing_priv_symlink_escape/README.md b/test/publishing_priv_symlink_escape/README.md index 3da728c27..a4cf78421 100644 --- a/test/publishing_priv_symlink_escape/README.md +++ b/test/publishing_priv_symlink_escape/README.md @@ -1,3 +1,8 @@ + + # Symlink escape The file in the src directory is a symlink that points outside the package. diff --git a/test/publishing_priv_symlink_escape/gleam.toml b/test/publishing_priv_symlink_escape/gleam.toml index 6fcaec9a1..87fcdc2e1 100644 --- a/test/publishing_priv_symlink_escape/gleam.toml +++ b/test/publishing_priv_symlink_escape/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + name = "symlink_escape" version = "1.0.0" description = "Test project" diff --git a/test/publishing_priv_symlink_escape/manifest.toml b/test/publishing_priv_symlink_escape/manifest.toml index c5d779a3f..b6d79320e 100644 --- a/test/publishing_priv_symlink_escape/manifest.toml +++ b/test/publishing_priv_symlink_escape/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/publishing_priv_symlink_escape/src/symlink_escape.gleam b/test/publishing_priv_symlink_escape/src/symlink_escape.gleam index 86ee73c17..ff5aa5f40 100644 --- a/test/publishing_priv_symlink_escape/src/symlink_escape.gleam +++ b/test/publishing_priv_symlink_escape/src/symlink_escape.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + pub fn something() { "Just a thing to export" } diff --git a/test/publishing_priv_symlink_escape/test.sh b/test/publishing_priv_symlink_escape/test.sh index 409627ce0..1e889b73f 100755 --- a/test/publishing_priv_symlink_escape/test.sh +++ b/test/publishing_priv_symlink_escape/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/publishing_src_symlink_escape/README.md b/test/publishing_src_symlink_escape/README.md index 107913f9a..0d077dc24 100644 --- a/test/publishing_src_symlink_escape/README.md +++ b/test/publishing_src_symlink_escape/README.md @@ -1,3 +1,8 @@ + + # Symlink escape The file in the priv directory is a symlink that points outside the package. diff --git a/test/publishing_src_symlink_escape/gleam.toml b/test/publishing_src_symlink_escape/gleam.toml index 6fcaec9a1..87fcdc2e1 100644 --- a/test/publishing_src_symlink_escape/gleam.toml +++ b/test/publishing_src_symlink_escape/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + name = "symlink_escape" version = "1.0.0" description = "Test project" diff --git a/test/publishing_src_symlink_escape/manifest.toml b/test/publishing_src_symlink_escape/manifest.toml index c5d779a3f..b6d79320e 100644 --- a/test/publishing_src_symlink_escape/manifest.toml +++ b/test/publishing_src_symlink_escape/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/publishing_src_symlink_escape/test.sh b/test/publishing_src_symlink_escape/test.sh index 5e6e47383..608ff6b2f 100755 --- a/test/publishing_src_symlink_escape/test.sh +++ b/test/publishing_src_symlink_escape/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2026 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/root_package_not_compiled_when_running_dep/README.md b/test/root_package_not_compiled_when_running_dep/README.md index a16bdb8ba..926364533 100644 --- a/test/root_package_not_compiled_when_running_dep/README.md +++ b/test/root_package_not_compiled_when_running_dep/README.md @@ -1,3 +1,8 @@ + + # root_package_not_compiled_when_running_dep This package is used to check that the compiler can compile and run a dependency diff --git a/test/root_package_not_compiled_when_running_dep/gleam.toml b/test/root_package_not_compiled_when_running_dep/gleam.toml index 4a1e59291..1c211fe7f 100644 --- a/test/root_package_not_compiled_when_running_dep/gleam.toml +++ b/test/root_package_not_compiled_when_running_dep/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "root_package_not_compiled_when_running_dep" version = "1.0.0" diff --git a/test/root_package_not_compiled_when_running_dep/manifest.toml b/test/root_package_not_compiled_when_running_dep/manifest.toml index bc12852ec..a81381fc4 100644 --- a/test/root_package_not_compiled_when_running_dep/manifest.toml +++ b/test/root_package_not_compiled_when_running_dep/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/root_package_not_compiled_when_running_dep/src/root_package_not_compiled_when_running_dep.gleam b/test/root_package_not_compiled_when_running_dep/src/root_package_not_compiled_when_running_dep.gleam index 6258c40aa..27424800c 100644 --- a/test/root_package_not_compiled_when_running_dep/src/root_package_not_compiled_when_running_dep.gleam +++ b/test/root_package_not_compiled_when_running_dep/src/root_package_not_compiled_when_running_dep.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn main() { compilation_error } diff --git a/test/root_package_not_compiled_when_running_dep/test.sh b/test/root_package_not_compiled_when_running_dep/test.sh index 50d20cf46..f22313752 100755 --- a/test/root_package_not_compiled_when_running_dep/test.sh +++ b/test/root_package_not_compiled_when_running_dep/test.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + #!/bin/sh set -eu diff --git a/test/running_modules/README.md b/test/running_modules/README.md index 9a07d4b8e..a2cb01381 100644 --- a/test/running_modules/README.md +++ b/test/running_modules/README.md @@ -1,3 +1,8 @@ + + # Running Modules Tests running modules with the `gleam run -m` command on all targets and runtimes. diff --git a/test/running_modules/dev/module_dev.gleam b/test/running_modules/dev/module_dev.gleam index 04f02f8e3..78dc01b80 100644 --- a/test/running_modules/dev/module_dev.gleam +++ b/test/running_modules/dev/module_dev.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/running_modules/dev/module_in_dev.gleam b/test/running_modules/dev/module_in_dev.gleam index b30cb17d4..dca57d643 100644 --- a/test/running_modules/dev/module_in_dev.gleam +++ b/test/running_modules/dev/module_in_dev.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/running_modules/dev/nested/module_in_dev.gleam b/test/running_modules/dev/nested/module_in_dev.gleam index 0efacc377..386ded0f0 100644 --- a/test/running_modules/dev/nested/module_in_dev.gleam +++ b/test/running_modules/dev/nested/module_in_dev.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/running_modules/dev/wrong_dev_arity.gleam b/test/running_modules/dev/wrong_dev_arity.gleam index 67fedd92f..d1d121ab8 100644 --- a/test/running_modules/dev/wrong_dev_arity.gleam +++ b/test/running_modules/dev/wrong_dev_arity.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/io pub fn main(something) { diff --git a/test/running_modules/gleam.toml b/test/running_modules/gleam.toml index 11709fab5..c9fab295b 100644 --- a/test/running_modules/gleam.toml +++ b/test/running_modules/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + name = "module" version = "0.1.0" description = "A Gleam project" diff --git a/test/running_modules/manifest.toml b/test/running_modules/manifest.toml index dca89c33a..a66781a32 100644 --- a/test/running_modules/manifest.toml +++ b/test/running_modules/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2021 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/running_modules/run_tests.sh b/test/running_modules/run_tests.sh index 410e99ba5..8907a53a8 100755 --- a/test/running_modules/run_tests.sh +++ b/test/running_modules/run_tests.sh @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + #/usr/bin/env sh set -eu diff --git a/test/running_modules/src/module.gleam b/test/running_modules/src/module.gleam index bc4740b83..9056c9b4f 100644 --- a/test/running_modules/src/module.gleam +++ b/test/running_modules/src/module.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/running_modules/src/module/no_main_function.gleam b/test/running_modules/src/module/no_main_function.gleam index 8b1378917..34fbb2f62 100644 --- a/test/running_modules/src/module/no_main_function.gleam +++ b/test/running_modules/src/module/no_main_function.gleam @@ -1 +1,2 @@ - +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2018 The Gleam contributors diff --git a/test/running_modules/src/module/sub_module.gleam b/test/running_modules/src/module/sub_module.gleam index f6acca02a..e6d2a886f 100644 --- a/test/running_modules/src/module/sub_module.gleam +++ b/test/running_modules/src/module/sub_module.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/running_modules/src/module/wrong_arity.gleam b/test/running_modules/src/module/wrong_arity.gleam index d60f2de03..cce8a1783 100644 --- a/test/running_modules/src/module/wrong_arity.gleam +++ b/test/running_modules/src/module/wrong_arity.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + pub fn main(arg: Int) -> Nil { Nil } diff --git a/test/running_modules/test/module_in_test.gleam b/test/running_modules/test/module_in_test.gleam index 79edd98bc..eb80c6e1c 100644 --- a/test/running_modules/test/module_in_test.gleam +++ b/test/running_modules/test/module_in_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/running_modules/test/module_test.gleam b/test/running_modules/test/module_test.gleam index c8d049014..4fdc32523 100644 --- a/test/running_modules/test/module_test.gleam +++ b/test/running_modules/test/module_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/running_modules/test/nested/module_in_test.gleam b/test/running_modules/test/nested/module_in_test.gleam index b6bb2b1f2..17c8f1cd9 100644 --- a/test/running_modules/test/nested/module_in_test.gleam +++ b/test/running_modules/test/nested/module_in_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/io pub fn main() { diff --git a/test/running_modules/test/wrong_test_arity.gleam b/test/running_modules/test/wrong_test_arity.gleam index 67fedd92f..d1d121ab8 100644 --- a/test/running_modules/test/wrong_test_arity.gleam +++ b/test/running_modules/test/wrong_test_arity.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2025 The Gleam contributors + import gleam/io pub fn main(something) { diff --git a/test/subdir_ffi/README.md b/test/subdir_ffi/README.md index 0668d9666..1d19a895a 100644 --- a/test/subdir_ffi/README.md +++ b/test/subdir_ffi/README.md @@ -1,3 +1,8 @@ + + # subdir_ffi This package is used to check if the compiler properly supports FFI files (such diff --git a/test/subdir_ffi/gleam.toml b/test/subdir_ffi/gleam.toml index 19716bec2..4271e7c8c 100644 --- a/test/subdir_ffi/gleam.toml +++ b/test/subdir_ffi/gleam.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + name = "subdir_ffi" version = "1.0.0" diff --git a/test/subdir_ffi/manifest.toml b/test/subdir_ffi/manifest.toml index e85162028..ae9eda0c0 100644 --- a/test/subdir_ffi/manifest.toml +++ b/test/subdir_ffi/manifest.toml @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2024 The Gleam contributors + # This file was generated by Gleam # You typically do not need to edit this file diff --git a/test/subdir_ffi/src/headers/submodule_ffi_header.hrl b/test/subdir_ffi/src/headers/submodule_ffi_header.hrl index 35d423140..44adaa3ed 100644 --- a/test/subdir_ffi/src/headers/submodule_ffi_header.hrl +++ b/test/subdir_ffi/src/headers/submodule_ffi_header.hrl @@ -1,2 +1,5 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2024 The Gleam contributors + header_function() -> <<"Hello, from the nested Erlang header!">>. diff --git a/test/subdir_ffi/src/nested/submodule.gleam b/test/subdir_ffi/src/nested/submodule.gleam index 9d663bb57..55d050792 100644 --- a/test/subdir_ffi/src/nested/submodule.gleam +++ b/test/subdir_ffi/src/nested/submodule.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + pub fn submodule_main() { parent_println(message()) parent_println(elixir_message()) diff --git a/test/subdir_ffi/src/nested/submodule_ffi.erl b/test/subdir_ffi/src/nested/submodule_ffi.erl index ea1c0b918..3f79732f9 100644 --- a/test/subdir_ffi/src/nested/submodule_ffi.erl +++ b/test/subdir_ffi/src/nested/submodule_ffi.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2024 The Gleam contributors + -module(submodule_ffi). -export([main/0, main2/0]). diff --git a/test/subdir_ffi/src/nested/submodule_ffi.ex b/test/subdir_ffi/src/nested/submodule_ffi.ex index c159b1c9b..5e4f450f5 100644 --- a/test/subdir_ffi/src/nested/submodule_ffi.ex +++ b/test/subdir_ffi/src/nested/submodule_ffi.ex @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2022 The Gleam contributors + defmodule ElixirFile do def main() do "Hello, from the Elixir module!" diff --git a/test/subdir_ffi/src/nested/submodule_ffi.mjs b/test/subdir_ffi/src/nested/submodule_ffi.mjs index bc8cb1a2e..af7496d11 100644 --- a/test/subdir_ffi/src/nested/submodule_ffi.mjs +++ b/test/subdir_ffi/src/nested/submodule_ffi.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + export function main(x) { return "Hello from the nested JavaScript native module!"; } diff --git a/test/subdir_ffi/src/project.gleam b/test/subdir_ffi/src/project.gleam index b126e234c..f9ec9ce8b 100644 --- a/test/subdir_ffi/src/project.gleam +++ b/test/subdir_ffi/src/project.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2024 The Gleam contributors + import nested/submodule pub fn main() { diff --git a/test/subdir_ffi/src/project_ffi.erl b/test/subdir_ffi/src/project_ffi.erl index fde3c3de6..8a2c50a12 100644 --- a/test/subdir_ffi/src/project_ffi.erl +++ b/test/subdir_ffi/src/project_ffi.erl @@ -1,3 +1,6 @@ +%% SPDX-License-Identifier: Apache-2.0 +%% SPDX-FileCopyrightText: 2024 The Gleam contributors + -module(project_ffi). -export([log/1]). diff --git a/test/subdir_ffi/src/project_ffi.mjs b/test/subdir_ffi/src/project_ffi.mjs index 5b5832770..e98e392d7 100644 --- a/test/subdir_ffi/src/project_ffi.mjs +++ b/test/subdir_ffi/src/project_ffi.mjs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + export function log(x) { console.log(x); } diff --git a/test/subdir_ffi/test/subdir_ffi_test.gleam b/test/subdir_ffi/test/subdir_ffi_test.gleam index 3565f474e..c66bd7b7e 100644 --- a/test/subdir_ffi/test/subdir_ffi_test.gleam +++ b/test/subdir_ffi/test/subdir_ffi_test.gleam @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2021 The Gleam contributors + import project pub fn main() { diff --git "a/test/unicode_path \342\255\220/Makefile" "b/test/unicode_path \342\255\220/Makefile" index 88925a28d..7029ff3af 100644 --- "a/test/unicode_path \342\255\220/Makefile" +++ "b/test/unicode_path \342\255\220/Makefile" @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + .PHONY: build build: rm -fr build diff --git "a/test/unicode_path \342\255\220/gleam.toml" "b/test/unicode_path \342\255\220/gleam.toml" index eec4dce39..19c439dc7 100644 --- "a/test/unicode_path \342\255\220/gleam.toml" +++ "b/test/unicode_path \342\255\220/gleam.toml" @@ -1,2 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: 2023 The Gleam contributors + name = "unicode_path" -version = "1.0.0" \ No newline at end of file +version = "1.0.0" diff --git "a/test/unicode_path \342\255\220/src/unicode_path.gleam" "b/test/unicode_path \342\255\220/src/unicode_path.gleam" index 4ead3b10c..48f894857 100644 --- "a/test/unicode_path \342\255\220/src/unicode_path.gleam" +++ "b/test/unicode_path \342\255\220/src/unicode_path.gleam" @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 The Gleam contributors + pub fn main() { Nil }