Make INCLUDE-FILE less sensitive to path changes (#5159)

It's helpful for stability to not have the path in the repo reflected in
test files, something I'm separately running into. So to reduce this,
align INCLUDE-FILE with other split behavior:

- Use the filename (with a "include_files/" subdir to disambiguate),
rather than the full path.
- Note if we eventually want to support splits in these, the same
approach could be extended.
- Only provide as an arg if the user requests files as args.

Factoring AddFile back because it's hard to share; I'm also advocating
to remove the prelude manifest, which would mean the remaining call
could be removed.
This commit is contained in:
Jon Ross-Perkins
2025-03-21 16:03:25 +00:00
committed by GitHub
parent 6041e9aa9d
commit 868efb7c86
27 changed files with 110 additions and 150 deletions
+1 -1
View File
@@ -9,4 +9,4 @@
// TIP: To dump output, run:
// TIP: bazel run //testing/file_test:file_test_base_test -- --dump_output --file_tests=testing/file_test/testdata/include_file.carbon
// CHECK:STDOUT: 3 args: `default_args`, `include_file.carbon`, `testing/file_test/testdata/no_line_number.carbon`
// CHECK:STDOUT: 3 args: `default_args`, `include_file.carbon`, `include_files/no_line_number.carbon`