-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend JSON format to include relevant information for tools like rdmd.
- Loading branch information
Jonathan Marler
committed
Feb 2, 2018
1 parent
2efef2b
commit dc7fb7a
Showing
9 changed files
with
1,254 additions
and
940 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Added more information to json output | ||
|
||
Add the following objects were to the json output: | ||
--- | ||
[ | ||
{ | ||
"kind" : "compilerInfo", | ||
"binary" : "<filename-of-compiler-binary>", | ||
"version" : "<compiler-version>", | ||
"supportsIncludeImports" : true | ||
}, | ||
{ | ||
"kind" : "buildInfo", | ||
"config": "<filename-of-config-file>", | ||
"cwd": "<cwd-during-compiler-invocation>", | ||
"importPaths": [ | ||
"<import-path1>", | ||
"<import-path2>", | ||
//... | ||
] | ||
}, | ||
// ... | ||
{ | ||
"kind": "semantics", | ||
"modules": [ | ||
{ | ||
"name": "<module-name>" | ||
"file": "<module-filename>", | ||
// isRoot is true if the module is going to be taken | ||
// to object code. | ||
"isRoot": true|false, | ||
}, | ||
// ... | ||
] | ||
} | ||
] | ||
--- |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
grep -v "\"file\" : " ${RESULTS_DIR}/compilable/json.out | grep -v "\"offset\" : " | grep -v "\"deco\" : " > ${RESULTS_DIR}/compilable/json.out.2 | ||
grep -v "\"file\" : " compilable/extra-files/json.out | grep -v "\"offset\" : " | grep -v "\"deco\" : " > ${RESULTS_DIR}/compilable/json.out.3 | ||
echo SANITIZING JSON... | ||
${RESULTS_DIR}/sanitize_json ${RESULTS_DIR}/compilable/json.out > ${RESULTS_DIR}/compilable/json.out.sanitized | ||
if [ $? -ne 0 ]; then | ||
exit 1; | ||
fi | ||
|
||
diff --strip-trailing-cr ${RESULTS_DIR}/compilable/json.out.2 ${RESULTS_DIR}/compilable/json.out.3 | ||
diff --strip-trailing-cr compilable/extra-files/json.out ${RESULTS_DIR}/compilable/json.out.sanitized | ||
if [ $? -ne 0 ]; then | ||
exit 1; | ||
fi | ||
|
||
rm ${RESULTS_DIR}/compilable/json.out{.2,.3} | ||
rm ${RESULTS_DIR}/compilable/json.out.sanitized |
Oops, something went wrong.