-
Notifications
You must be signed in to change notification settings - Fork 323
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
Pre compute suggestion db during build time #5698
Merged
mergify
merged 36 commits into
develop
from
wip/db/5068-pre-compute-suggestion-db-during-build-time
Mar 8, 2023
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
b95a302
build: indexStdLib
4e6 6bb4d43
feat: serialization manager
4e6 9c84027
feat: update EnsureCompiledJob
4e6 b84603e
feat: simplify suggestions init
4e6 1ee00d3
misc: cleanup
4e6 e2ac361
Serialize provided suggestions to each standard library
JaroslavTulach d62ec42
Demo of iteratively adding constructing Tree
JaroslavTulach 560a107
Merge remote-tracking branch 'origin/develop' into wip/db/5068-pre-co…
JaroslavTulach b68da75
Only regenerate index when necessary
hubertp 8f7314e
Merge branch 'wip/db/5068-pre-compute-suggestion-db-during-build-time…
JaroslavTulach 2fbdf75
Using Jackson to serialize and deserialize Suggestion.Module
JaroslavTulach f413b62
Can serialize Suggestion[]
JaroslavTulach 958cc78
Can serialize record with List<Suggestion>
JaroslavTulach 1ff4c25
Serialize and deserialize the Suggestion list as a case class
JaroslavTulach ce821b1
Can load back the Tree.Node[Suggestion] from a cache
JaroslavTulach 5bff1ab
Less debug messages
JaroslavTulach f480e03
subscribe to Api.LibraryLoaded
JaroslavTulach 335305a
Merge branch 'develop' into wip/db/5068-pre-compute-suggestion-db-dur…
4e6 b4a98a4
feat: suggestions cache
4e6 6638c9d
feat: suggestions deserialization
4e6 283b6f5
feat: generate docs
4e6 9081707
misc: format
4e6 0e769c1
fix: suggestions loading
4e6 6a96e38
misc: run deserialization in background
4e6 77c5a2b
test: fix language-server
4e6 009b595
test: fix runtime
4e6 31773a6
Merge branch 'develop' into wip/db/5068-pre-compute-suggestion-db-dur…
4e6 a45898a
test: fix RuntimeServerTest
4e6 5314e10
test: fix RuntimeErrorsTest
4e6 1447ed0
test: fix RuntimeInstrumentTest
4e6 20c2e40
test: fix RuntimeSuggestionUpdatesTest
4e6 89739c0
test: fix RuntimeStdlibTest
4e6 36862c6
test: fix RuntimeComponentsTest
4e6 3468399
misc: cleanup
4e6 952f0f6
Merge branch 'develop' into wip/db/5068-pre-compute-suggestion-db-dur…
mergify[bot] 4742f5f
misc: review comments
4e6 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
engine/language-server/src/test/scala/org/enso/languageserver/search/Suggestions.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package org.enso.languageserver.search | ||
|
||
import org.enso.docs.generator.DocsGenerator | ||
import org.enso.docs.sections.DocSectionsBuilder | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably unnecessary import. |
||
import org.enso.polyglot.Suggestion | ||
|
||
import java.util.UUID | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@4e6's idea is to deliver the cached
suggestion.json
here. However I haven't hit a breakpoint placed here yet. I am not sure who's supposed to deliver this message? Probably we are missing a call toNotificationHandler.addListener
that would registerSuggestionHandler
. Probably the listener shall be attached whencase InitializedEvent.TruffleContextInitialized
is delivered - by where can I find theEnsoContext
at that moment?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One has to subscribe to Akka event bus to get the notification - f480e03
But now there is another problem: The
SuggestionSerializationManager
is in runtime, while this code is inlanguage-server
- how shall these two talk to each other? I believe this "library added" notification is send from following stacktrace:I believe the next step is to modify code in
PackageRepository
to check whether a suggestion cache exists for the library. If it does, read it and send the content of the suggestions via theApi.LibraryLoaded
messages to the "language-server" project that can distribute it further. The following code shall be modified to send alsolibrarySuggestions
: