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

Add bundle and ruby-version to the underscored files #1530

Merged
merged 1 commit into from
Jan 20, 2022

Conversation

cortinico
Copy link
Member

Summary:

While working with RN 0.67, I've just noticed that we have two _ prefixed files in a newly generate project from the template with the yarn react-native init ... command.

That's how a ls -la on a new template looks like:

-rw-r--r--    1 ncor  staff     114 Jan 20 12:20 .buckconfig
-rw-r--r--    1 ncor  staff      74 Jan 20 12:20 .eslintrc.js
-rw-r--r--    1 ncor  staff    1410 Jan 20 12:20 .flowconfig
-rw-r--r--    1 ncor  staff     821 Jan 20 12:20 .gitignore
-rw-r--r--    1 ncor  staff     144 Jan 20 12:20 .prettierrc.js
-rw-r--r--    1 ncor  staff       2 Jan 20 12:20 .watchmanconfig
-rw-r--r--    1 ncor  staff    2465 Jan 20 12:20 App.js
-rw-r--r--    1 ncor  staff     168 Jan 20 12:20 Gemfile
-rw-r--r--    1 ncor  staff    2413 Jan 20 12:20 Gemfile.lock
drwxr-xr-x    3 ncor  staff      96 Jan 20 12:20 __tests__
drwxr-xr-x    3 ncor  staff      96 Jan 20 12:26 _bundle
-rw-r--r--    1 ncor  staff       6 Jan 20 12:20 _ruby-version
drwxr-xr-x    9 ncor  staff     288 Jan 20 12:20 android
-rw-r--r--    1 ncor  staff      53 Jan 20 12:20 app.json
-rw-r--r--    1 ncor  staff      77 Jan 20 12:20 babel.config.js
-rw-r--r--    1 ncor  staff     183 Jan 20 12:20 index.js
drwxr-xr-x    9 ncor  staff     288 Jan 20 12:22 ios
-rw-r--r--    1 ncor  staff     299 Jan 20 12:20 metro.config.js
drwxr-xr-x  620 ncor  staff   19840 Jan 20 12:21 node_modules
-rw-r--r--    1 ncor  staff     673 Jan 20 12:20 package.json
-rw-r--r--    1 ncor  staff  294134 Jan 20 12:21 yarn.lock

The _bundle folder and the _ruby-version file should be dot files instead. This PR attemptes to fix this.

cc @kelset

Test Plan:

I'm unsure how am I supposed to test this. Is the CI result sufficient or should I create a local version of the CLI and testing on my machine?

@thymikee
Copy link
Member

Looks like we don't have a test for copying these files. I recall we used to have it in __e2e__/legacyInit.test.ts test, but we disabled it due to flakiness. And in __e2e__/init.test.ts we test with custom template to not hit network, reducing flakiness. Happy to accept a unit or e2e test that would verify copying these special files :)

@thymikee thymikee merged commit bff545e into master Jan 20, 2022
@thymikee thymikee deleted the nc/ruby-version branch January 20, 2022 13:05
cortinico referenced this pull request in facebook/react-native Jan 20, 2022
Summary:
Implement par of the discussion react-native-community/discussions-and-proposals#411, except the `.nvmrc` part, this includes:
 - Setting `.ruby-version` in the main project and also `template/`
 - Fixing the CocoaPods version with a project-level `Gemfile` and also `template/Gemfile`
 - Using all `pod` executions from `bundle exec pod`, using the determined version
 - Script to manage and update the ruby version

## Changelog

[iOS] [Added] - Gemfile with CocoaPods 1.11 and ruby-version (2.7.4)

Pull Request resolved: #32303

Test Plan: Build for iOS and run all CircleCI tests to see if nothing changed

Reviewed By: RSNara

Differential Revision: D31344686

Pulled By: fkgozali

fbshipit-source-id: 25c63131ca9b16d3cf6341019548e0d63bdcaefe
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.

2 participants