Status-react: Initial Mac developer setup is fairly complex in this project

Created on 27 Nov 2017  Â·  16Comments  Â·  Source: status-im/status-react

User Story

As a developer, I want to quickly get setup so that I can start contributing to Status. I also want other developers to be able to quickly get setup for the same reason!

Description

Type: Feature

Summary: When initially checking out this repository and setting it up, I found that there was a lot of setup that needed to happen to even start developing. I feel like instead of manually going through the setup steps, it would be more useful in the long-run to have a script that can bootstrap a dev machine.

Expected behavior

Frictionless setup.

Actual behavior

Lots of steps before you start developing.

Solution

Summary: A script that will setup most/all of your dependencies in an automated way would be nice, and would be my proposed way to do it.

I have an experimental PR up that I can organize/cleanup/make changes to, if it seems like a good starting approach: https://github.com/status-im/status-react/pull/2525

I'm happy to do full end-to-end testing bootstrapping a new Mac machine, a new Linux box, and a new Windows box. These could be separate PRs (aka a first pass might be getting it working for Mac, then Linux, then Windows, assuming those are in priority order).

Some benefits:

  • Instead of maintaining a wiki article, you can just describe dependencies with code. This is a 2-for-1: when dependencies change/update in a PR, the PR can also update the script that fetches/installs the dependencies, and the wiki article won't get out of date
  • As dependencies change, people can re-run the script (it should be idempotent) and quickly get their dev environment back up to par with the latest deps
  • For a new developer stumbling onto the project, I think it's really awesome to just see something like to set this up, just run git clone <repo> && ./setup. Psychologically it makes me think "hey I can quickly start contributing and make a difference, cool!"

  • [ ] Implement first pass on OS X

  • [ ] Test on brand new machine
  • [ ] Get it working on Linux
  • [ ] Get it working on Windows (I really don't know what this entails–do people have Bash via cygwin as a prerequisite, for example?)

Additional Information

  • Status version: all
  • Operating System: all

Logs

None

bounty bounty-s

Most helpful comment

How about doing this in Clojure? It has some benefits:

  • Same language as the main in the repo, so we can access any of the project code.
  • Much more powerful language.

We could use either Lumo (example of script) or Boot (simple example and advanced example ).

All 16 comments

How about doing this in Clojure? It has some benefits:

  • Same language as the main in the repo, so we can access any of the project code.
  • Much more powerful language.

We could use either Lumo (example of script) or Boot (simple example and advanced example ).

I would be willing to help build/test on Windows.

@pablodip feel free to give that a go, I agree with both your reasons. Am unconvinced about the need for things like nvm and rvm, and cljs might help get away from those. That said, whatever is easiest, most intuitive and most generalisable for every kind of developer is what wins here...

@pablodip Using lumo sounds like a nice idea (we already have node as a dependency).
It would be pretty interesting to use it for day-to-day dev workflow which is a little cumbersome too.

Am unconvinced about the need for things like nvm and rvm

Anyone that also does serious Node or Ruby development (as I do, and many others probably do) typically needs to manage multiple versions of node/ruby across many different projects. It gets more complex to deviate from that once they are in place.

Yeah, I actually use and love nvm, but was the offshoot of another discussion. I convinced myself that the way you set up the bash script is good and what I would have done, so am happy to see us move forward with that for now (pending a last review from the developer-xp swarm).

@andytudhope Cool!

i also wanted to try Lumo, so voting for it

i also wanted to try Lumo, so voting for it

I'm looking at Lumo, but not seeing great use cases for bootstrapping a bunch of different dependencies via shell commands. Also the setup requirements currently don't seem to require having a Clojure environment, they're just shell commands to be run in sequence.

Besides "Lumo looks cool, I want to try it" (which is understandable), can someone articulate why this would be a better choice for shell scripting, which Bash does well (and is fairly portable)?

@dbalatero For the particular task you are tackling shell sounds fine to me. IMHO lumo would be perfect to simplify our dev workflow.

@jeluard Ah totally – I'm just getting into the project, but I imagine that could help with stuff that this file deals with? https://github.com/status-im/status-react/blob/develop/run-osx.sh

Exactly!

Balance: 0.000000 ETH
Tokens: SNT: 2000.00
Contract address: 0x3cd0ad8a039a96be7904de99fc3fb7924f20ed08
Network: Mainnet
Paid to: dbalatero

Hey @dbalatero we've got separate issues created for a Linux script and another one for a script to bundle local Status-go and iOS - can you change the issue description to only focus on Mac for this one and we can handle the other ones in separate ref. issues for tracking / bounty purposes.

https://github.com/status-im/status-react/issues/2539

https://github.com/status-im/status-react/issues/2548

@pablanopete done

@dbalatero how can you apply for this bounty ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yenda picture yenda  Â·  52Comments

chadyj picture chadyj  Â·  92Comments

rachelhamlin picture rachelhamlin  Â·  49Comments

flexsurfer picture flexsurfer  Â·  57Comments

churik picture churik  Â·  41Comments