Repository navigation
fix: translate the rest of a package when the frontend refuses a file - #64
Merged
Merged
Conversation
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.
py2v --packagestopped at the first file the frontend couldn't translate and wrote nothing, so one file with a syntax error cost the whole package.Now that file is not emitted on this run, the other modules are translated, and the skipped files are listed on stderr with the reason (the path in the frontend's message is the absolute one):
If an earlier run wrote V for a file that is skipped now, that old file is removed, so
--checkcan't compile a stale translation; if it can't be removed, the run stops with an error. The exit status is still 1 when a file was skipped. With--check, the generated modules are checked before that final exit.I ran into it on textual: one of its 247 files fails in the frontend, which left nothing written on master, and 246 files are written with this.
Test plan
tests/run_tests.vsh. A package with one good module and one with a syntax error must write the good one, name the bad one, and exit 1. And when a file that translated on a first run is refused on a second, its old output must be gone. Both fail with master's py2v and pass with this change.v tests/run_tests.vsh: 177 passed, 0 failed (175 before, plus the two checks).