You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I changed tests to assert JSON output instead of using structs because the generated structs are in a private module.
You could revert that change if the output types are made public, which might also be helpful for docs.
Error:
d@Delta-Shopify shopify-function-rust % cargo t
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
Compiling shopify_function_macro v0.5.0 (/Users/d/src/github.com/Shopify/shopify-function-rust/shopify_function_macro)
Compiling shopify_function v0.5.0 (/Users/d/src/github.com/Shopify/shopify-function-rust/shopify_function)
Compiling example_with_targets v1.0.0 (/Users/d/src/github.com/Shopify/shopify-function-rust/example_with_targets)
Compiling example v1.0.0 (/Users/d/src/github.com/Shopify/shopify-function-rust/example)
error[E0603]: module `output` is private
--> example_with_targets/src/tests.rs:16:37
|
16 | let expected = crate::target_a::output::FunctionTargetAResult { status: Some(200) };
| ^^^^^^ --------------------- struct `FunctionTargetAResult` is not publicly re-exported
| |
| private module
|
note: the module `output` is defined here
--> example_with_targets/src/lib.rs:4:1
|
4 | / #[shopify_function_target(
5 | | // Implicit target = "example.target-a"
6 | | // Implicit generated module name = "target_a"
7 | | query_path = "a.graphql",
8 | | schema_path = "schema.graphql"
9 | | )]
| |__^
= note: this error originates in the attribute macro `shopify_function_target` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0603]: module `output` is private
--> example_with_targets/src/tests.rs:32:34
|
32 | let expected = crate::mod_b::output::FunctionTargetBResult {
| ^^^^^^ --------------------- struct `FunctionTargetBResult` is not publicly re-exported
| |
| private module
|
note: the module `output` is defined here
--> example_with_targets/src/lib.rs:16:1
|
16 | / #[shopify_function_target(
17 | | // Explicit target if function name does not match target handle
18 | | target = "example.target-b",
19 | | // Override generated module name
... |
22 | | schema_path = "schema.graphql"
23 | | )]
| |__^
= note: this error originates in the attribute macro `shopify_function_target` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0603`.
error: could not compile `example_with_targets` (lib test) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
I changed tests to assert JSON output instead of using structs because the generated structs are in a private module.
You could revert that change if the output types are made public, which might also be helpful for docs.
Error:
Originally posted by @dphm in #51 (comment)
The text was updated successfully, but these errors were encountered: