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

Docs: get package names from purs graph #1309

Merged
merged 9 commits into from
Jan 20, 2025
Merged

Conversation

f-f
Copy link
Member

@f-f f-f commented Jan 19, 2025

Fix #1065 as described in here

This patch started with just "let's thread the graph through the docs-search machinery", but getting that done snowballed into a few more things.
Brief of changes:

  • we used to get package names from folders on disk, which didn't quite work. We now compute the purs graph instead, and pass it in
  • that entailed splitting out the graph types into their own separate module so we could avoid circular imports
  • however, the PackageName used in those graph types (the one from the Registry) was not the same PackageName used in the docs-search codebase (the one from Bower), so this second one is no more
  • however that Bower stuff was getting in from somewhere; we were in fact parsing bower.json files to figure out package dependencies. That's just wrong, so that's no more, and we do instead parse purs.json files, which are accurate
  • in passing I noticed that we were parsing the module names from the local modules. That probably worked ok in the old architecture, but with the new monorepo architecture it's just wrong. So the code for parsing the files is no more, and we instead just pass in the package names of the workspace packages and read the modules from the graph

@f-f f-f requested a review from fsoikin January 19, 2025 22:14
Copy link
Collaborator

@fsoikin fsoikin left a comment

Choose a reason for hiding this comment

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

Looks sparkly!

bin/docs-search-app.js.map Outdated Show resolved Hide resolved
docs-search/common/src/Docs/Search/Declarations.purs Outdated Show resolved Hide resolved
docs-search/common/src/Docs/Search/Declarations.purs Outdated Show resolved Hide resolved
docs-search/common/src/Docs/Search/Meta.purs Outdated Show resolved Hide resolved
docs-search/index/src/Docs/Search/IndexBuilder.purs Outdated Show resolved Hide resolved
@f-f f-f merged commit ad5a1e3 into master Jan 20, 2025
5 checks passed
@f-f f-f deleted the fix-package-names-in-docs branch January 20, 2025 11: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.

Docs command: Fix how we get package names
2 participants