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

Remove circular deps between KibanaApp team plugins #84750

Closed
5 tasks done
mshustov opened this issue Dec 2, 2020 · 3 comments
Closed
5 tasks done

Remove circular deps between KibanaApp team plugins #84750

mshustov opened this issue Dec 2, 2020 · 3 comments
Assignees
Labels
Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@mshustov
Copy link
Contributor

mshustov commented Dec 2, 2020

Circular deps block plugin migration to TS project references #80508 and new build toolchain #69706
The main goal o adding TS project refs is to speed up TypeScript compilation time, time check time, and IDE responsiveness for the whole Kibana project. That's why it's considered as one of the top priorities for the upcoming 7.12 release.
Documentation

List of circular deps:

We also have a cyclic dependency between expressions and visualizations that can be solved by moving the PersistedState from visualizations to expressions.

@mshustov mshustov added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Dec 2, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@timroes timroes added the Feature:Visualizations Generic visualization features (in case no more specific feature label is available) label Dec 2, 2020
@flash1293
Copy link
Contributor

node scripts/find_plugins_with_circular_deps --debug gives the offending imports:

 077) src/plugins/expressions/common/index.ts -> src/plugins/expressions/common/expression_functions/index.ts -> src/plugins/expressions/common/expression_functions/expression_function.ts -> src/plugins/expressions/common/execution/index.ts -> src/plugins/expressions/common/execution/container.ts -> src/plugins/expressions/common/executor/index.ts -> src/plugins/expressions/common/executor/executor.ts -> src/plugins/expressions/common/execution/execution.ts -> src/plugins/expressions/common/service/index.ts -> src/plugins/expressions/common/service/expressions_services.ts -> src/plugins/expressions/common/expression_renderers/index.ts -> src/plugins/expressions/common/expression_renderers/types.ts -> src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/visualize/public/index.ts -> src/plugins/visualize/public/plugin.ts -> src/plugins/visualize/public/application/index.tsx -> src/plugins/visualize/public/application/app.tsx -> src/plugins/visualize/public/application/components/index.ts -> src/plugins/visualize/public/application/components/visualize_listing.tsx -> src/plugins/visualize/public/application/utils/index.ts -> src/plugins/visualize/public/application/utils/use/index.ts -> src/plugins/visualize/public/application/utils/use/use_saved_vis_instance.ts -> src/plugins/visualize/public/application/utils/get_visualization_instance.ts -> src/plugins/discover/public/index.ts -> src/plugins/discover/public/plugin.ts -> src/plugins/charts/public/index.ts -> src/plugins/charts/public/plugin.ts -> src/plugins/charts/common/index.ts -> src/plugins/charts/common/palette.ts
        078) src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/visualize/public/index.ts -> src/plugins/visualize/public/plugin.ts -> src/plugins/visualize/public/application/index.tsx -> src/plugins/visualize/public/application/app.tsx -> src/plugins/visualize/public/application/components/index.ts -> src/plugins/visualize/public/application/components/visualize_listing.tsx -> src/plugins/visualize/public/application/utils/index.ts -> src/plugins/visualize/public/application/utils/use/index.ts -> src/plugins/visualize/public/application/utils/use/use_saved_vis_instance.ts -> src/plugins/visualize/public/application/utils/get_visualization_instance.ts -> src/plugins/discover/public/index.ts -> src/plugins/discover/public/plugin.ts -> src/plugins/charts/public/index.ts -> src/plugins/charts/public/static/index.ts -> src/plugins/charts/public/static/components/index.ts -> src/plugins/charts/public/static/components/basic_options.tsx
        079) src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/visualize/public/index.ts -> src/plugins/visualize/public/plugin.ts -> src/plugins/visualize/public/application/index.tsx -> src/plugins/visualize/public/application/app.tsx -> src/plugins/visualize/public/application/components/index.ts -> src/plugins/visualize/public/application/components/visualize_listing.tsx -> src/plugins/visualize/public/application/utils/index.ts -> src/plugins/visualize/public/application/utils/use/index.ts -> src/plugins/visualize/public/application/utils/use/use_saved_vis_instance.ts -> src/plugins/visualize/public/application/utils/get_visualization_instance.ts -> src/plugins/discover/public/index.ts -> src/plugins/discover/public/plugin.ts -> src/plugins/charts/public/index.ts -> src/plugins/charts/public/static/index.ts -> src/plugins/charts/public/static/components/index.ts -> src/plugins/charts/public/static/components/color_ranges.tsx
        080) src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/visualize/public/index.ts -> src/plugins/visualize/public/plugin.ts -> src/plugins/visualize/public/application/index.tsx -> src/plugins/visualize/public/application/app.tsx -> src/plugins/visualize/public/application/components/index.ts -> src/plugins/visualize/public/application/components/visualize_listing.tsx -> src/plugins/visualize/public/application/utils/index.ts -> src/plugins/visualize/public/application/utils/use/index.ts -> src/plugins/visualize/public/application/utils/use/use_saved_vis_instance.ts -> src/plugins/visualize/public/application/utils/get_visualization_instance.ts -> src/plugins/discover/public/index.ts -> src/plugins/discover/public/plugin.ts -> src/plugins/charts/public/index.ts -> src/plugins/charts/public/static/index.ts -> src/plugins/charts/public/static/components/index.ts -> src/plugins/charts/public/static/components/color_schema.tsx
        081) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/visualize/public/index.ts -> src/plugins/visualize/public/plugin.ts -> src/plugins/visualize/public/application/index.tsx -> src/plugins/visualize/public/application/app.tsx -> src/plugins/visualize/public/application/components/index.ts -> src/plugins/visualize/public/application/components/visualize_listing.tsx -> src/plugins/visualize/public/application/utils/index.ts -> src/plugins/visualize/public/application/utils/use/index.ts -> src/plugins/visualize/public/application/utils/use/use_vis_byvalue.ts
        082) src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/visualize/public/index.ts -> src/plugins/visualize/public/plugin.ts -> src/plugins/visualize/public/application/index.tsx -> src/plugins/visualize/public/application/app.tsx -> src/plugins/visualize/public/application/components/index.ts -> src/plugins/visualize/public/application/components/visualize_listing.tsx -> src/plugins/visualize/public/application/utils/index.ts -> src/plugins/visualize/public/application/utils/use/index.ts -> src/plugins/visualize/public/application/utils/use/use_vis_byvalue.ts
        083) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/visualize/public/index.ts -> src/plugins/visualize/public/plugin.ts -> src/plugins/visualize/public/application/index.tsx -> src/plugins/visualize/public/application/app.tsx -> src/plugins/visualize/public/application/components/index.ts -> src/plugins/visualize/public/application/components/visualize_byvalue_editor.tsx
        084) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx
        085) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx
        086) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx -> src/plugins/vis_default_editor/public/components/sidebar/index.ts -> src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx
        087) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx -> src/plugins/vis_default_editor/public/components/sidebar/index.ts -> src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/navbar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts
        088) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx -> src/plugins/vis_default_editor/public/components/sidebar/index.ts -> src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/navbar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts -> src/plugins/vis_default_editor/public/components/sidebar/data_tab.tsx -> src/plugins/vis_default_editor/public/components/agg_group.tsx -> src/plugins/vis_default_editor/public/components/agg.tsx -> src/plugins/vis_default_editor/public/components/agg_params.tsx -> src/plugins/vis_default_editor/public/components/agg_select.tsx -> src/plugins/vis_default_editor/public/components/agg_params_state.ts -> src/plugins/vis_default_editor/public/components/agg_params_helper.ts -> src/plugins/vis_default_editor/public/components/agg_param_props.ts -> src/plugins/vis_default_editor/public/components/sidebar/state/reducers.ts
        089) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx -> src/plugins/vis_default_editor/public/components/sidebar/index.ts -> src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/navbar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts -> src/plugins/vis_default_editor/public/components/sidebar/data_tab.tsx -> src/plugins/vis_default_editor/public/components/agg_group.tsx -> src/plugins/vis_default_editor/public/components/agg.tsx -> src/plugins/vis_default_editor/public/components/agg_params.tsx -> src/plugins/vis_default_editor/public/components/agg_select.tsx -> src/plugins/vis_default_editor/public/components/agg_params_state.ts -> src/plugins/vis_default_editor/public/components/agg_params_helper.ts -> src/plugins/vis_default_editor/public/components/agg_param_props.ts -> src/plugins/vis_default_editor/public/components/sidebar/state/reducers.ts -> src/plugins/vis_default_editor/public/components/sidebar/state/actions.ts
        090) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx -> src/plugins/vis_default_editor/public/components/sidebar/index.ts -> src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/navbar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts -> src/plugins/vis_default_editor/public/components/sidebar/data_tab.tsx -> src/plugins/vis_default_editor/public/components/agg_group.tsx -> src/plugins/vis_default_editor/public/components/agg.tsx -> src/plugins/vis_default_editor/public/components/agg_params.tsx -> src/plugins/vis_default_editor/public/components/agg_param.tsx -> src/plugins/vis_default_editor/public/components/agg_common_props.ts
        091) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx -> src/plugins/vis_default_editor/public/components/sidebar/index.ts -> src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/navbar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts -> src/plugins/vis_default_editor/public/components/sidebar/data_tab.tsx -> src/plugins/vis_default_editor/public/components/agg_group.tsx -> src/plugins/vis_default_editor/public/components/agg.tsx -> src/plugins/vis_default_editor/public/components/controls/rows_or_columns.tsx -> src/plugins/vis_default_editor/public/components/controls/agg_control_props.tsx
        092) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx -> src/plugins/vis_default_editor/public/components/sidebar/index.ts -> src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/navbar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts -> src/plugins/vis_default_editor/public/components/sidebar/data_tab.tsx -> src/plugins/vis_default_editor/public/components/sidebar/state/index.ts
        093) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx -> src/plugins/vis_default_editor/public/components/sidebar/index.ts -> src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/navbar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/use_option_tabs.ts -> src/plugins/vis_default_editor/public/vis_options_props.tsx
        094) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx -> src/plugins/vis_default_editor/public/components/sidebar/index.ts -> src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/controls.tsx
        095) src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/vis_types/index.ts -> src/plugins/visualizations/public/vis_types/types_service.ts -> src/plugins/visualizations/public/vis_types/base_vis_type.ts -> src/plugins/vis_default_editor/public/index.ts -> src/plugins/vis_default_editor/public/default_editor_controller.tsx -> src/plugins/vis_default_editor/public/default_editor.tsx -> src/plugins/vis_default_editor/public/components/sidebar/index.ts -> src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx -> src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx
        096) src/plugins/expressions/common/index.ts -> src/plugins/expressions/common/expression_functions/index.ts -> src/plugins/expressions/common/expression_functions/expression_function.ts -> src/plugins/expressions/common/execution/index.ts -> src/plugins/expressions/common/execution/container.ts -> src/plugins/expressions/common/executor/index.ts -> src/plugins/expressions/common/executor/executor.ts -> src/plugins/expressions/common/execution/execution.ts -> src/plugins/expressions/common/service/index.ts -> src/plugins/expressions/common/service/expressions_services.ts -> src/plugins/expressions/common/expression_renderers/index.ts -> src/plugins/expressions/common/expression_renderers/types.ts -> src/plugins/visualizations/public/index.ts -> src/plugins/visualizations/public/plugin.ts -> src/plugins/visualizations/public/expressions/visualization_renderer.tsx -> src/plugins/visualizations/public/components/index.ts -> src/plugins/visualizations/public/components/visualization_container.tsx

@stratoula
Copy link
Contributor

It seems that kibana-app-services work on eliminating dependencies has also removed the charts <--> expressions circular dependencies #82791

alexwizp added a commit to alexwizp/kibana that referenced this issue Dec 22, 2020
alexwizp added a commit to alexwizp/kibana that referenced this issue Dec 22, 2020
alexwizp added a commit to alexwizp/kibana that referenced this issue Jan 11, 2021
alexwizp added a commit that referenced this issue Jan 12, 2021
…endencies (#87797)

* Remove src/plugins/visualizations -> src/plugins/visualize cyclic dependencies

Part of #84750

* fix types
alexwizp added a commit to alexwizp/kibana that referenced this issue Jan 12, 2021
…endencies (elastic#87797)

* Remove src/plugins/visualizations -> src/plugins/visualize cyclic dependencies

Part of elastic#84750

* fix types
alexwizp added a commit to alexwizp/kibana that referenced this issue Jan 12, 2021
alexwizp added a commit that referenced this issue Jan 12, 2021
…endencies (#87797) (#87977)

* Remove src/plugins/visualizations -> src/plugins/visualize cyclic dependencies

Part of #84750

* fix types
alexwizp added a commit that referenced this issue Jan 13, 2021
* [Visualize] Remove circular deps between KibanaApp team plugins

Part of #84750

* Update use_vis_byvalue.ts

* Update use_saved_vis_instance.ts

* add types

* fix CI

Co-authored-by: Kibana Machine <[email protected]>
alexwizp added a commit to alexwizp/kibana that referenced this issue Jan 13, 2021
…tic#87994)

* [Visualize] Remove circular deps between KibanaApp team plugins

Part of elastic#84750

* Update use_vis_byvalue.ts

* Update use_saved_vis_instance.ts

* add types

* fix CI

Co-authored-by: Kibana Machine <[email protected]>
@alexwizp alexwizp self-assigned this Jan 13, 2021
alexwizp added a commit that referenced this issue Jan 13, 2021
…) (#88141)

* [Visualize] Remove circular deps between KibanaApp team plugins

Part of #84750

* Update use_vis_byvalue.ts

* Update use_saved_vis_instance.ts

* add types

* fix CI

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

6 participants