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

chore: use tailcall value in place of ConstValue #2016

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
260 changes: 130 additions & 130 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions src/core/blueprint/into_schema.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
use std::borrow::Cow;
use std::sync::Arc;

use async_graphql::dynamic::{self, FieldFuture, FieldValue, SchemaBuilder};
use async_graphql::dynamic::{self, FieldFuture, SchemaBuilder};
use async_graphql::ErrorExtensions;
use async_graphql_value::ConstValue;
use futures_util::TryFutureExt;
use tracing::Instrument;

use crate::core::blueprint::{Blueprint, Definition, Type};
use crate::core::http::RequestContext;
use crate::core::lambda::{Eval, EvaluationContext, ResolverContext};
use crate::core::scalar::CUSTOM_SCALARS;
use crate::core::value::Value;

fn to_type_ref(type_of: &Type) -> dynamic::TypeRef {
match type_of {
Expand Down Expand Up @@ -53,7 +53,7 @@ fn to_type(def: &Definition) -> dynamic::Type {
None => {
let ctx: ResolverContext = ctx.into();
let ctx = EvaluationContext::new(req_ctx, &ctx);
FieldFuture::from_value(
Value::into_field_future(
ctx.path_value(&[field_name])
.map(|a| a.into_owned().to_owned()),
)
Expand All @@ -71,11 +71,7 @@ fn to_type(def: &Definition) -> dynamic::Type {

let const_value =
expr.eval(ctx).await.map_err(|err| err.extend())?;
let p = match const_value {
ConstValue::List(a) => Some(FieldValue::list(a)),
ConstValue::Null => FieldValue::NONE,
a => Some(FieldValue::from(a)),
};
let p = const_value.as_fieldValue();
Ok(p)
}
.instrument(span)
Expand Down
2 changes: 1 addition & 1 deletion src/core/config/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Headers {
self.cache_control.unwrap_or(false)
}
pub fn set_cookies(&self) -> bool {
self.set_cookies.unwrap_or_default()
self.set_cookies.unwrap_or(false)
}
pub fn get_cors(&self) -> Option<Cors> {
self.cors.clone()
Expand Down
13 changes: 6 additions & 7 deletions src/core/graphql/data_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use crate::core::config::Batch;
use crate::core::data_loader::{DataLoader, Loader};
use crate::core::http::{DataLoaderRequest, Response};
use crate::core::runtime::TargetRuntime;
use crate::core::value::Value;

pub struct GraphqlDataLoader {
pub runtime: TargetRuntime,
Expand All @@ -33,7 +34,7 @@ impl GraphqlDataLoader {

#[async_trait::async_trait]
impl Loader<DataLoaderRequest> for GraphqlDataLoader {
type Value = Response<async_graphql::Value>;
type Value = Response<Value>;
type Error = Arc<anyhow::Error>;

#[allow(clippy::mutable_key_type)]
Expand Down Expand Up @@ -92,16 +93,14 @@ fn create_batched_request(dataloader_requests: &[DataLoaderRequest]) -> reqwest:

#[allow(clippy::mutable_key_type)]
fn extract_responses(
result: Result<Response<async_graphql::Value>, anyhow::Error>,
result: Result<Response<Value>, anyhow::Error>,
keys: &[DataLoaderRequest],
) -> HashMap<DataLoaderRequest, Response<async_graphql::Value>> {
) -> HashMap<DataLoaderRequest, Response<Value>> {
let mut hashmap = HashMap::new();
if let Ok(res) = result {
if let async_graphql_value::ConstValue::List(values) = res.body {
if let Some(values) = Value::list(res.body) {
for (i, request) in keys.iter().enumerate() {
let value = values
.get(i)
.unwrap_or(&async_graphql_value::ConstValue::Null);
let value = values.get(i).unwrap_or_default();
hashmap.insert(
request.clone(),
Response {
Expand Down
11 changes: 5 additions & 6 deletions src/core/grpc/data_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::time::Duration;
use anyhow::Result;
use async_graphql::async_trait;
use async_graphql::futures_util::future::join_all;
use async_graphql_value::ConstValue;

use super::data_loader_request::DataLoaderRequest;
use super::protobuf::ProtobufOperation;
Expand All @@ -17,6 +16,7 @@ use crate::core::grpc::request::create_grpc_request;
use crate::core::http::Response;
use crate::core::json::JsonLike;
use crate::core::runtime::TargetRuntime;
use crate::core::value::Value;

#[derive(Clone)]
pub struct GrpcDataLoader {
Expand All @@ -35,7 +35,7 @@ impl GrpcDataLoader {
async fn load_dedupe_only(
&self,
keys: &[DataLoaderRequest],
) -> anyhow::Result<HashMap<DataLoaderRequest, Response<async_graphql::Value>>> {
) -> anyhow::Result<HashMap<DataLoaderRequest, Response<Value>>> {
let results = keys.iter().map(|key| async {
let result = match key.to_request() {
Ok(req) => execute_grpc_request(&self.runtime, &self.operation, req).await,
Expand All @@ -54,15 +54,14 @@ impl GrpcDataLoader {
for (key, value) in results {
hashmap.insert(key, value?);
}

Ok(hashmap)
}

async fn load_with_group_by(
&self,
group_by: &GroupBy,
keys: &[DataLoaderRequest],
) -> Result<HashMap<DataLoaderRequest, Response<async_graphql::Value>>> {
) -> Result<HashMap<DataLoaderRequest, Response<Value>>> {
let inputs = keys.iter().map(|key| key.template.body.as_str());
let (multiple_body, grouped_keys) = self
.operation
Expand All @@ -88,7 +87,7 @@ impl GrpcDataLoader {
response_body
.get(&id)
.and_then(|a| a.first().cloned().cloned())
.unwrap_or(ConstValue::Null),
.unwrap_or_default(),
);

result.insert(key.clone(), res);
Expand All @@ -100,7 +99,7 @@ impl GrpcDataLoader {

#[async_trait::async_trait]
impl Loader<DataLoaderRequest> for GrpcDataLoader {
type Value = Response<async_graphql::Value>;
type Value = Response<Value>;
type Error = Arc<anyhow::Error>;

async fn load(
Expand Down
3 changes: 2 additions & 1 deletion src/core/grpc/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use url::Url;
use super::protobuf::ProtobufOperation;
use crate::core::http::Response;
use crate::core::runtime::TargetRuntime;
use crate::core::value::Value;

pub static GRPC_STATUS: &str = "grpc-status";

Expand All @@ -21,7 +22,7 @@ pub async fn execute_grpc_request(
runtime: &TargetRuntime,
operation: &ProtobufOperation,
request: Request,
) -> Result<Response<async_graphql::Value>> {
) -> Result<Response<Value>> {
let response = runtime.http2_only.execute(request).await?;

let grpc_status = response
Expand Down
3 changes: 2 additions & 1 deletion src/core/http/cache.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use crate::core::value::Value;

Check warning on line 1 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Formatter and Lint Check

Diff in /home/runner/work/tailcall/tailcall/src/core/http/cache.rs
use cache_control::CacheControl;

use super::Response;

Check warning on line 5 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Formatter and Lint Check

Diff in /home/runner/work/tailcall/tailcall/src/core/http/cache.rs
pub fn cache_policy(res: &Response<async_graphql::Value>) -> Option<CacheControl> {
pub fn cache_policy(res: &Response<Value>) -> Option<CacheControl> {
let header = res.headers.get(hyper::header::CACHE_CONTROL)?;
let value = header.to_str().ok()?;

Expand All @@ -20,7 +21,7 @@
use crate::core::http::Response;

pub fn max_age(res: &Response<async_graphql::Value>) -> Option<Duration> {
match super::cache_policy(res) {

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-ia32-gnu

mismatched types

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-gnu

mismatched types

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-ia32-gnu

mismatched types

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-musl

mismatched types

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-gnu

mismatched types

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-musl

mismatched types

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-arm64

mismatched types

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-x64

mismatched types

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-arm64-msvc

mismatched types

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-gnu

mismatched types

Check failure on line 24 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-msvc

mismatched types
Some(value) => value.max_age,
None => None,
}
Expand All @@ -42,7 +43,7 @@
}

pub fn cache_visibility(res: &Response<async_graphql::Value>) -> String {
let cachability = super::cache_policy(res).and_then(|value| value.cachability);

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-ia32-gnu

mismatched types

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-gnu

mismatched types

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-ia32-gnu

mismatched types

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-musl

mismatched types

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-gnu

mismatched types

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-musl

mismatched types

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-arm64

mismatched types

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-x64

mismatched types

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-arm64-msvc

mismatched types

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-gnu

mismatched types

Check failure on line 46 in src/core/http/cache.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-msvc

mismatched types

match cachability {
Some(Cachability::Public) => "public".to_string(),
Expand Down
16 changes: 8 additions & 8 deletions src/core/http/data_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ use std::time::Duration;

use async_graphql::async_trait;
use async_graphql::futures_util::future::join_all;
use async_graphql_value::ConstValue;

use crate::core::config::group_by::GroupBy;
use crate::core::config::Batch;
use crate::core::data_loader::{DataLoader, Loader};
use crate::core::http::{DataLoaderRequest, Response};
use crate::core::json::JsonLike;
use crate::core::runtime::TargetRuntime;
use crate::core::value::Value;

fn get_body_value_single(body_value: &HashMap<String, Vec<&ConstValue>>, id: &str) -> ConstValue {
fn get_body_value_single(body_value: &HashMap<String, Vec<&Value>>, id: &str) -> Value {
body_value
.get(id)
.and_then(|a| a.first().cloned().cloned())
.unwrap_or(ConstValue::Null)
.unwrap_or_default()
}

fn get_body_value_list(body_value: &HashMap<String, Vec<&ConstValue>>, id: &str) -> ConstValue {
ConstValue::List(
fn get_body_value_list(body_value: &HashMap<String, Vec<&Value>>, id: &str) -> Value {
Value::as_list(
body_value
.get(id)
.unwrap_or(&Vec::new())
Expand All @@ -35,7 +35,7 @@ fn get_body_value_list(body_value: &HashMap<String, Vec<&ConstValue>>, id: &str)
pub struct HttpDataLoader {
pub runtime: TargetRuntime,
pub group_by: Option<GroupBy>,
pub body: fn(&HashMap<String, Vec<&ConstValue>>, &str) -> ConstValue,
pub body: fn(&HashMap<String, Vec<&Value>>, &str) -> Value,
}
impl HttpDataLoader {
pub fn new(runtime: TargetRuntime, group_by: Option<GroupBy>, is_list: bool) -> Self {
Expand All @@ -59,7 +59,7 @@ impl HttpDataLoader {

#[async_trait::async_trait]
impl Loader<DataLoaderRequest> for HttpDataLoader {
type Value = Response<async_graphql::Value>;
type Value = Response<Value>;
type Error = Arc<anyhow::Error>;

async fn load(
Expand All @@ -84,7 +84,7 @@ impl Loader<DataLoaderRequest> for HttpDataLoader {
.http
.execute(request)
.await?
.to_json::<ConstValue>()?;
.to_json::<Value>()?;
#[allow(clippy::mutable_key_type)]
let mut hashmap = HashMap::with_capacity(keys.len());
let path = &group_by.path();
Expand Down
8 changes: 4 additions & 4 deletions src/core/http/request_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::num::NonZeroU64;
use std::str::FromStr;
use std::sync::{Arc, Mutex};

use async_graphql_value::ConstValue;
use cache_control::{Cachability, CacheControl};
use derive_setters::Setters;
use reqwest::header::{HeaderMap, HeaderName, HeaderValue};
Expand All @@ -17,6 +16,7 @@ use crate::core::grpc::data_loader::GrpcDataLoader;
use crate::core::http::{AppContext, DataLoaderRequest, HttpDataLoader};
use crate::core::lambda::EvaluationError;
use crate::core::runtime::TargetRuntime;
use crate::core::value::Value;

#[derive(Setters)]
pub struct RequestContext {
Expand All @@ -34,7 +34,7 @@ pub struct RequestContext {
pub min_max_age: Arc<Mutex<Option<i32>>>,
pub cache_public: Arc<Mutex<Option<bool>>>,
pub runtime: TargetRuntime,
pub cache: AsyncCache<u64, ConstValue, EvaluationError>,
pub cache: AsyncCache<u64, Value, EvaluationError>,
}

impl RequestContext {
Expand Down Expand Up @@ -134,15 +134,15 @@ impl RequestContext {
}
}

pub async fn cache_get(&self, key: &u64) -> anyhow::Result<Option<ConstValue>> {
pub async fn cache_get(&self, key: &u64) -> anyhow::Result<Option<Value>> {
self.runtime.cache.get(key).await
}

#[allow(clippy::too_many_arguments)]
pub async fn cache_insert(
&self,
key: u64,
value: ConstValue,
value: Value,
ttl: NonZeroU64,
) -> anyhow::Result<()> {
self.runtime.cache.set(key, value, ttl).await
Expand Down
14 changes: 9 additions & 5 deletions src/core/http/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use tonic_types::Status as GrpcStatus;

use crate::core::grpc::protobuf::ProtobufOperation;
use crate::core::lambda::EvaluationError;
use crate::core::value::Value;

#[derive(Clone, Debug, Default, Setters)]
pub struct Response<Body> {
Expand All @@ -27,6 +28,12 @@ pub trait FromValue {
fn from_value(value: serde_json_borrow::Value) -> Self;
}

impl FromValue for Value {
fn from_value(value: serde_json_borrow::Value) -> Self {
ConstValue::from_value(value).into()
}
}

impl FromValue for ConstValue {
fn from_value(value: serde_json_borrow::Value) -> Self {
match value {
Expand Down Expand Up @@ -78,12 +85,9 @@ impl Response<Bytes> {
Ok(Response { status: self.status, headers: self.headers, body })
}

pub fn to_grpc_value(
self,
operation: &ProtobufOperation,
) -> Result<Response<async_graphql::Value>> {
pub fn to_grpc_value(self, operation: &ProtobufOperation) -> Result<Response<Value>> {
let mut resp = Response::default();
let body = operation.convert_output::<async_graphql::Value>(&self.body)?;
let body = operation.convert_output::<Value>(&self.body)?;
resp.body = body;
resp.status = self.status;
resp.headers = self.headers;
Expand Down
4 changes: 2 additions & 2 deletions src/core/lambda/cache.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use core::future::Future;
use std::num::NonZeroU64;
use std::ops::Deref;

Check warning on line 3 in src/core/lambda/cache.rs

View workflow job for this annotation

GitHub Actions / Run Formatter and Lint Check

Diff in /home/runner/work/tailcall/tailcall/src/core/lambda/cache.rs
use std::pin::Pin;

use async_graphql_value::ConstValue;
use crate::core::value::Value;

use super::{Eval, EvaluationContext, EvaluationError, Expression, ResolverContextLike};

Expand Down Expand Up @@ -37,7 +37,7 @@
fn eval<'a, Ctx: ResolverContextLike<'a> + Sync + Send>(
&'a self,
ctx: EvaluationContext<'a, Ctx>,
) -> Pin<Box<dyn Future<Output = Result<ConstValue, EvaluationError>> + 'a + Send>> {
) -> Pin<Box<dyn Future<Output = Result<Value, EvaluationError>> + 'a + Send>> {
Box::pin(async move {
if let Expression::IO(io) = self.expr.deref() {
let key = io.cache_key(&ctx);
Expand Down
3 changes: 2 additions & 1 deletion src/core/lambda/eval.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use crate::core::value::Value;

Check warning on line 1 in src/core/lambda/eval.rs

View workflow job for this annotation

GitHub Actions / Run Formatter and Lint Check

Diff in /home/runner/work/tailcall/tailcall/src/core/lambda/eval.rs
use core::future::Future;
use std::pin::Pin;

use super::{EvaluationContext, EvaluationError, ResolverContextLike};

Check warning on line 5 in src/core/lambda/eval.rs

View workflow job for this annotation

GitHub Actions / Run Formatter and Lint Check

Diff in /home/runner/work/tailcall/tailcall/src/core/lambda/eval.rs

pub trait Eval<Output = async_graphql::Value>
pub trait Eval<Output = Value>
where
Self: Send + Sync,
{
Expand Down
17 changes: 6 additions & 11 deletions src/core/lambda/evaluation_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
use std::collections::BTreeMap;
use std::sync::Arc;

use async_graphql::{SelectionField, ServerError, Value};
use async_graphql::{SelectionField, ServerError};
use reqwest::header::HeaderMap;

use super::{GraphQLOperationContext, ResolverContextLike};
use crate::core::http::RequestContext;
use crate::core::value::Value;

// TODO: rename to ResolverContext
#[derive(Clone)]
Expand Down Expand Up @@ -60,9 +61,9 @@
} else if path.is_empty() {
self.graphql_ctx
.args()
.map(|a| Cow::Owned(Value::Object(a.clone())))
.map(|a| Cow::Owned(Value::as_object(a)))
} else {
let arg = self.graphql_ctx.args()?.get(path[0].as_ref())?;
let arg = self.graphql_ctx.args()?.get(path[0].as_ref())?.clone();

Check failure on line 66 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Check Examples

using `.clone()` on a double reference, which returns `&core::value::Value` instead of cloning the inner type

Check failure on line 66 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests (WASM)

using `.clone()` on a double reference, which returns `&core::value::Value` instead of cloning the inner type

Check failure on line 66 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Test AWS Lambda Build

using `.clone()` on a double reference, which returns `&core::value::Value` instead of cloning the inner type

Check failure on line 66 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Formatter and Lint Check

using `.clone()` on a double reference, which returns `&core::value::Value` instead of cloning the inner type
get_path_value(arg, &path[1..]).map(Cow::Borrowed)
}
}
Expand Down Expand Up @@ -168,14 +169,8 @@
let mut value = Some(input);
for name in path {
match value {
Some(Value::Object(map)) => {
value = map.get(name.as_ref());
}

Some(Value::List(list)) => {
value = list.get(name.as_ref().parse::<usize>().ok()?);
}
_ => return None,
Some(inp) => value = inp.get(name.as_ref()),
None => return None,
}
}

Expand Down Expand Up @@ -203,9 +198,9 @@
let async_value = Value::from_json(json).unwrap();

let path = vec!["a".to_string(), "b".to_string(), "c".to_string()];
let result = get_path_value(&async_value, &path);

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-ia32-gnu

mismatched types

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-gnu

mismatched types

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-ia32-gnu

mismatched types

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-musl

mismatched types

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-gnu

mismatched types

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-musl

mismatched types

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-arm64

mismatched types

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-x64

mismatched types

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-arm64-msvc

mismatched types

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-gnu

mismatched types

Check failure on line 201 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-msvc

mismatched types
assert!(result.is_some());
assert_eq!(result.unwrap(), &Value::String("d".to_string()));

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-ia32-gnu

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-gnu

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-ia32-gnu

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-musl

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-gnu

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-musl

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-arm64

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-x64

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-arm64-msvc

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-gnu

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 203 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-msvc

binary operation `==` cannot be applied to type `&core::value::Value`
}

#[test]
Expand All @@ -220,7 +215,7 @@
let async_value = Value::from_json(json).unwrap();

let path = vec!["a".to_string(), "b".to_string(), "c".to_string()];
let result = get_path_value(&async_value, &path);

Check failure on line 218 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-ia32-gnu

mismatched types

Check failure on line 218 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-gnu

mismatched types

Check failure on line 218 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-ia32-gnu

mismatched types

Check failure on line 218 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-gnu

mismatched types

Check failure on line 218 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-musl

mismatched types

Check failure on line 218 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-arm64

mismatched types

Check failure on line 218 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-x64

mismatched types

Check failure on line 218 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-arm64-msvc

mismatched types

Check failure on line 218 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-gnu

mismatched types

Check failure on line 218 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-msvc

mismatched types
assert!(result.is_none());
}

Expand All @@ -236,8 +231,8 @@
let async_value = Value::from_json(json).unwrap();

let path = vec!["a".to_string(), "0".to_string(), "b".to_string()];
let result = get_path_value(&async_value, &path);

Check failure on line 234 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-ia32-gnu

mismatched types

Check failure on line 234 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-gnu

mismatched types

Check failure on line 234 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-ia32-gnu

mismatched types

Check failure on line 234 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-gnu

mismatched types

Check failure on line 234 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-musl

mismatched types

Check failure on line 234 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-arm64

mismatched types

Check failure on line 234 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-x64

mismatched types

Check failure on line 234 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-arm64-msvc

mismatched types

Check failure on line 234 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-gnu

mismatched types

Check failure on line 234 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-msvc

mismatched types
assert!(result.is_some());
assert_eq!(result.unwrap(), &Value::String("c".to_string()));

Check failure on line 236 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-ia32-gnu

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 236 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-gnu

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 236 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-ia32-gnu

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 236 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-x64-gnu

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 236 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on linux-arm64-musl

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 236 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-arm64

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 236 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on darwin-x64

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 236 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-arm64-msvc

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 236 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-gnu

binary operation `==` cannot be applied to type `&core::value::Value`

Check failure on line 236 in src/core/lambda/evaluation_context.rs

View workflow job for this annotation

GitHub Actions / Run Tests on win32-x64-msvc

binary operation `==` cannot be applied to type `&core::value::Value`
}
}
Loading
Loading