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

refactor: update package.json and turbo.json for improved build and development scripts #788

Closed
wants to merge 4 commits into from

Conversation

fabianhug
Copy link
Contributor

Relates to:

pnpm run dev does not work out of the box #780

Risks

Medium. While the build system improvements work as expected, the type error in the postgres adapter could affect database operations that rely on embedding configurations. (see next)

Background

What does this PR do?

  • Changed the 'dev' script in package.json to use 'turbo run dev --parallel --no-cache' for better performance
  • Updated turbo.json to streamline task dependencies and outputs for the 'dev' and 'build' tasks
  • Modified agent/package.json to point the main entry to 'dist/index.js' and adjusted scripts for building and starting the application
  • Enhanced core/package.json 'dev' script to specify the source file for watching during development

However, during testing I discovered a type error that needs to be addressed in some future PR:

Module '"@ai16z/eliza"' has no exported member 'getEmbeddingConfig'.

This error appears in packages/adapter-postgres/src/index.ts when trying to import getEmbeddingConfig from the core package.

What kind of change is this?

Improvements (misc. changes to existing features)

Why are we doing this? Any context or related work?

See pnpm run dev does not work out of the box #780

Documentation changes needed?

No

Testing

Where should a reviewer start?

  1. Run pnpm i
  2. Run pnpm run dev
  3. Verify that all packages start building in watch mode
  4. Note the type error in the postgres adapter that needs to be fixed in a follow-up PR

Detailed testing steps

  1. Check that turbo correctly runs builds in parallel
  2. Verify that file changes trigger rebuilds appropriately
  3. Confirm that the build dependencies are working (core package builds before dependent packages)
  4. Note the type error in postgres adapter needs fixing:
    • File: packages/adapter-postgres/src/index.ts
    • Error: Module '"@ai16z/eliza"' has no exported member 'getEmbeddingConfig'

Deploy Notes

The type error in the postgres adapter should be fixed before deploying to prod/new release. The build system changes themselves are ready for deployment.

…evelopment scripts

- Changed the 'dev' script in package.json to use 'turbo run dev --parallel --no-cache' for better performance.
- Updated turbo.json to streamline task dependencies and outputs for the 'dev' and 'build' tasks.
- Modified agent/package.json to point the main entry to 'dist/index.js' and adjusted scripts for building and starting the application.
- Enhanced core/package.json 'dev' script to specify the source file for watching during development.
@fabianhug fabianhug requested a review from lalalune December 2, 2024 12:27
@fabianhug fabianhug marked this pull request as draft December 2, 2024 12:33
@fabianhug
Copy link
Contributor Author

found smth that needs another fix, mb

@fabianhug
Copy link
Contributor Author

weird, it works when running multiple time but breaks at the first time.
maybe @lalalune or @cygaar can take over, as I cant finish this today

@shakkernerd
Copy link
Member

shakkernerd commented Dec 2, 2024

Hi @fabianhug, the behaviour of turborepo has been really weird just as you've observed and stated above. The build config and script works as I have previously done.
I also have a workaround for the dev script in #793

@fabianhug
Copy link
Contributor Author

Hi @fabianhug, the behaviour of turborepo has been really weird just as you've observed and stated above. The build config and script works as I have previously done. I also have a workaround for the dev script in #793

perfect - but thanks for frontrunning my contribution, haha! great it works now, nw

@shakkernerd
Copy link
Member

Hi @fabianhug, the behaviour of turborepo has been really weird just as you've observed and stated above. The build config and script works as I have previously done. I also have a workaround for the dev script in #793

perfect - but thanks for frontrunning my contribution, haha! great it works now, nw

hahahahahahahahahahahahahahahahahahahahahaha

I have been on this since Saturday. It was a real pain because I tried getting turborepo to work but it didn't.
Thanks for testing.

@fabianhug
Copy link
Contributor Author

Hi @fabianhug, the behaviour of turborepo has been really weird just as you've observed and stated above. The build config and script works as I have previously done. I also have a workaround for the dev script in #793

perfect - but thanks for frontrunning my contribution, haha! great it works now, nw

hahahahahahahahahahahahahahahahahahahahahaha

I have been on this since Saturday. It was a real pain because I tried getting turborepo to work but it didn't. Thanks for testing.

love u bae, closing now

@fabianhug fabianhug closed this Dec 2, 2024
@shakkernerd shakkernerd deleted the fix-pnpm-run-dev-turbo branch December 2, 2024 21:48
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.

2 participants