Closed wdanilo closed 1 year ago
Please let us know how to determine what ends up in tagValues
and the logic we need to control this.
To determine what ends up in tagValues
one needs to put breakpoint to buildResolvedUnionTypeName. Or better have three breakpoints:
enso$ git diff engine/runtime/src/main/scala/org/enso/compiler/context/SuggestionBuilder.scala
diff --git a/engine/runtime/src/main/scala/org/enso/compiler/context/SuggestionBuilder.scala b/engine/runtime/src/main/scala/org/enso/compiler/context/SuggestionBuilder.scala
index b2161b2d3..23d9789da 100644
--- a/engine/runtime/src/main/scala/org/enso/compiler/context/SuggestionBuilder.scala
+++ b/engine/runtime/src/main/scala/org/enso/compiler/context/SuggestionBuilder.scala
@@ -106,6 +106,9 @@ final class SuggestionBuilder[A: IndexedSource](
_
) if !m.isStaticWrapperForInstanceMethod =>
val typeSignature = ir.getMetadata(TypeSignatures)
+ if (methodName.toString().contains("join")) {
+ System.out.println("Found method " + methodName)
+ }
val (selfTypeOpt, isStatic) = typePtr match {
case Some(typePtr) =>
val selfType = typePtr
@@ -200,6 +203,9 @@ final class SuggestionBuilder[A: IndexedSource](
}
val builder: TreeBuilder = Vector.newBuilder
+ if (module.toString().endsWith("Table")) {
+ System.err.println("Processing " + module)
+ }
builder += Tree.Node(
buildModule(
module,
and stop when one is processing Standard.Table.Data.Table
module and join
method. Then stop in the buildResolvedUnionTypeName.
Doing that one finds out there is Value java_table which is seen as:
BindingsMap$Type
name = "Table"
members = [ BindingsMap$Cons name="Value" arity = 1 allFieldsDefaulted=false ]
e.g. offering Table.Value
is as good as offering Filter_Condition.Equal which is what #5656 wants to offer. Alas they aren't really distinguishable from the perspective of the SuggestionBuilder
.
Ideas @jdunkerley, @Frizi & co.?
@jdunkerley Here are is a clue from Dmitry that I once got on debugging suggestions:
If you want to observe the database, the easiest way is to create a file-based one instead of in-memory https://github.com/enso-org/enso/blob/c4c35c92b7e2b53f5e4571af0e89a56eac8e7120/engine/language-server/src/main/scala/org/enso/languageserver/boot/MainModule.scala#L117 with
val sqlDatabase = SqlDatabase(languageServerConfig.directories.suggestionsDatabaseFile)
and then use CLI
$ sqlite3 /path/to/suggestions.db
offering
Table.Value
is as good as offering Filter_Condition.Equal which is what #5656 wants to offer. Alas they aren't really distinguishable from the perspective of theSuggestionBuilder
.
@jdunkerley proposes to ignore tagValues
with a single entry in SuggestionBuilder
. Let's do it!
Jaroslav Tulach reports a new STANDUP for yesterday (2023-02-23):
Progress: - PR with design for Table.Value
ready for discussion: https://github.com/enso-org/enso/pull/5747
Nan
: https://github.com/enso-org/enso/pull/5744Next Day: Focus on serialization of suggestion cache.
Jaroslav Tulach reports a new STANDUP for yesterday (2023-02-24):
Progress: - discussion about Table.Value
(and now also Pair.Value
) continues: https://github.com/enso-org/enso/pull/5747#issuecomment-1442768872
getMetaObject()
: https://github.com/enso-org/enso/issues/5759sort
: https://github.com/enso-org/enso/issues/5742#issuecomment-1443919050 It should be finished by 2023-03-06.Next Day: Vacation on Monday.
Jaroslav Tulach reports a new STANDUP for yesterday (2023-02-25):
Progress: - Table.Value
, Pair.Value
- awaits: https://github.com/enso-org/enso/pull/5747#issuecomment-1442768872
BigInteger
support in GraalVM 23.0:sort
: https://github.com/enso-org/enso/issues/5742#issuecomment-1443919050Next Day: Vacation on Monday.
GitHubGraalVM: Run Programs Faster Anywhere :rocket:. Contribute to oracle/graal development by creating an account on GitHub.
Jaroslav Tulach reports a new STANDUP for yesterday (2023-02-28):
Progress: - Table.Value
solved and integrated
Next Day: Cache invalidations & request timeout
This task is automatically imported from the old Task Issue Board and it was originally created by jaroslavtulach. Original issue is here.
Discovered during book clubing.
There is a drop down for
Table.join
right
argument! And it offersTable.Value
.Table.Value
is just a function which needs a parameter ofjava_table
, so it makes no sense to offer it astag_value
.Comments:
(jaroslavtulach - Feb 2, 2023)