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

fix(hub-web import): undo change that breaks build in certain environments #1999

Closed
wants to merge 1 commit into from

Conversation

hiporox
Copy link

@hiporox hiporox commented May 14, 2024

Motivation

The most recent change to this file reintroduced the issue identified in #863

This undoes that breaking change

Change Summary

Remove curly braces to make import into default instead of named to fix an import error in certain builds

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review


PR-Codex overview

This PR updates the import statement in packages/hub-web/src/generated/rpc.ts to fix an import error that was causing build failures.

Detailed summary

  • Updated import statement for grpc from "@improbable-eng/grpc-web" to grpcWeb
  • Renamed grpc variable to grpcWeb.grpc to maintain functionality

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented May 14, 2024

🦋 Changeset detected

Latest commit: 38e79a9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@farcaster/hub-web Minor

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented May 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hub-monorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 7:03pm

The most recent change to this file reintroduced the issue identified in farcasterxyz#863

This undoes that breaking change
@hiporox
Copy link
Author

hiporox commented May 14, 2024

Since this is a problem in generated files, it might crop up again. I can't find a way to solve this issue with the generator, so as @pfletcherhill mentioned in #863, fixing this might require using a different package for gRPC.

I also have to assume that there is someway to configure the Next.js compiler to work the way that Vite does, but I cannot find information for how to do so

@hiporox
Copy link
Author

hiporox commented May 14, 2024

It is worth noting that @improbable-eng/grpc-web is in maintenance mode as of their last commit over a year ago. They suggest moving to the official grpc/grpc-web package. It does appear that package is ESM compatible

@hellno
Copy link
Contributor

hellno commented May 15, 2024

just ran into this problem, thanks for providing a fix so quickly @hiporox 🙏

@hiporox
Copy link
Author

hiporox commented May 16, 2024

@hellno For the time being, @farcaster/hub-web@0.8.4 is the last release before the breaking change happened, so you can use that one

@sanjayprabhu
Copy link
Contributor

Ah, thank you. Looks like there was a regression, and we accidentally removed some code that was handling this when protoc is run. More future proof fix here: #2006.

@hiporox hiporox deleted the patch-1 branch May 17, 2024 01:55
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.

None yet

3 participants