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

chore: Migrate doctor command to TypeScript (3) #719

Merged

Conversation

thib92
Copy link
Contributor

@thib92 thib92 commented Sep 13, 2019

Summary:

Finish the healthchecks migration to TS, continuing the work from #712 and #716 (linked to #683):

  • androidSDK
  • iosDeploy
  • nodeJs
  • packageManagers
  • watchman

Test Plan:

  • CI is green ✅
  • The changes made make sense

@thib92
Copy link
Contributor Author

thib92 commented Sep 13, 2019

Tests are failing because of the androidSdk healthcheck, because here:

https://github.com/thib92/react-native-cli/blob/2ff26561138c1a7c4e71687dc0a12d4f00f20b9b/packages/cli/src/commands/doctor/healthchecks/androidSDK.ts#L20

We check for sdks === 'Not Found', but it is never the case as the typings describe them as:

'Android SDK': {
  'API Levels': string[];
  'Build Tools': string[];
  'System Images': string[];
  'Android NDK': string;
};

@lucasbento do you know if 'Not Found' is actually a possible value for the Android SDK key?

@thymikee
Copy link
Member

@thib92 I think envinfo may output a string "Not Found" when a certain required environment info is not available (looks like it happens on Windows at least, but make sure to check the envinfo codebase or typings)

@thib92
Copy link
Contributor Author

thib92 commented Sep 13, 2019

Thanks @thymikee, I’ll take a look!

@lucasbento
Copy link
Member

do you know if 'Not Found' is actually a possible value for the Android SDK key?

@thib92: yeah, it is, you can check it out here.

@thib92
Copy link
Contributor Author

thib92 commented Sep 13, 2019

Thanks. I’ll update the typings then.

'System Images': string[];
'Android NDK': string;
};
'Android SDK':
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ideally, we should contribute these typings to the envinfo repo. There are no typings yet in there. There is an ongoing PR, but the typings are quite incomplete.

@thib92
Copy link
Contributor Author

thib92 commented Sep 13, 2019

CI is failing but doesn't seem related 🤔

@thib92
Copy link
Contributor Author

thib92 commented Sep 14, 2019

@thymikee is there a way to "try again" on Azure Pipeline? I ran the E2E tests locally and they worked. It might just be an "infrastructure bug" while it ran the test.

@Esemesek
Copy link
Member

@thib92 Tests on Windows seem to fail every now and then. I wouldn't care too much C:

Copy link
Member

@Esemesek Esemesek left a comment

Choose a reason for hiding this comment

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

LGTMT. Thank you for your contribution <3

@Esemesek Esemesek merged commit 73a1979 into react-native-community:master Sep 14, 2019
@thib92
Copy link
Contributor Author

thib92 commented Sep 14, 2019

@Esemesek I guess you figured it out after the comments, but the function types are not needed here because we already have the HealthCheckInterface, so everything is implicit 😄

@Esemesek
Copy link
Member

@thib92 Yup. Figured it out C:

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