Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Revert "chore: re-enable TRYBUILD tests (#1086)" #1103

Merged
merged 1 commit into from
Jul 13, 2023
Merged
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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions packages/fuel-indexer-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ sha2 = "0.10"
syn = { version = "2.0", features = ["full"] }

[dev-dependencies]
# This is a workaround to avoid cyclic dependency problems. In short,
# during the publishing step, Cargo will strip dev-dependencies that
# don't have a version. This has worked for a number of high-profile crates.
# See https://github.com/rust-lang/futures-rs/pull/2305.
fuel-indexer-utils = { path = "../fuel-indexer-utils" }
fuel-indexer-plugin = { workspace = true }
fuels-macros = { version = "0.43", default-features = false }
fuels-types = { version = "0.42", default-features = false }
serde = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion packages/fuel-indexer-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ pub fn indexer(attrs: TokenStream, item: TokenStream) -> TokenStream {

#[cfg(test)]
mod tests {
#[test]
#[allow(unused)]
#[ignore = "Currently fails due to dependency issues in fuel-indexer-macros"]
fn test_success_and_failure_macros() {
let t = trybuild::TestCases::new();
let manifest_dir = env!("CARGO_MANIFEST_DIR");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ mod indexer {
}

fn main() {
use fuels::core::{codec::ABIEncoder, traits::Tokenizable};
use fuels::core::abi_encoder::ABIEncoder;
use fuels::types::traits::Tokenizable;

let s = SomeEvent {
id: 9,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
|
help: there is a crate or module with a similar name
|
32 | header: fuels::Header {
33 | header: fuels::Header {
| ~~~~~

error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
Expand All @@ -25,7 +25,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
|
help: there is a crate or module with a similar name
|
44 | transactions: vec![fuels::TransactionData {
45 | transactions: vec![fuels::TransactionData {
| ~~~~~

error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
Expand All @@ -36,7 +36,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
|
help: there is a crate or module with a similar name
|
48 | fuels::Receipt::Call {
49 | fuels::Receipt::Call {
| ~~~~~

error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
Expand All @@ -47,7 +47,7 @@ error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
|
help: there is a crate or module with a similar name
|
59 | fuels::Receipt::ReturnData {
60 | fuels::Receipt::ReturnData {
| ~~~~~

error[E0422]: cannot find struct, variant or union type `SomeEvent` in this scope
Expand All @@ -64,6 +64,8 @@ error[E0412]: cannot find type `BlockData` in this scope
|
help: consider importing one of these items
|
2 + use fuel_indexer_plugin::prelude::BlockData;
|
2 + use fuel_indexer_types::fuel::BlockData;
|
2 + use fuel_indexer_utils::plugin::prelude::BlockData;
Expand All @@ -77,6 +79,8 @@ error[E0422]: cannot find struct, variant or union type `BlockData` in this scop
|
help: consider importing one of these items
|
2 + use fuel_indexer_plugin::prelude::BlockData;
|
2 + use fuel_indexer_types::fuel::BlockData;
|
2 + use fuel_indexer_utils::plugin::prelude::BlockData;
Expand All @@ -90,18 +94,20 @@ error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
|
help: there is a crate or module with a similar name
|
45 | status: fuels::TransactionStatus::default(),
46 | status: fuels::TransactionStatus::default(),
| ~~~~~
help: consider importing one of these items
|
2 + use fuel_indexer_plugin::prelude::fuel::TransactionStatus;
|
2 + use fuel_indexer_types::fuel::TransactionStatus;
|
2 + use fuel_indexer_utils::plugin::prelude::fuel::TransactionStatus;
|
help: if you import `TransactionStatus`, refer to it directly
|
45 - status: fuel::TransactionStatus::default(),
45 + status: TransactionStatus::default(),
46 - status: fuel::TransactionStatus::default(),
46 + status: TransactionStatus::default(),
|

error[E0433]: failed to resolve: use of undeclared type `Transaction`
Expand All @@ -112,14 +118,15 @@ error[E0433]: failed to resolve: use of undeclared type `Transaction`
|
help: consider importing one of these items
|
2 + use fuel_indexer_plugin::prelude::fuel::Transaction;
|
2 + use fuel_indexer_types::fuel::Transaction;
|
2 + use fuel_indexer_utils::plugin::prelude::fuel::Transaction;
|
2 + use fuels::prelude::Transaction;
|
2 + use fuels_types::transaction::Transaction;
|
and 2 other candidates

error[E0425]: cannot find function `serialize` in this scope
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_abi_arg_includes_invalid_type.rs
Expand All @@ -131,6 +138,8 @@ help: consider importing one of these items
|
2 + use fuel_indexer_lib::utils::serialize;
|
2 + use fuel_indexer_plugin::serialize;
|
2 + use fuel_indexer_utils::plugin::serialize;
|

Expand All @@ -140,10 +149,10 @@ error[E0425]: cannot find function `handle_events` in this scope
| handle_events(ptr, len);
| ^^^^^^^^^^^^^ not found in this scope

error: unused import: `traits::Tokenizable`
error: unused import: `fuels::types::traits::Tokenizable`
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_abi_arg_includes_invalid_type.rs
|
| use fuels::core::{codec::ABIEncoder, traits::Tokenizable};
| ^^^^^^^^^^^^^^^^^^^
| use fuels::types::traits::Tokenizable;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mod indexer {
}

fn main() {
use fuels::core::{codec::ABIEncoder, traits::Tokenizable};
use fuels::{core::{codec::ABIEncoder}, traits::Tokenizable};

let s = SomeEvent {
id: 9,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,88 @@ error: custom attribute panicked
| #[indexer(manifest = "packages/fuel-indexer-tests/trybuild/bad_simple_wasm_graphql.yaml")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: message: Failed to parse GraphQL schema.: ParseError(Syntax { message: " --> 1:1\n |\n1 | namespace: test_namespace\n | ^---\n |\n = expected type_system_definition", start: Pos(1:1), end: None })
= help: message: Bad schema.: ParseError(Syntax { message: " --> 1:1\n |\n1 | namespace: test_namespace\n | ^---\n |\n = expected type_system_definition", start: Pos(1:1), end: None })

error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| header: fuel::Header {
| ^^^^ use of undeclared crate or module `fuel`
|
help: there is a crate or module with a similar name
|
32 | header: fuels::Header {
| ~~~~~

error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| transactions: vec![fuel::TransactionData {
| ^^^^ use of undeclared crate or module `fuel`
|
help: there is a crate or module with a similar name
|
45 | transactions: vec![fuels::TransactionData {
| ~~~~~

error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| fuel::Receipt::Call {
| ^^^^ use of undeclared crate or module `fuel`
|
help: there is a crate or module with a similar name
|
49 | fuels::Receipt::Call {
| ~~~~~

error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| fuel::Receipt::ReturnData {
| ^^^^ use of undeclared crate or module `fuel`
|
help: there is a crate or module with a similar name
|
60 | fuels::Receipt::ReturnData {
| ~~~~~

error[E0422]: cannot find struct, variant or union type `SomeEvent` in this scope
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| let s = SomeEvent {
| ^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `BlockData` in this scope
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| let data: Vec<BlockData> = vec![BlockData {
| ^^^^^^^^^ not found in this scope
|
help: consider importing one of these items
|
2 + use fuel_indexer_plugin::prelude::BlockData;
|
2 + use fuel_indexer_types::fuel::BlockData;
|
2 + use fuel_indexer_utils::plugin::prelude::BlockData;
|

error[E0422]: cannot find struct, variant or union type `BlockData` in this scope
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| let data: Vec<BlockData> = vec![BlockData {
| ^^^^^^^^^ not found in this scope
|
help: consider importing one of these items
|
2 + use fuel_indexer_plugin::prelude::BlockData;
|
2 + use fuel_indexer_types::fuel::BlockData;
|
2 + use fuel_indexer_utils::plugin::prelude::BlockData;
|

error[E0433]: failed to resolve: use of undeclared type `Consensus`
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
Expand All @@ -20,13 +94,37 @@ error[E0433]: failed to resolve: use of undeclared type `Consensus`
|
help: consider importing one of these items
|
2 + use crate::fuel::Consensus;
2 + use fuel_indexer_plugin::prelude::fuel::Consensus;
|
2 + use fuel_indexer_types::fuel::Consensus;
|
2 + use fuel_indexer_utils::plugin::prelude::fuel::Consensus;
|

error[E0433]: failed to resolve: use of undeclared crate or module `fuel`
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| status: fuel::TransactionStatus::default(),
| ^^^^ use of undeclared crate or module `fuel`
|
help: there is a crate or module with a similar name
|
47 | status: fuels::TransactionStatus::default(),
| ~~~~~
help: consider importing one of these items
|
2 + use fuel_indexer_plugin::prelude::fuel::TransactionStatus;
|
2 + use fuel_indexer_types::fuel::TransactionStatus;
|
2 + use fuel_indexer_utils::plugin::prelude::fuel::TransactionStatus;
|
help: if you import `TransactionStatus`, refer to it directly
|
47 - status: fuel::TransactionStatus::default(),
47 + status: TransactionStatus::default(),
|

error[E0433]: failed to resolve: use of undeclared type `Transaction`
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
Expand All @@ -35,32 +133,41 @@ error[E0433]: failed to resolve: use of undeclared type `Transaction`
|
help: consider importing one of these items
|
2 + use crate::fuel::Transaction;
2 + use fuel_indexer_plugin::prelude::fuel::Transaction;
|
2 + use fuel_indexer_types::fuel::Transaction;
|
2 + use fuel_indexer_utils::plugin::prelude::fuel::Transaction;
|
2 + use fuels::prelude::Transaction;
|
and 1 other candidate
and 2 other candidates

error[E0063]: missing field `producer` in initializer of `fuel_indexer_utils::prelude::BlockData`
error[E0425]: cannot find function `serialize` in this scope
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| let data: Vec<BlockData> = vec![BlockData {
| ^^^^^^^^^ missing `producer`
| let mut bytes = serialize(&data);
| ^^^^^^^^^ not found in this scope
|
help: consider importing one of these items
|
2 + use fuel_indexer_lib::utils::serialize;
|
2 + use fuel_indexer_plugin::serialize;
|
2 + use fuel_indexer_utils::plugin::serialize;
|

error[E0425]: cannot find function `handle_events` in this scope
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| handle_events(ptr, len);
| ^^^^^^^^^^^^^ not found in this scope

error: unused import: `traits::Tokenizable`
error: unused import: `types::traits::Tokenizable`
--> ../fuel-indexer-tests/trybuild/fail_if_attribute_schema_arg_is_invalid.rs
|
| use fuels::core::{codec::ABIEncoder, traits::Tokenizable};
| ^^^^^^^^^^^^^^^^^^^
| use fuels::{core::abi_encoder::ABIEncoder, types::traits::Tokenizable};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod indexer {
}

fn main() {
use fuels::core::codec::ABIEncoder;
use fuels::core::abi_encoder::ABIEncoder;

let s1 = SomeEvent {
id: 9,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mod indexer {
}

fn main() {
use fuels::core::codec::ABIEncoder;
use fuels::core::abi_encoder::ABIEncoder;

let s = SomeEvent {
id: 9,
Expand Down