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

[eas-json] add experimental.disableBundleIdValidation flag #263

Merged
merged 1 commit into from
Mar 4, 2021

Conversation

wkozyra95
Copy link
Contributor

@wkozyra95 wkozyra95 commented Mar 3, 2021

Checklist

Why

https://linear.app/expo/issue/ENG-357/support-for-schemes-with-different-bundle-identifiers-in-generic-apps

How

  • if experimental.disableBundleIdValidation is set then skip bundleIdedentifier validation or configuration
  • user needs to specify a scheme explicitly
  • this solution is not enough to support multiple slugs if you use expo-updates, because there is only one file that contains URL to project, build will work but configure will override project URL with new slug

Test Plan

build and build configure on https://github.com/brentvatne/myapp

@wkozyra95 wkozyra95 requested a review from dsokal March 3, 2021 10:22
@github-actions
Copy link

github-actions bot commented Mar 3, 2021

Size Change: -656 B (0%)

Total Size: 32.8 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 32.8 MB -656 B (0%)

compressed-size-action

@wkozyra95 wkozyra95 force-pushed the @wkozyra95/support-multiple-bundle-identifiers branch from 3a0ffd3 to 1ae4ed4 Compare March 3, 2021 11:49
@dsokal dsokal requested a review from brentvatne March 3, 2021 12:07
CHANGELOG.md Outdated
@@ -8,6 +8,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🎉 New features

- add `experimental.disableBundleIdValidation` flag to eas.json ([#263](https://github.com/expo/eas-cli/pull/263) by [@wkozyra95](https://github.com/wkozyra95))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- add `experimental.disableBundleIdValidation` flag to eas.json ([#263](https://github.com/expo/eas-cli/pull/263) by [@wkozyra95](https://github.com/wkozyra95))
- Add `experimental.disableBundleIdValidation` flag to eas.json. ([#263](https://github.com/expo/eas-cli/pull/263) by [@wkozyra95](https://github.com/wkozyra95))

@@ -102,6 +102,9 @@ const schemaBuildProfileMap: Record<string, Record<string, Joi.Schema>> = {
};

const EasJsonSchema = Joi.object({
experimental: Joi.object({
disableBundleIdValidation: Joi.boolean(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
disableBundleIdValidation: Joi.boolean(),
disableIosBundleIdValidation: Joi.boolean(),

Maybe this is a better name to indicate this is for iOS.

return {
builds: {
...(androidConfig ? { android: androidConfig } : {}),
...(iosConfig ? { ios: iosConfig } : {}),
...(iosConfig ? { ios: { ...iosConfig, ...experimental } } : {}),
Copy link
Contributor

Choose a reason for hiding this comment

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

What if we add another field to the experimental object? I'd prefer explicitly choosing all relevant keys from the object.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or maybe we shouldn't merge it into the ios object, and instead, return an object of a similar structure as eas.json?


const disableBundleIdValidation = (await new EasJsonReader(ctx.projectDir, 'all').readRawAsync())
?.experimental?.disableBundleIdValidation;
console.log(disableBundleIdValidation);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log(disableBundleIdValidation);

@wkozyra95 wkozyra95 force-pushed the @wkozyra95/support-multiple-bundle-identifiers branch from 1ae4ed4 to 7c82528 Compare March 3, 2021 12:39
@wkozyra95 wkozyra95 requested a review from dsokal March 3, 2021 13:05
packages/eas-json/src/EasJsonReader.ts Outdated Show resolved Hide resolved
@wkozyra95 wkozyra95 force-pushed the @wkozyra95/support-multiple-bundle-identifiers branch from 07ebddb to 464fd4c Compare March 4, 2021 09:04
@wkozyra95 wkozyra95 merged commit 8113450 into main Mar 4, 2021
@wkozyra95 wkozyra95 deleted the @wkozyra95/support-multiple-bundle-identifiers branch March 4, 2021 14:12
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.

3 participants