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

Regex of CompileWarning will be mismatched some other warnings. #255

Open
blastmann opened this issue Feb 26, 2024 · 1 comment
Open

Regex of CompileWarning will be mismatched some other warnings. #255

blastmann opened this issue Feb 26, 2024 · 1 comment

Comments

@blastmann
Copy link

Here is an example log:

/Volumes/data/workspace/ABCFile.m:110:27: warning: unused variable 'domainWhitelist' [-Wunused-variable]
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
  _xxxx, referenced from:
      -[ABC testcase] in tests.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Because of the parser will move to top for next fast check, the line of ld warning will be mismatched and outputs of Undefined symbols will be disappeared like this:

image

I think the regex of CompileWarning should exclude LDWarning properly like this:

static let regex = Regex(pattern: #"^(?!ld)(([^:]*):*\d*:*\d*):\swarning:\s(.*)$"#)
@cpisciotta
Copy link
Owner

Hey @blastmann! Thanks for filling this. It looks like this relates to xcbeautify's one-line-at-a-time logic. I plan to refactor this after I release 2.0.0 (expected to release this week). It'll likely be a couple of weeks before I can introduce the logic that I think will be necessary to then fix this issue. In the meantime, you might find it helpful to pass the --preserve-unbeautified flag. Rest assured, this is on my radar.

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

2 participants