Allow repeated includes, particularly for min_prelude (#5741)

Make min_prelude parts include what they use, and remove the inclusions
which were for indirect uses from the main min_prelude files.
This commit is contained in:
Jon Ross-Perkins
2025-06-26 21:59:55 +00:00
committed by GitHub
parent c3b0c2e425
commit 49212feac6
11 changed files with 36 additions and 18 deletions
-6
View File
@@ -2,12 +2,6 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// TODO: This should move to the place where it's imported, but it ends up
// included more than once and that fails to build.
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon
// TODO: This should move to the place where it's imported, but it ends up
// included more than once and that fails to build.
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int.carbon
// EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=min_prelude/
@@ -1,6 +1,8 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon
// --- min_prelude/parts/float.carbon
@@ -1,6 +1,9 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon
// --- min_prelude/parts/int.carbon
@@ -1,6 +1,8 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/optional.carbon
// --- min_prelude/parts/iterate.carbon
@@ -1,6 +1,8 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/bool.carbon
// --- min_prelude/parts/optional.carbon
@@ -1,6 +1,9 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon
// --- min_prelude/parts/uint.carbon
@@ -2,14 +2,8 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// TODO: This should move to the place where it's imported, but it ends up
// included more than once and that fails to build.
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/bool.carbon
// TODO: This should move to the place where it's imported, but it ends up
// included more than once and that fails to build.
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/float.carbon
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int.carbon
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/uint.carbon
// EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=min_prelude/
-6
View File
@@ -2,12 +2,6 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// TODO: This should move to the place where it's imported, but it ends up
// included more than once and that fails to build.
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon
// TODO: This should move to the place where it's imported, but it ends up
// included more than once and that fails to build.
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int.carbon
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/uint.carbon
// EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=min_prelude/