Skip to content

Cyclic deps with test_store #4443

Closed
Closed
@gusinacio

Description

@gusinacio

Do you want to request a feature or report a bug?
Bug

What is the current behavior?

Currently, rust-analyzer can't index the whole project because of some cyclic deps.

[ERROR project_model::workspace] cyclic deps: graph_core(CrateId(175)) -> graph_chain_substreams(CrateId(172)), alternative path: graph_chain_substreams(CrateId(172)) -> graph_core(CrateId(175))
[ERROR project_model::workspace] cyclic deps: test_store(CrateId(431)) -> graph(CrateId(156)), alternative path: graph(CrateId(156)) -> test_store(CrateId(431))
[ERROR project_model::workspace] cyclic deps: test_store(CrateId(431)) -> graph_chain_ethereum(CrateId(166)), alternative path: graph_chain_ethereum(CrateId(166)) -> graph(CrateId(156)) -> test_store(CrateId(431))
[ERROR project_model::workspace] cyclic deps: test_store(CrateId(431)) -> graph_graphql(CrateId(177)), alternative path: graph_graphql(CrateId(177)) -> graph(CrateId(156)) -> test_store(CrateId(431))
[ERROR project_model::workspace] cyclic deps: test_store(CrateId(431)) -> graph_mock(CrateId(181)), alternative path: graph_mock(CrateId(181)) -> graph(CrateId(156)) -> test_store(CrateId(431))
[ERROR project_model::workspace] cyclic deps: test_store(CrateId(431)) -> graph_node(CrateId(182)), alternative path: graph_node(CrateId(182)) -> graph(CrateId(156)) -> test_store(CrateId(431))
[ERROR project_model::workspace] cyclic deps: test_store(CrateId(431)) -> graph_store_postgres(CrateId(195)), alternative path: graph_store_postgres(CrateId(195)) -> graph(CrateId(156)) -> test_store(CrateId(431))

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Using rust-analyzer analysis-stats . or using the VSCode extension in the project gives this problem.

The development mainly of tests is more difficult because there are a lot of the following error in functions from test-store:

expected &{unknown}, found &<Type>

It just affects the rust-analyzer, cargo continues to build well.

What is the expected behavior?

It should index all the files from the different project of the workspace using rust-analyzer.

This may not be a problem with graph-node but with rust-analyzer. There's this issue on their repository with other people with the same problem but graph-node has cyclics depenencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions