-
Notifications
You must be signed in to change notification settings - Fork 1k
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
New contributor workflow #1792
New contributor workflow #1792
Conversation
677afa4
to
6b66c9f
Compare
@dac09 super excited to try this out! Confirming the steps are:
Here's a tape of me trying out a new setup command I'm working on. The repo doesn't seem to pick it up. Did I miss anything obvious? https://s.tape.sh/aIoTMMq2 |
Your process Looks fine to me Dom! Not sure why it's not coming through. Could you try: |
Weird. I've been using this to test itself (does that make any sense?!) Probably missed something. I'll try it out more on Monday! |
Ah, I can see why. When you build using the PR flow, it adds @rw/cli to your dev dependencies. For some reason this takes precedence over your locally linked packages. Once I removed this dependency form package.json and yarn'd, it all came through fine :) https://s.tape.sh/zfsZSxa6 Tldr; this is difficult to test with the PR flow. Steps
If/once this is part of the redwood releases, you'll only need to run step 2. Edit: updated based on comments below |
@dac09 This is great! Would make the experience so much better :) Are there certain cases you'd like people to test? |
@dac09 Those steps worked great! One thing I wanted to add: at the end you'll most likely have to make the |
I definitely added the chmod inside the watcher... so everytime cli, apiserver and devserver builds, they get chmodded. I wonder why they hadn't in this case? |
@dac09 You chmod dist/index.js, not the actual |
OH! I know why. It's because the changes to the build folder also need to be checked out in your local redwood repo LOL. This is so meta! So without the changes to the build process in your local repo, it won't chmod automatically :) |
@dac09 I was just about to post that 🙈 I'll double check this assumption with checkout out this PR in my RW reop. |
6b66c9f
to
9808dbc
Compare
Headsup 👒, I just rebased my branch. Now added @jvanbaarsen, @jtoar any chance you guys can see why
|
@dac09 Your assumption was right! After checking out this PR as my RW base it works like a charm :) Also seeing the packages/packages thing though |
@dac09 Can it be that because you're linking |
I don't htink so @jvanbaarsen, the build is running in the redwood repo, not the actual project (cwd is set to frameworkPath). You can also do each of those steps manually, the function really isn't doing anything special. |
@dac09 What is the reason --edit: Nevermind, that is something new that is added in the newest release |
@dac09 I got the problem I think :-) We need to add a check to see if the symlink is already present. If that is the case we should not create it. You can verify this assymption by removing the symlink, and then run this twice:
|
@jvanbaarsen probably just a limitation of the way I work, I'm used to making changes in one place then context switching to the other, so I don't feel like I need to |
I can add a flag so you can run |
I ran into issues last time I tried cpw in Windows. Something about files being in use by another process. But when I tried yesterday with Should the flag be |
Although I've added |
Btw - I've added to the added benefits section, I've found more cases where this can be useful! |
…rib-workspaces * 'main' of github.com:redwoodjs/redwood: Prerender Part 1 & 2: Render landing/marketing/static pages + Private page whileLoading (redwoodjs#1641)
Yeah, I think you're right, yargs does that, doesn't it? 👍 |
#TIL! |
@Tobbe Yes! I actually got tripped up by this after someone created an issue with the --no-watch flag for the |
@dac09 What is currently holding us back in merging this? Is there anything I can do to speed this up a bit more? |
Just trying to minimise changes going into the release :) |
@jvanbaarsen I also noticed this failing when I try it using canary. Something about the svgo binary not found (introduced in prerender image handling with Babel-plugin-inline-svg). Could you please see if you face the same problem? |
@dac09 I was just about to test this and then realised I'm unsure what you mean with Canary? You either use Canary or the PR release right? There is no way to use both of them at the same time? |
…rib-workspaces * 'main' of github.com:redwoodjs/redwood: Lint the create-redwood-app template. (redwoodjs#1822) Update typescript lint rule for no-unused-vars (redwoodjs#1808) Router: Fix TS types (redwoodjs#1823) Generate globals for routes (redwoodjs#1744) Ethereum auth update to v0.2.1 (redwoodjs#1807) Better messages when no routes marked with prerender (redwoodjs#1821) Feature/prerender image support (redwoodjs#1721) Fix entry js | Make index a little more readable, as it confuses people (redwoodjs#1819) use 'prisma' in place of '@prisma/cli' (redwoodjs#1800)
Hey @jvanbaarsen sorry for not being clear! I've just updated the branch (merging main into this). What we'll need to test is the latest PR build (once its updated). |
@thedavidprice think this is ready for prime time. Shall we get it into 0.26? Docs are covered here: #1803 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not able to get this working using the instructions provided by @dac09 in this comment.
I can get the initial yarn rwt link ...
to run. But not commands. I'm also seeing endless build:watch process:
Screen.Recording.2021-02-22.at.4.19.27.PM.mov
@thedavidprice I think you need to have your rw framework checked out to @dac09's branch (At least that's what I had to do to fix the build loop)
|
@thedavidprice as Tobbe said, the infinite loop is caused by an existing bug in the build process. (Try this on any other branch, |
… fix/dm-babel-register * 'fix/dm-babel-register' of github.com:dac09/redwood: Remove bundlesize dependency (redwoodjs#1844) upgrade execa; fix test.js cwd (redwoodjs#1846) Make ESLint configuration aware of "env." (redwoodjs#1827) Use createMany in Seed database example (redwoodjs#1776) Docs: Update contributor workflow to yarn rwt link (redwoodjs#1803) fix(page-loader): Adds types for pageLoadingContext | Fix for pageLoader during prerender (redwoodjs#1832) Minify CSS in production builds (redwoodjs#1697) New contributor workflow (redwoodjs#1792) Improve/template and auth setup tests (redwoodjs#1834)
Introduces new contributor workflow (without removing old
copy:watch
flow)In order to contribute from a project now, you simply need to run
yarn rwt link [RW_PATH]
This will ask to setup your workspaces, and create the symlink for you. It willl also build and watch the redwood repo, so no need to build using another separate terminal session.
Once you're done, and you want to restore, you run
yarn rwt restore
Need input
rwt link
intuitive? Or should we call it something else? This is meant to be like npm link, yarn linkrwt restore
->rwt unlink
? I don't like unlink for some reasonOther benefits
yarn rw setup
stuff, without breaking the contribution workflowPreview of what it looks like:
https://s.tape.sh/NSEQV6FH