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

#40: Add turbo and pnpm syncing support #119

Merged
merged 4 commits into from
Apr 6, 2023
Merged

Conversation

ynotdraw
Copy link
Contributor

@ynotdraw ynotdraw commented Apr 4, 2023

🚀 Description

This PR adds turbo and pnpm syncing to match ember-headless-form. This PR should align with what is in CrowdStrike/ember-headless-form#52.

This cuts CI time by ~2mins, or in half!

Closes #40


🔬 How to Test

No visual changes, all CI related

  • Green build

📸 Images/Videos of Functionality

N/A

@ynotdraw ynotdraw self-assigned this Apr 4, 2023
@ynotdraw ynotdraw linked an issue Apr 4, 2023 that may be closed by this pull request
@changeset-bot
Copy link

changeset-bot bot commented Apr 4, 2023

⚠️ No Changeset found

Latest commit: 43facb4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ynotdraw ynotdraw changed the title Add turbo and pnpm syncing support #40: Add turbo and pnpm syncing support Apr 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

Preview URLs

Env: preview
Docs: https://1e659abb.ember-toucan-core.pages.dev

@ynotdraw ynotdraw force-pushed the 40-add-turbo-+-pnpm-syncing branch from 1a4d1eb to ea8cb93 Compare April 4, 2023 18:39
@ynotdraw ynotdraw force-pushed the 40-add-turbo-+-pnpm-syncing branch from ea8cb93 to 87acf26 Compare April 4, 2023 18:46
@ynotdraw ynotdraw marked this pull request as ready for review April 4, 2023 18:54
Comment on lines -157 to -168
TypecheckDocs:
name: Typecheck Docs
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: ./.github/actions/pnpm
- uses: ./.github/actions/download-built-package
- run: pnpm glint
working-directory: docs-app
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now accomplished with the lint step above instead of being in a separate step 🎉

- uses: marocchino/sticky-pull-request-comment@v2
with:
message: |+
## Preview URLs
GH Env: ${{ needs.PublishDocstoCloudflarePages.outputs.env }}
docs: ${{ needs.PublishDocstoCloudflarePages.outputs.url }}
# api docs: ${{ needs.PublishDocstoCloudflarePages.outputs.url }}/api/modules.html
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went ahead and deleted this comment as we aren't doing these yet (but also no plan to soon™).

@ynotdraw ynotdraw force-pushed the 40-add-turbo-+-pnpm-syncing branch from 0991fef to f925416 Compare April 4, 2023 20:08
@nicolechung
Copy link
Contributor

For local development, do we still have to set up pnpm link @crowdstrike/ember-toucan-core and pnpm i (without committing the related package.json changes?


Build Error (WaitForTrees)

@crowdstrike/ember-toucan-core/package.json lists ./dist/_app_/components/button.js in ember-addon.app-js, but that file does not exist


Stack Trace and Error Report: /var/folders/jc/81dkjn9s2sg5cpt_66jd8l640000gn/T/error.dump.c5cd0949f5a2005a23bb20913f0234cf.log

Without that I am still getting this error...

I do notice that the docs-app watches for changes now when I change something in package/ember-toucan-core which is exciting!

"start": "ember serve",
"test:ember": "ember test"
"test:ember": "ember test",
"_syncPnpm": "pnpm sync-pnpm"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh do I have to run this script locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope! You can still use pnpm linking locally as it works today!

@ynotdraw
Copy link
Contributor Author

ynotdraw commented Apr 5, 2023

For local development, do we still have to set up pnpm link @crowdstrike/ember-toucan-core and pnpm i (without committing the related package.json changes?

@nicolechung Yup! We will still need to do this for now


Build Error (WaitForTrees)

@crowdstrike/ember-toucan-core/package.json lists ./dist/_app_/components/button.js in ember-addon.app-js, but that file does not exist


Stack Trace and Error Report: /var/folders/jc/81dkjn9s2sg5cpt_66jd8l640000gn/T/error.dump.c5cd0949f5a2005a23bb20913f0234cf.log

Without that I am still getting this error...

I do notice that the docs-app watches for changes now when I change something in package/ember-toucan-core which is exciting!

Interesting. Can you provide some reproduction steps? I tried the following with success:

rm -rf node_modules
pnpm I
# a build is still required for the docs-app/test-app to consume core!
cd packages/ember-toucan-core
pnpm build
cd ../../docs-app/
pnpm start

and then from the root:

pnpm start:docs

I wonder if your node_modules were in a weird state or something? Based on the error message I'd also guess that maybe there's not a build for toucan-core so running pnpm build within the core package may be all that's missing there.

May also try rm -rf node_modules from within the docs-app directory and re-pnpm iing before starting? Nothing should change workflow wise for us with these changes, so if this is failing we definitely need to fix!

@nicolechung
Copy link
Contributor

May also try rm -rf node_modules from within the docs-app directory and re-pnpm iing before starting? Nothing should change workflow wise for us with these changes, so if this is failing we definitely need to fix!

I did a full nuke (rm -rf node_modulesfrom all packages and apps) before starting...let me try it again and make sure all thenode_modules` are cleared)...

But I didn't do pnpm link.

Copy link
Contributor

@simonihmig simonihmig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@ynotdraw ynotdraw merged commit bc1a276 into main Apr 6, 2023
14 checks passed
@ynotdraw ynotdraw deleted the 40-add-turbo-+-pnpm-syncing branch April 6, 2023 17:58
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.

Add turbo + pnpm syncing
4 participants