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

Fix COMPILE_MATCHER #230

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fix COMPILE_MATCHER #230

wants to merge 4 commits into from

Conversation

FinnChen
Copy link

@FinnChen FinnChen commented Jul 5, 2016

The COMPILE_MATCHER /^Compile[\w]+\s.+?\s((?:\\.|[^ ])+\/((?:\\.|[^ ])+\.(?:m|mm|c|cc|cpp|cxx|swift)))\s.*/

  • can not match $2 file_name (ObjcFile.m)

CompileC /Users/finn/Library/Developer/Xcode/DerivedData/Project-ezpxxtrwrpdftwfmhlpshulhdsij/Build/Intermediates/Project.build/Debug-iphonesimulator/Project.build/Objects-normal/i386/ObjcFile.o ObjcFile.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler

  • only match (path/ObjcFile.m)

CompileC /Users/finn/Library/Developer/Xcode/DerivedData/Project-ezpxxtrwrpdftwfmhlpshulhdsij/Build/Intermediates/Project.build/Debug-iphonesimulator/Project.build/Objects-normal/i386/ObjcFile.o path/ObjcFile.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler

`COMPILE_MATCHER = /^Compile[\w]+\s.+?\s((?:(?:\\.|[^ ])+\/)*((?:\\.|[^ ])+\.(?:m|mm|c|cc|cpp|cxx|swift)))\s.*/` can not match Compile text like

`CompileC /Users/finn/Library/Developer/Xcode/DerivedData/QQMSFContact-ezpxxtrwrpdftwfmhlpshulhdsij/Build/Intermediates/Project.build/Debug-iphonesimulator/Project.build/Objects-normal/i386/ObjcFile.o ObjcFile.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler`
@UkuLoskit
Copy link

UkuLoskit commented May 31, 2017

Hello!

Could this be merged? I found this issue through Infer which relies on xcpretty for getting the list of compiled files.

I would also suggest adding a test for this.

@supermarin
Copy link
Contributor

@UkuLoskit can't be merged without adding a test to prove the failure

COMPILE_COMMAND_MATCHER should match source file in the root path
Copy link
Collaborator

@houndci-bot houndci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

.rubocop.yml: Lint/Eval has the wrong namespace - should be Security
.rubocop.yml: Lint/Eval has the wrong namespace - should be Security
.rubocop.yml: Style/AlignHash has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout
.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/ClosingParenthesisIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLineBetweenDefs has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundBlockBody has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout
.rubocop.yml: Style/ExtraSpacing has the wrong namespace - should be Layout
.rubocop.yml: Style/FirstParameterIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout
.rubocop.yml: Style/LeadingCommentSpace has the wrong namespace - should be Layout
.rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout
.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout
.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout
Error: The Style/TrailingComma cop no longer exists. Please use Style/TrailingCommaInLiteral and/or Style/TrailingCommaInArguments instead.
(obsolete configuration found in .rubocop.yml, please update it)

remove white spaces
Copy link
Collaborator

@houndci-bot houndci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

.rubocop.yml: Lint/Eval has the wrong namespace - should be Security
.rubocop.yml: Lint/Eval has the wrong namespace - should be Security
.rubocop.yml: Style/AlignHash has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout
.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/ClosingParenthesisIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLineBetweenDefs has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundBlockBody has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout
.rubocop.yml: Style/ExtraSpacing has the wrong namespace - should be Layout
.rubocop.yml: Style/FirstParameterIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout
.rubocop.yml: Style/LeadingCommentSpace has the wrong namespace - should be Layout
.rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout
.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout
.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout
Error: The Style/TrailingComma cop no longer exists. Please use Style/TrailingCommaInLiteral and/or Style/TrailingCommaInArguments instead.
(obsolete configuration found in .rubocop.yml, please update it)

modify test constants
Copy link
Collaborator

@houndci-bot houndci-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

.rubocop.yml: Lint/Eval has the wrong namespace - should be Security
.rubocop.yml: Lint/Eval has the wrong namespace - should be Security
.rubocop.yml: Style/AlignHash has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout
.rubocop.yml: Style/CaseIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/ClosingParenthesisIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/CommentIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLineBetweenDefs has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundBlockBody has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout
.rubocop.yml: Style/ExtraSpacing has the wrong namespace - should be Layout
.rubocop.yml: Style/FirstParameterIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/IndentationWidth has the wrong namespace - should be Layout
.rubocop.yml: Style/LeadingCommentSpace has the wrong namespace - should be Layout
.rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAroundEqualsInParameterDefault has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideBlockBraces has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideParens has the wrong namespace - should be Layout
.rubocop.yml: Style/TrailingBlankLines has the wrong namespace - should be Layout
.rubocop.yml: Style/TrailingWhitespace has the wrong namespace - should be Layout
Error: The Style/TrailingComma cop no longer exists. Please use Style/TrailingCommaInLiteral and/or Style/TrailingCommaInArguments instead.
(obsolete configuration found in .rubocop.yml, please update it)

@FinnChen
Copy link
Author

@supermarin I added a test, but it failed to pass the CI perfomance check. How can I figure out where the time consumed mostly?

Scenario: Performance                                        # features/xcpretty.feature:11
    When I run xcpretty over a big file                        # features/steps/xcpretty_steps.rb:9
    Then the performance should be way faster than running cat # features/steps/xcpretty_steps.rb:27
      XCPretty run time: 3.360620771
      expected: < 2
           got:   3.360620771 (RSpec::Expectations::ExpectationNotMetError)
      ./features/steps/xcpretty_steps.rb:29:in `/^the performance should be way faster than running cat$/'
      features/xcpretty.feature:13:in `Then the performance should be way faster than running cat'
Failing Scenarios:
cucumber features/xcpretty.feature:11 # Scenario: Performance

@FinnChen
Copy link
Author

I compared the performance before and after. The result as follows:

Times Before After
1 1.469656 1.427221
2 1.517956 1.500133
3 1.411207 1.495061
4 1.448256 1.430464
5 1.434422 1.497338
6 1.473103 1.426262
7 1.485095 1.400837
8 1.432081 1.440404
9 1.453107 1.437985
10 1.420841 1.456132

The test environment is:

Mac (27-inch, Late 2013)
Processor 3.5 GHz Intel Core i7
Memory 32 GB 1600 MHz DDR3
macOS Sierra 10.12

The test code is:

def test
	s = Time.now
	out = `cat features/fixtures/xcodebuild.log | xcpretty -c`
	t = Time.now - s
	t
end

10.times.each {|i| puts "#{i+1} : #{test}"}

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

Successfully merging this pull request may close these issues.

None yet

4 participants