Page MenuHomePhabricator

[Nix] Add bundler for pod install
ClosedPublic

Authored by jon on Nov 8 2022, 10:37 AM.
Tags
None
Referenced Files
F2193245: D5565.id.diff
Thu, Jul 4, 9:29 PM
Unknown Object (File)
Tue, Jul 2, 1:55 PM
Unknown Object (File)
Jun 3 2024, 11:11 AM
Unknown Object (File)
May 26 2024, 6:27 AM
Unknown Object (File)
May 26 2024, 6:27 AM
Unknown Object (File)
May 26 2024, 6:27 AM
Unknown Object (File)
May 26 2024, 6:27 AM
Unknown Object (File)
May 26 2024, 6:26 AM
Subscribers

Details

Reviewers
atul
varun
ashoat
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rCOMMa6f8a2305759: [Nix] Add bundler for pod install
Summary

Allow for bundler to be used for pod install

https://linear.app/comm/issue/ENG-2198

Test Plan
nix develop

which bundle # shound point to nix store

cd native
bundle install

cd ios
bundle exec pod install

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Nov 8 2022, 10:37 AM
ashoat requested changes to this revision.Nov 8 2022, 10:53 AM

One change request, but high-level we probably won't be able to actually update package.json to use bundle exec pod install until we deprecate the existing development workflow, unless we also add installation instructions to the mainline dev environment instructions

native/Gemfile
4 ↗(On Diff #18227)

This file is defined by React Native and occasionally needs to be updated as part of upgrade, so let's avoid modifying it

This revision now requires changes to proceed.Nov 8 2022, 10:53 AM

Should prob add pod deintegrate to the Test Plan somewhere

I think we can use bundle without adding anything to installation instructions? Looks like it gets included with ruby install (included in macOS + via brew)

atul@atuls-MacBook-Pro ios % where bundle
/opt/homebrew/opt/ruby/bin/bundle
/usr/bin/bundle

(might be missing context though)

Was able to successfully go through Test Plan

In D5565#164994, @atul wrote:

I think we can use bundle without adding anything to installation instructions? Looks like it gets included with ruby install (included in macOS + via brew)

atul@atuls-MacBook-Pro ios % where bundle
/opt/homebrew/opt/ruby/bin/bundle
/usr/bin/bundle

(might be missing context though)

Yeah but bundle exec pod install doesn't work without bundler (which is distinct from the bundle command)

Yeah but bundle exec pod install doesn't work without bundler (which is distinct from the bundle command)

Ah gotcha, thanks for clarifying

Yeah but bundle exec pod install doesn't work without bundler (which is distinct from the bundle command)

The nix bundler package exposes both bundle and bundler commands

$ nix build .#bundler
$ ls ./result/bin
bundle  bundler
native/Gemfile
4 ↗(On Diff #18227)

can't, 2.7.4 means == 2.7.4. ~> 2.7.4 means >=2.7.4, <2.8. Nix brings in 2.7.6

native/Gemfile
4 ↗(On Diff #18227)

Okay, that's fair. In that case should native/.ruby-version also be updated? Or is that file meant to be auto-generated or something?

ashoat requested changes to this revision.Nov 10 2022, 1:40 PM

To your queue

This revision now requires changes to proceed.Nov 10 2022, 1:40 PM
jon added inline comments.
native/Gemfile
4 ↗(On Diff #18227)

I'm not super familiar with the best practices for ruby. Seems that rvm and rbenv are the tools which watch for this, but those aren't present in the nix environment.

However, I think having alignment between environments makes more sense than less alignment between them. So I'll update the version pin.

jon marked an inline comment as done.

Update native/.ruby-version

This revision is now accepted and ready to land.Nov 14 2022, 6:44 AM
This revision was landed with ongoing or failed builds.Nov 14 2022, 6:49 AM
This revision was automatically updated to reflect the committed changes.