screenplay tool: accept a single .play file and add --warnaserror - #42
Merged
Conversation
Compiling one known file went through directory discovery, so a caller with a path in hand had nowhere to go. CompileFile compiles it directly and uses the file name as the relative path, so diagnostics read the same way they do for a discovered file.
Pointing the tool at a file printed "Directory '<path>' does not exist", so verifying one generated document meant copying it into a scratch directory first. A positional argument that is an existing .play file now compiles just that file; anything else keeps the directory behavior. Warnings never influenced the exit code, which hides a warning from a pipeline that generates documents and expects them clean. --warnaserror opts into failing the run on warnings, matching the convention of other compiler tools.
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.
Added
screenplay <file>.playcompiles a single file. Pointing the tool at a file previously failed withDirectory '<path>' does not exist, so verifying one generated document meant copying it into a scratch directory first. (screenplay tool: accept a single .play file and add an opt-in fail-on-warnings mode #31)--warnaserrormakes warnings fail the run with exit code1, so a pipeline that generates documents can require them to be clean. (screenplay tool: accept a single .play file and add an opt-in fail-on-warnings mode #31)IPlayFileCompiler.CompileFile(path)compiles one known.playfile without going through directory discovery. (screenplay tool: accept a single .play file and add an opt-in fail-on-warnings mode #31)