-
Notifications
You must be signed in to change notification settings - Fork 6
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
Questions regarding Scaladoc search #203
Comments
No. Lucille is a library for parsing and representing Lucene style queries.
This is another area where there could be different options and require experimentation. Ultimately, the index file should probably contain all the data we need, and return this data for the various matching hits. Currently we can support this with stored fields. For the index we build as part of the Laika interop, we set the stored fields here: protosearch/laikaIO/src/main/scala/pink/cozydev/protosearch/analysis/IndexFormat.scala Lines 56 to 58 in 4b52e97
And you can see us accessing fields in worker.js: protosearch/laikaIO/src/main/resources/pink/cozydev/protosearch/sbt/worker.js Lines 13 to 16 in 4b52e97
|
Makes sense, would we potentially explore using another dependency like https://scalameta.org/docs/trees/scaladoc.html or parse by hand? I'll spend some time looking into parsing options, whether that be in a similar manner to scala-meta or a different method. Thanks for answering! |
It would absolutely be fine to use another dependency if it helped with getting the needed ScalaDoc information. However, that specific link you've shared, https://scalameta.org/docs/trees/scaladoc.html, looks like it's a collection of links to ScalaMeta's ScalaDoc documentation, not a module for reading ScalaDoc. |
Oh right, I was looking at an issue on that project and linked to the docs instead of that issue. I did find what seems to be a promising means of parsing Scaladoc (https://github.com/andyglow/scaladoc). It seems to be actively maintained as well which is a plus. I'll look into how well this works for our purposes. |
@VigneshSK17 unfortunately I have to recommend not investigating https://github.com/andyglow/scaladoc any further. |
Oops my bad, still not used to checking for things like that. I'll look for a properly licensed option for a bit but will probably default to making a somewhat custom scaladoc parser. |
It would be ideal if we can find some path to get the Scaladoc info from official Scala tooling. Writing something custom means maintaining something custom as Scala evolves. My friend @samspills recently shared this Scalameta link which seems promising: https://www.javadoc.io/doc/org.scalameta/trees_2.12/latest/scala/meta/internal/Scaladoc$.html I'm unsure if Scalameta would work nicely for both Scala 2 and 3 though. |
Makes sense. The original link I sent was what I thought this was, it definitely looks like a good solution. |
Hey @VigneshSK17 I just wanted to note that the applications are due soon (April 2nd 18:00 UTC), and I'm more than happy to review rough drafts if you'd like 😄 You can email me at andrew.valencik@gmail.com. |
Thank you! I don't think I'll have the time to finish a proposal in time for you to review because of an emergency but I'll use this space to ask questions so I can create a good first version. |
Originally posted by @VigneshSK17 in #188 (comment)
The text was updated successfully, but these errors were encountered: