carp checkers: add carp checker and make it work

This commit is contained in:
2019-12-16 12:03:18 +01:00
parent 5763bfc040
commit 3254a9e81d
32 changed files with 145 additions and 11 deletions

View File

@@ -0,0 +1 @@
Im a special case of a Carp process for checking errors.

View File

@@ -0,0 +1,9 @@
checking
check
| f |
f := FileReference newTempFilePrefix: 'checker' suffix: '.carp'.
f writeStreamDo: [:stream | stream nextPutAll: file].
proc arguments: {'--check' . f pathString }.
self run.
excepted ifNotNil: [ CarpError new messageText: excepted messageText ].
self died ifFalse: [ ^ CarpCheckParser new parse: proc stdoutStream ]

View File

@@ -0,0 +1,3 @@
checking
file: aString
file := aString

View File

@@ -0,0 +1,3 @@
checking
file
^ file

View File

@@ -0,0 +1,5 @@
checking
initialize
proc := OSSUnixSubprocess new command: 'carp';
redirectStdout;
addAllEnvVariablesFromParentWithoutOverride

View File

@@ -0,0 +1,4 @@
checking
run
[ [ proc run ] on: Error do: [ :err | excepted := err ] ] fork.
(Delay forMilliseconds: 500) wait.

View File

@@ -0,0 +1,13 @@
{
"commentStamp" : "VeitHeller 12/16/2019 10:34",
"super" : "CarpProcess",
"category" : "Pond",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"file"
],
"name" : "CarpChecker",
"type" : "normal"
}