gnars-dao / gnars-frontend

https://gnars.wtf
15 stars 10 forks source link

Update non wagmi webapp packages to major versions #29

Closed asmattic closed 4 months ago

asmattic commented 4 months ago

Issue

Notes


Acceptance Criteria

  1. All dependencies are updated to their latest major version.

    wagmi@v2 contains major breaking changes that are likely dependent on base jump migration. Dependent packages (viem, abitype etc.) are unchanged.

  2. There must be no regression in site functionality.

    No apparent regressions unless the hardhat error in gnar-contracts persists in Vercel.

Without thorough tests in place, the peer/sub dependency graph is basically a turtles all the way down rabbit hole so testing in a Vercel temp build is the best way to test this update.

  1. Build and run steps remain simple and consistent with the README.

Possible .graphclient errors upon runing pnpm run build:graphclient manually. Need to test running manually on current gnars-dao:main to determine if this is a regression. The webapp build runs successfully with the current .graphclient.

pnpm run wagmi:generate rebuild works without errors.

No build config changes were made.

  1. The site is builds and deploys on Vercel.

    Awaiting deploy authorization to see if there are any build errors (logs). If hardhat block number build config error persists in Vercel. That can be addressed.

asmattic commented 4 months ago

All non wagmi related packages updated to next major versions.

asmattic commented 4 months ago

Not sure exactly where the hardhat error is originating, if it just needs the .env keys in Vercel but the webapp builds without errors locally.

image
asmattic commented 4 months ago
Screenshot 2024-04-22 at 1 16 15 PM
mulfdev commented 4 months ago

yeah no worries, as long as web builds we're good. will review today

asmattic commented 4 months ago

All added formatting unrelated to PR removed. Local webapp build confirmed still working.

image
asmattic commented 4 months ago

Removed .npmrc files. Kept node@v18.20.2 (see comments). Tested local webapp builds with all other changes requested.

image
mulfdev commented 4 months ago

Also let's rebase off the most recent merge

asmattic commented 4 months ago

CleanShot 2024-04-26 at 19 32 54

After looking again it looks like you ran asmattic/main locally and not asmattic/package-updates which is the branch for this PR.

image

mulfdev commented 4 months ago

Vercel preview is only for the given branch. Didnt see the branch change, let's limit that in the future or close and open a new pr.

asmattic commented 4 months ago

Vercel preview is only for the given branch. Didnt see the branch change, let's limit that in the future or close and open a new pr.

I'll make sure to have main as the comparison fork branch for future PR's. In the interest of not creating a 3rd PR for this issue I think we should wrap up this issue here.

I just need preview build logs to locate and debug the cause of the webapp build error produced.

mulfdev commented 4 months ago

for commit hash ae732f9

CleanShot 2024-04-29 at 16 45 03

the vercel logs dont reveal anything here that wasnt determinable on local?

asmattic commented 4 months ago

ae732f9

Thanks, I'll debug from there and try and replicate locally. I'll request re-review when I have tracked down the root cause.

asmattic commented 4 months ago

Dependency connectkit@^1.5.1 was pulling in connectkit@1.7.x (see breaking changes here)[https://docs.family.co/connectkit/migration-guide#section-170-breaking-changes-update-packages] which requires wagmi@v2. The alchemyId error was an artifact of the wagmi@v2 larger upgrade due to the connectkit relation.

Replicated the alchemyId type error removing pnpm-lock.yaml in root and running pnpm install and build in webapp below where you can see the connectkit breaking version.

image Fixing connectkit to v1.5.1 resolves this issue and runs a successful build. I'll avoid post another local build screenshot, lol.

I'm pretty confident if another build error occurs, it'll at least be a new one.

mulfdev commented 4 months ago

CleanShot 2024-05-01 at 13 29 02 🔥