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

Remove unnecessary call to fixSimCtlList in showsdks #221

Merged
merged 1 commit into from Sep 20, 2017

Conversation

Projects
None yet
2 participants
@kelvindart

kelvindart commented Sep 20, 2017

At the moment, a call to

ios-sim showsdks

Fails to run with the error:

Cannot convert undefined or null to object

The call to fixSimCtlList(...) is unrequired. This references two properties in regards to the simulators: devicetypes and devices. We are concerned with the SDKs, not simulators at this point, so the call is unnecessary.

More details in the bug report: #220.

@shazron

This comment has been minimized.

Show comment
Hide comment
@shazron

shazron Sep 20, 2017

Ouch, my bad. I'm going to write unit tests first before pulling this in so this doesn't happen again...

shazron commented Sep 20, 2017

Ouch, my bad. I'm going to write unit tests first before pulling this in so this doesn't happen again...

@kelvindart

This comment has been minimized.

Show comment
Hide comment
@kelvindart

kelvindart Sep 20, 2017

@shazron - ha, I noticed you was working late that night fixing the Xcode 9 issues... it's permissible 😉

kelvindart commented Sep 20, 2017

@shazron - ha, I noticed you was working late that night fixing the Xcode 9 issues... it's permissible 😉

@kelvindart

This comment has been minimized.

Show comment
Hide comment
@kelvindart

kelvindart Sep 20, 2017

Btw, I haven't checked whether the other references to fixSimCtlList are valid. I will do so now.

kelvindart commented Sep 20, 2017

Btw, I haven't checked whether the other references to fixSimCtlList are valid. I will do so now.

@kelvindart

This comment has been minimized.

Show comment
Hide comment
@kelvindart

kelvindart Sep 20, 2017

@shazron - I have just checked, from what I can tell, the other calls are fine.

Ironically, the issue is because showsdks passes the runtimes filter to simctl via the options parameter. I was digging around in that repo, and as a result, when it runs xcrun simctl list runtimes --json, it removes every other key from the returned JSON object, I'm not sure where this changed.

Other calls to simctl do not specify a filter, so everything is returned.

However, I believe this to now be fine. I would assist with the unit tests but that is less my forte. 😅

kelvindart commented Sep 20, 2017

@shazron - I have just checked, from what I can tell, the other calls are fine.

Ironically, the issue is because showsdks passes the runtimes filter to simctl via the options parameter. I was digging around in that repo, and as a result, when it runs xcrun simctl list runtimes --json, it removes every other key from the returned JSON object, I'm not sure where this changed.

Other calls to simctl do not specify a filter, so everything is returned.

However, I believe this to now be fine. I would assist with the unit tests but that is less my forte. 😅

@shazron shazron merged commit f50e56b into ios-control:master Sep 20, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment