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 build --local" skips ignored files (.gitignore) #2594

Open
crutch12 opened this issue Sep 23, 2024 · 1 comment
Open

"eas build --local" skips ignored files (.gitignore) #2594

crutch12 opened this issue Sep 23, 2024 · 1 comment

Comments

@crutch12
Copy link

crutch12 commented Sep 23, 2024

Build/Submit details page URL

No response

Summary

eas build --local command skips ignored filed (.gitignore)

Why does it happen? It's strange behaviour

Managed or bare?

bare

Environment

[RUN_EXPO_DOCTOR] Running "expo doctor"
[RUN_EXPO_DOCTOR] Running 14 checks on your project...
[RUN_EXPO_DOCTOR] ✔ Check Expo config for common issues
[RUN_EXPO_DOCTOR] ✔ Check package.json for common issues
[RUN_EXPO_DOCTOR] ✔ Check dependencies for packages that should not be installed directly
[RUN_EXPO_DOCTOR] ✔ Check npm/ yarn versions
[RUN_EXPO_DOCTOR] ✔ Check if the project meets version requirements for submission to app stores
[RUN_EXPO_DOCTOR] ✖ Check for app config fields that may not be synced in a non-CNG project
[RUN_EXPO_DOCTOR] ✔ Check for common project setup issues
[RUN_EXPO_DOCTOR] ✔ Check Expo config (app.json/ app.config.js) schema
[RUN_EXPO_DOCTOR] ✔ Check native tooling versions
[RUN_EXPO_DOCTOR] ✔ Check for issues with metro config
[RUN_EXPO_DOCTOR] ✔ Check that native modules do not use incompatible support packages
[RUN_EXPO_DOCTOR] ✔ Check for legacy global CLI installed locally
[RUN_EXPO_DOCTOR] ✖ Check that packages match versions required by installed Expo SDK
[RUN_EXPO_DOCTOR] This project contains native project folders but also has native configuration properties in app.json, indicating it is configured to use Prebuild. When the android/ios folders are present, EAS Build will not sync the following properties: orientation, icon, userInterfaceStyle, splash, ios, android.
[RUN_EXPO_DOCTOR] ✔ Check that native modules use compatible support package versions for installed Expo SDK
[RUN_EXPO_DOCTOR] The following packages should be updated for best compatibility with the installed expo version:
[RUN_EXPO_DOCTOR] Detailed check results:
[RUN_EXPO_DOCTOR]   [email protected] - expected version: ~5.3.3
[RUN_EXPO_DOCTOR] Advice: Add '/android' and '/ios' to your .gitignore file if you intend to use CNG / Prebuild. Learn more: https://docs.expo.dev/workflow/prebuild/#usage-with-eas-build
[RUN_EXPO_DOCTOR] Your project may not work correctly until you install the expected versions of the packages.
[RUN_EXPO_DOCTOR] 
[RUN_EXPO_DOCTOR] Found outdated dependencies
[RUN_EXPO_DOCTOR] Advice: Use 'npx expo install --check' to review and upgrade your dependencies.
[PREPARE_CREDENTIALS] Preparing credentials
[RUN_EXPO_DOCTOR] One or more checks failed, indicating possible issues with the project.
[RUN_EXPO_DOCTOR] Command "expo doctor" failed.

Error output

[RUN_FASTLANE] ❌  Undefined symbols for architecture arm64
┌─ Symbol: _OBJC_CLASS_$_BLEAdvertiser
└─ Referenced from: in libreact-native-esmart.a[4](MyAppDelegate.o)

[RUN_FASTLANE] 
❌  ld: symbol(s) not found for architecture arm64


[RUN_FASTLANE] 
❌  clang: error: linker command failed with exit code 1 (use -v to see invocation)

This error occures because static library file (.a) is not included in build dir (skipped by .gitignore)

Reproducible demo or steps to reproduce from a blank project

❌ Github Action - eas build --local fails, because .a file ignored (with .gitignore)
https://github.com/crutch12/expo-esmart-test/actions/runs/10992514166

✅ And this action works if I remove file from .gitignore
https://github.com/crutch12/expo-esmart-test/actions/runs/10992531702

@crutch12 crutch12 added the needs review Issue is ready to be reviewed by a maintainer label Sep 23, 2024
@szdziedzic
Copy link
Member

Why does it happen? It's strange behaviour

Local builds aim to emulate the behavior of EAS cloud builds. This is just an EAS cloud build process happening on your local machine (with some limitations). As of today it also follows the .gitignore the same way cloud builds do, which is on purpose to make it work very similar to cloud ones to be useful for debugging purposes. We can consider adding a special option ignoring .gitignore in the future, however, I can't promise anything here because our team is currently under a heavy workload. If you want to ignore a different set of files for your EAS build that is excluded by your .gitignore you can use .easignore https://docs.expo.dev/build-reference/easignore/. You can also use npx expo run:[ios|android] to create builds that don't respect the .gitignore file.

@szdziedzic szdziedzic added eas build and removed needs review Issue is ready to be reviewed by a maintainer labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants