jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Dev Environment instructions improvement needed

Open gibrown opened this issue 3 years ago • 16 comments

Impacted plugin

None / Other

Steps to Reproduce

Here's a story where I want to install Jetpack for local development on my brand new, perfectly clean macbook pro.

  1. I start out at https://github.com/Automattic/jetpack#installation-from-git-monorepo which then points me at https://github.com/Automattic/jetpack/blob/master/docs/development-environment.md and at https://github.com/Automattic/jetpack/blob/master/docs/development-environment.md#docker-supported-recommended (and also has a couple of random instructions with fake paths that may or may not be relevant)
  2. So I go to https://github.com/Automattic/jetpack/blob/master/docs/development-environment.md and the first thing it says is to then go to the Docker stuff: https://github.com/Automattic/jetpack/blob/master/docs/development-environment.md#running-jetpack-locally (and a bunch of other methods that are unsupported but for some reason still documented here).
  3. So then I go to https://github.com/Automattic/jetpack/blob/master/tools/docker/README.md and see the prerequisites, the first of which is literally point me back to the document in step 2 to clone the repo. So back to https://github.com/Automattic/jetpack/blob/master/docs/development-environment.md and clone the repo.
  4. Then I guess back to the Docker instructions, and install Docker.
  5. Then the next "prerequisite" for Docker is to install Jetpack's required tools at https://github.com/Automattic/jetpack/blob/master/docs/development-environment.md#install-development-tools (wasn't I already trying to do that with Docker?)
  6. I go and install nvm (even though using nvm is for some reason the last line, and we don't even really say what version or how). And then pnpm, and composer, and maybe PHP (but I guess not since I am using Docker).
  7. Then I am directed to https://github.com/Automattic/jetpack/blob/master/tools/cli/README.md to install the Jetpack CLI. This step by the way didn't really work even though it seemed to work. It sounds like a known current bug though so I'll just have to use pnpx jetpack. (By this point I am also cursing everyone)
  8. I go back to https://github.com/Automattic/jetpack/blob/master/docs/development-environment.md#check-if-your-environment-is-ready-for-jetpack-development. I forget that I got there from the Docker documentation because that was hours ago, so I try to run the check dev environment. Things are mostly working, except that confusing jetpack cli stuff which I guess i can ignore. (I still haven't gotten back to Docker as of this writing btw, but now that I am trying to dissect the documentation I am realizing I never even got to the "quick start" at https://github.com/Automattic/jetpack/blob/master/tools/docker/README.md#quick-start which doesn't really look sufficient and I probably actually need to go to https://github.com/Automattic/jetpack/blob/master/tools/docker/README.md#quick-install-wordpress).
  9. The next step seems to be to build my project (https://github.com/Automattic/jetpack/blob/master/docs/development-environment.md#building-your-project). So I run jetpack build. Which then prompts me what to build for. I try the sync package since that is what I am trying to work on. That fails miserably.
  10. There isn't much more in this section. Oh this next section is unit testing, maybe I can try and run the unit tests and that will help me debug what is going on. jetpack docker phpunit. Oh ya that doesn't run at all despite my dev environment supposedly working.
  11. Let's trying running the lint tools that should be simpler right? huh... composer install ok why didn't this get run earlier but alright. composer phpcs:lint ... huh everything is just errors.

A clear and concise description of what you expected to happen.

I expected to become productive doing Jetpack development.

What actually happened

I started writing my farewellp2 post. :)

Other information

No response

Operating System

macOS

OS Version

MacOS 12.0.1

Browser

Chrome/Chromium

Browser Version(s)

No response

gibrown avatar Dec 09 '21 03:12 gibrown