Skip to content

Commit

Permalink
Update to use new options (#42)
Browse files Browse the repository at this point in the history
## What is the goal of this PR?

We added new options to client-java that change the API that console uses, requiring it to be updated.

## What are the changes implemented in this PR?

- Updated infer option syntax.
  • Loading branch information
Adam Mitchell authored Jun 17, 2020
1 parent 017103b commit 8f81f72
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
2 changes: 1 addition & 1 deletion ConsoleSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private void executeQuery(String queryString, boolean catchRuntimeException) thr
// Get the stream of answers for each query (query.stream())
// Get the stream of printed answers (printer.toStream(..))
// Combine the stream of printed answers into one stream (queries.flatMap(..))
Stream<String> answers = queries.flatMap(query -> printer.toStream(tx, tx.stream(query, infer).get()));
Stream<String> answers = queries.flatMap(query -> printer.toStream(tx, tx.stream(query, GraknClient.Transaction.Options.infer(infer)).get()));

// For each printed answer, print them on one line
answers.forEach(answer -> {
Expand Down
5 changes: 2 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ load(
"graknlabs_common",
"graknlabs_graql",
"graknlabs_grakn_core",
"graknlabs_protocol",
"graknlabs_client_java",
)
graknlabs_client_java()
graknlabs_build_tools()
graknlabs_common()
graknlabs_graql()
graknlabs_grakn_core()
graknlabs_protocol()

load("@graknlabs_build_tools//distribution:dependencies.bzl", "graknlabs_bazel_distribution")
graknlabs_bazel_distribution()
Expand Down Expand Up @@ -124,8 +122,9 @@ bazel_rules_docker()
# Load Client Java dependencies #
################################
load(
"@graknlabs_client_java//dependencies/graknlabs:dependencies.bzl", "graknlabs_grabl_tracing")
"@graknlabs_client_java//dependencies/graknlabs:dependencies.bzl", "graknlabs_grabl_tracing", "graknlabs_protocol")
graknlabs_grabl_tracing()
graknlabs_protocol()

load("@graknlabs_client_java//dependencies/maven:dependencies.bzl",
graknlabs_client_java_maven_dependencies = "maven_dependencies")
Expand Down
20 changes: 3 additions & 17 deletions dependencies/graknlabs/dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,13 @@ def graknlabs_graql():
def graknlabs_grakn_core():
git_repository(
name = "graknlabs_grakn_core",
remote = "https://github.com/graknlabs/grakn",
commit = "05bcb88d38d1c63f1598699ac4d7e58449fd6726", # do not sync @graknlabs_grakn_core, it will create a cyclic dependency
)

def graknlabs_protocol():
git_repository(
name = "graknlabs_protocol",
remote = "https://github.com/graknlabs/protocol",
commit = "4ad2dfeaeca85f4ba2f2b42c263d3adf3e36acc3", # sync-marker: do not remove this comment, this is used for sync-dependencies by @graknlabs_protocol
remote = "https://github.com/flyingsilverfin/grakn",
commit = "80affa25bfe0c71c7febeffc526c11bfed890f56", # do not sync @graknlabs_grakn_core, it will create a cyclic dependency
)

def graknlabs_client_java():
git_repository(
name = "graknlabs_client_java",
remote = "https://github.com/graknlabs/client-java",
commit = "9078e5b6442e91f78b71a0d4a7216a0a7dafe30c", # sync-marker: do not remove this comment, this is used for sync-dependencies by @graknlabs_client_java
)

def graknlabs_grabl_tracing():
git_repository(
name = "graknlabs_grabl_tracing",
remote = "https://github.com/graknlabs/grabl-tracing",
commit = "c533775da0af19c5913e725486d68cc849b0dbdb" # sync-marker: do not remove this comment, this is used for sync-dependencies by @graknlabs_grabl_tracing
commit = "5b2b4228b4b5a6fd2ca2e8611729bf6d8abeaf62", # sync-marker: do not remove this comment, this is used for sync-dependencies by @graknlabs_client_java
)

0 comments on commit 8f81f72

Please sign in to comment.