Repository navigation
Name the source file in error messages by the path it was given - #1457
Open
helixsolara wants to merge 1 commit into
Open
helixsolara wants to merge 1 commit into
helixsolara wants to merge 1 commit into
Conversation
cppfront printed errors with strip_path(sourcefile), the file name without its folder. Build systems run cppfront in an output folder (CMake custom commands, MSBuild steps), so an IDE reading the build output, such as Visual Studio's Error List or VS Code's problem matchers, can't find the file an error names. Errors now print the source path as cppfront was given it, so a full path stays full and a relative one stays relative. strip_path had no other caller and is removed. Given the full path to sub\bad.cpp2, cppfront used to print "bad.cpp2(3,14): error: ..."; it now prints the full path, and given sub/bad.cpp2 it prints that. All 191 regression tests transpile to the same .cpp and .cpp2.output, since run-tests.sh passes bare file names. No regression test covers a path with folders, which run-tests.sh can't express. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cppfront prints errors with
strip_path(sourcefile), the file name without its folder. Build systems run cppfront in an output folder (a CMake custom command, an MSBuild step), so an IDE reading the build output, such as Visual Studio's Error List or a VS Code problem matcher, can't find the file an error names.Change
Errors now print the source path as cppfront was given it: a full path stays full, a relative one stays relative.
strip_pathhad no other caller and is removed.Given the full path to
sub\bad.cpp2:Tests
All 191 regression tests transpile to the same
.cppand.cpp2.outputas before, sincerun-tests.shpasses bare file names. No regression test covers a path with folders, whichrun-tests.shdoesn't have a way to express; happy to add one if you'd like a particular form.🤖 Generated with Claude Code