Skip to content

Fix linting when armv7 is included but i386 isn't - #8159

Merged
dnkoutso merged 1 commit into
CocoaPods:masterfrom
paulb777:i386exclude
Oct 10, 2018
Merged

dnkoutso merged 1 commit into
CocoaPods:masterfrom
paulb777:i386exclude

Conversation

@paulb777

@paulb777 paulb777 commented Oct 4, 2018

Copy link
Copy Markdown
Member

Fix #8129

I verified the bug report is fixed by this. If unit tests are needed, I'd appreciate tips on the right approach.

@dnkoutso dnkoutso added this to the 1.6.0 milestone Oct 4, 2018
@dnkoutso

dnkoutso commented Oct 4, 2018

Copy link
Copy Markdown
Contributor

Super agree validator is a tough class to write tests for...there are some though that print out the command so I think you might be able to copy-paste an existing one and verify the parameters passed are correct.

@paulb777

paulb777 commented Oct 4, 2018

Copy link
Copy Markdown
Member Author

Yeah, I found a test that is close at https://github.com/CocoaPods/CocoaPods/blob/master/spec/unit/validator_spec.rb#L622, but I couldn't figure out how to set or mock the architectures, like
validator.consumer.spec.attributes_hash['pod_target_xcconfig'] = { 'VALID_ARCHS' => 'x86_64 armv7 arm64'}

Comment thread lib/cocoapods/validator.rb Outdated
when :ios
command += %w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator)
command += Fourflusher::SimControl.new.destination(:oldest, 'iOS', deployment_target)
xcconfig = consumer.spec.attributes_hash['pod_target_xcconfig']

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You want to use consumer.pod_target_xcconfig here as it will take care of merging values etc. See https://github.com/CocoaPods/Core/blob/master/lib/cocoapods-core/specification/consumer.rb#L99-L102

@dnkoutso

dnkoutso commented Oct 5, 2018

Copy link
Copy Markdown
Contributor

@paulb777 needs a rebase and it should be OK

@paulb777

paulb777 commented Oct 5, 2018

Copy link
Copy Markdown
Member Author

Done. Thanks @dnkoutso!

@dnkoutso
dnkoutso merged commit acc6e62 into CocoaPods:master Oct 10, 2018
mklim pushed a commit to flutter-team-archive/plugins that referenced this pull request Sep 30, 2019
- Limit the supported podspec platform to iOS so tests don't run (and fail) for macOS.
- Define the module by setting `DEFINES_MODULE` in the podspec.  See [CocoaPod modular headers docs](http://blog.cocoapods.org/CocoaPods-1.5.0/).
- Explicitly set `VALID_ARCHS` to architectures included in the Flutter universal binary.  This is the CocoaPods-suggested workaround to prevent tests from running on the i386 simulator.  See CocoaPods/CocoaPods#8159.
Vallasc pushed a commit to Vallasc/camera_plugin that referenced this pull request Nov 9, 2019
- Limit the supported podspec platform to iOS so tests don't run (and fail) for macOS.
- Define the module by setting `DEFINES_MODULE` in the podspec.  See [CocoaPod modular headers docs](http://blog.cocoapods.org/CocoaPods-1.5.0/).
- Explicitly set `VALID_ARCHS` to architectures included in the Flutter universal binary.  This is the CocoaPods-suggested workaround to prevent tests from running on the i386 simulator.  See CocoaPods/CocoaPods#8159.
mormih pushed a commit to mormih/plugins that referenced this pull request Nov 17, 2019
- Limit the supported podspec platform to iOS so tests don't run (and fail) for macOS.
- Define the module by setting `DEFINES_MODULE` in the podspec.  See [CocoaPod modular headers docs](http://blog.cocoapods.org/CocoaPods-1.5.0/).
- Explicitly set `VALID_ARCHS` to architectures included in the Flutter universal binary.  This is the CocoaPods-suggested workaround to prevent tests from running on the i386 simulator.  See CocoaPods/CocoaPods#8159.
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
- Limit the supported podspec platform to iOS so tests don't run (and fail) for macOS.
- Define the module by setting `DEFINES_MODULE` in the podspec.  See [CocoaPod modular headers docs](http://blog.cocoapods.org/CocoaPods-1.5.0/).
- Explicitly set `VALID_ARCHS` to architectures included in the Flutter universal binary.  This is the CocoaPods-suggested workaround to prevent tests from running on the i386 simulator.  See CocoaPods/CocoaPods#8159.
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.

Undefined symbols for architecture i386 even though it's omitted from VALID_ARCHS

3 participants