Skip to content

Conversation

pRizz
Copy link
Contributor

@pRizz pRizz commented May 26, 2016

This PR adds the ability to inhibit swift warnings for pod targets. This is related to issue 5290.

Even without my changes, many unit tests fail locally. Why is that?

@pRizz
Copy link
Contributor Author

pRizz commented May 26, 2016

I'm assuming I will have to add a Changelog comment, correct?

@orta
Copy link
Member

orta commented May 26, 2016

Please, you can see the format in this PR: #5413

'$(inherited)',
quote(%w(-D COCOAPODS)),
(quote(%w(-suppress-warnings)) if target.try(:inhibit_warnings?) || false),
].compact.join(' '),
Copy link
Member

Choose a reason for hiding this comment

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

Why not make an array var for the flags and conditionally append to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm good with that. Then we don't need to compact

'OTHER_SWIFT_FLAGS' => '$(inherited) ' + quote(%w(-D COCOAPODS)),
}
other_swift_flags = ['$(inherited)', quote(%w(-D COCOAPODS))]
other_swift_flags += [quote(%w(-suppress-warnings))] if target.try(:inhibit_warnings?)
Copy link
Member

Choose a reason for hiding this comment

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

can be other_swift_flags << quote(%w(-suppress-warnings)) if target.inhibit_warnings?

@segiddins
Copy link
Member

👍 with test

@pRizz
Copy link
Contributor Author

pRizz commented May 27, 2016

@segiddins, when I run the tests using rake, I get 46 failures, and they all look like missing double quotes, which obviously, I did not cause. They were failing even before my commits. What kind of environment do I need to get it to run properly? I am using

  • ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
  • rake, version 10.5.0
  • Xcode 7.3, Build version 7D175

Also, all the unit tests pass and all the errors happen in the integration tests.

...
 - Debug:
     Build Settings:
       ALWAYS_SEARCH_USER_PATHS: 'NO'
-      ARCHS: $(ARCHS_STANDARD_64_BIT)
+      ARCHS: "$(ARCHS_STANDARD_64_BIT)"
       CLANG_CXX_LANGUAGE_STANDARD: gnu++0x
       CLANG_CXX_LIBRARY: libc++
       CLANG_WARN_CONSTANT_CONVERSION: 'YES'
       GCC_OPTIMIZATION_LEVEL: '0'
       GCC_PREPROCESSOR_DEFINITIONS:
       - DEBUG=1
-      - $(inherited)
+      - "$(inherited)"
       GCC_SYMBOLS_PRIVATE_EXTERN: 'NO'
       GCC_WARN_64_TO_32_BIT_CONVERSION: 'YES'
       GCC_WARN_ABOUT_RETURN_TYPE: 'YES'
 - Release:
     Build Settings:
       ALWAYS_SEARCH_USER_PATHS: 'NO'
-      ARCHS: $(ARCHS_STANDARD_64_BIT)
+      ARCHS: "$(ARCHS_STANDARD_64_BIT)"
       CLANG_CXX_LANGUAGE_STANDARD: gnu++0x
       CLANG_CXX_LIBRARY: libc++
       CLANG_WARN_CONSTANT_CONVERSION: 'YES'
...

@segiddins
Copy link
Member

@pRizz don't worry about those

@pRizz
Copy link
Contributor Author

pRizz commented May 27, 2016

It should be good now 👍

@segiddins
Copy link
Member

@mrackwitz look good to you?

@neonichu
Copy link
Member

LGTM 👍

@pRizz
Copy link
Contributor Author

pRizz commented Jun 2, 2016

Bump

@segiddins segiddins merged commit d897a3d into CocoaPods:master Jun 5, 2016
@orta
Copy link
Member

orta commented Jun 5, 2016

🎉

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.

4 participants