Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning spam when there are completely unrelated JSON files in build folder #91

Open
anthonyalayo opened this issue Oct 21, 2023 · 10 comments

Comments

@anthonyalayo
Copy link

anthonyalayo commented Oct 21, 2023

Hey there,

Is there support for Clang 14/15/16? I noticed your previous history of adding support for new Clang versions, and I'm noticing a lot of errors and a missing trace.json at the top level.

@anthonyalayo anthonyalayo changed the title Clang 14 Support Clang 14/15/16 Support Oct 21, 2023
@aras-p
Copy link
Owner

aras-p commented Oct 21, 2023

Can you attach example of json file, and what kind of errors you get?

@anthonyalayo
Copy link
Author

@aras-p thanks for the quick response, I'll be back at my computer in an hour and I'll get a dump for you.

@anthonyalayo
Copy link
Author

@aras-p, came back home and tried a few things, and I realized this happens even with Clang 13.

❯ clang --version
Homebrew clang version 13.0.1
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /opt/homebrew/bin

❯ ninja --version
1.11.1

❯ cmake --version
cmake version 3.27.7

I added this to my library target (before the executable):

target_compile_options(${PROJECT_LIB_NAME} PRIVATE -ftime-trace)

Then I ran the following:

ClangBuildAnalyzer --all build output.bin

And I get this:

Processing all files and saving to 'output.bin'...
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error STRING_ERROR: Problem while parsing a string.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error STRING_ERROR: Problem while parsing a string.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error T_ATOM_ERROR: Problem while parsing an atom starting with the letter 't'.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error STRING_ERROR: Problem while parsing a string.
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error STRING_ERROR: Problem while parsing a string.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error STRING_ERROR: Problem while parsing a string.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error T_ATOM_ERROR: Problem while parsing an atom starting with the letter 't'.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error DEPTH_ERROR: The JSON document was too deep (too many nested objects and arrays).
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error STRING_ERROR: Problem while parsing a string.
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error NUMBER_ERROR: Problem while parsing a number.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc..
  done in 3.6s. Run 'ClangBuildAnalyzer --analyze output.bin' to analyze it.

Am I perhaps doing something wrong? I noticed there is no top level JSON trace file.

@anthonyalayo
Copy link
Author

Any idea what causes those @aras-p ?

@aras-p
Copy link
Owner

aras-p commented Oct 25, 2023

I just tested locally with clang 14 and clang 16, and everything seems to work as expected. Hard to say what goes wrong without seeing at least some of the json files that would be produced next to object files under your build folder.

@e4lam
Copy link

e4lam commented Oct 25, 2023

For the record, I get these too.

Processing all files and saving to 'buildAnalyze.bin'...
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure:
missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure:
missing or superfluous commas, braces, missing keys, etc..
WARN: JSON parse error F_ATOM_ERROR: Problem while parsing an atom starting with
 the letter 'f'.
WARN: JSON parse error TAPE_ERROR: The JSON document has an improper structure:
missing or superfluous commas, braces, missing keys, etc..
  done in 86.6s. Run 'ClangBuildAnalyzer --analyze buildAnalyze.bin' to analyze
it.

@aras-p
Copy link
Owner

aras-p commented Oct 25, 2023

And again, without knowing what is in these json files, it's hard to say what's going on

@e4lam
Copy link

e4lam commented Oct 25, 2023

So I updated to the latest code. It's because it's processing random json files part of my project that are not from clang :(
Is there a way to specify a pattern to match when it does things recursively? I think something like *.C.json would work well for me.

@anthonyalayo
Copy link
Author

nice find @e4lam , i think thats my problem too

@aras-p aras-p changed the title Clang 14/15/16 Support Warning spam when there are completely unrelated JSON files in build folder Feb 21, 2024
@alecazam
Copy link

There are a whole bunch of json files, that Xcode dumps out to the build directories. clang is on all platforms now, so you didn't really state what platform you were building on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants