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

Lexicon cleanup #90

Closed

Conversation

aendra-rininsland
Copy link

Fixes #41.

* Removes src/lexicons
* Replaces with imports from respective upstream packages
* Replaces ts-node with tsx, namely because @atproto/bsky doesn't export lexicons
  * See: bluesky-social/atproto#2353
  * Merging bluesky-social/atproto#2354 will allow reverting to ts-node

Fixes bluesky-social#41.
@ungoldman
Copy link
Contributor

Trying to merge this into a custom feed today, and it took me a long while to figure out why it's working successfully with tsx but failing when trying to build and run the program in a production setting from dist.

Need to import from @atproto/bsky/dist/lexicon instead of @atproto/bsky/src/lexicon!

ungoldman added a commit to decent-digital/clip-clops that referenced this pull request Sep 25, 2024
bluesky-social/feed-generator#90

Co-authored-by: =?UTF-8?q?=C3=86ndra=20Rininsland?= <[email protected]>
@haileyok haileyok force-pushed the main branch 2 times, most recently from d36deef to fadd462 Compare October 31, 2024 08:18
@dholms
Copy link
Contributor

dholms commented Oct 31, 2024

Sorry for the late reply on this & thanks to @haileyok for putting it on my radar.

I agree that the lexicons are pretty noisy in here. And we really weren't sparing in what we copied over when we set this up 😅

However @atproto/bsky is a pretty heavy duty dependency to install (our entire appview service) just to get access to some types. I think the proper way to do this will be to have published packages for only the code-genned types which can then be installed by all services that use them (including the appview & the feed generator).

An alternate approach would be to add the actual relevant lexicon (JSON) files to the project and also add a codegen command to the package.json. That's the approach that we use on several of our other services.

@dholms dholms closed this Oct 31, 2024
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.

Clean up lexicons
4 participants