Skip to content

Flutter Inspector is gone after 59.0.4 #5694

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

Open
shinayser opened this issue Aug 2, 2021 · 16 comments
Open

Flutter Inspector is gone after 59.0.4 #5694

shinayser opened this issue Aug 2, 2021 · 16 comments
Labels
Milestone

Comments

@shinayser
Copy link

Just upgraded to 59.0.4 and my flutter inspector is gone from the lateral tab.
Where do I find it now?

I am using Intellij Community 2021.2

image

@josh-burton
Copy link

josh-burton commented Aug 2, 2021

It seems this must be related to Skip Flutter tool windows for non-Flutter projects (WIP) (#5622).

I've tried to find a way to configure my project as a Flutter project by adding a Flutter facet but it's not available as an option.

It seems the plugin enables the Flutter windows when it determines the module is a Flutter module. This is determined by this method:

public static boolean isFlutterModule(@Nullable final Module module) {

This particular project is a multi module project, with this structure:

root_folder
	/src
		/client
			/app - flutter app
			/packages
					/package1 - flutter package
					/package2 - flutter package
			

I guess since the root_folder is not a dart/flutter module it's not detecting this project as a Flutter project.

@helin24 do you have any ideas of how to solve this or does the new tool window logic need to be reverted?

@josh-burton
Copy link

I was able to work around this by going to Project settings -> Modules and manually adding my modules by using the + -> Import Module.

I think this should work out of the box though.

@helin24
Copy link
Member

helin24 commented Aug 2, 2021

@josh-burton that's what I was about to suggest, but I agree it would be better if we checked for these projects initially.

@shinayser are you also in a situation where your flutter project is below the top-level project that you have open?

@shinayser
Copy link
Author

shinayser commented Aug 2, 2021

@josh-burton that's what I was about to suggest, but I agree it would be better if we checked for these projects initially.

@shinayser are you also in a situation where your flutter project is below the top-level project that you have open?

Yes, I am using monorepo architecture.
The benefits_app is the flutter module that contains the "main.dart". The other modules are simple library modules.

image

@josh-burton
Copy link

I think another option would be to just enable dart support on the top level folder/module in project settings (I haven't tested this):

Screen Shot 2021-08-03 at 9 39 29 AM

@shinayser
Copy link
Author

shinayser commented Aug 2, 2021

I think another option would be to just enable dart support on the top level folder/module in project settings (I haven't tested this):

Just tested this one without success.

@stevemessick
Copy link
Member

The Flutter plugin requires a pubspec.yaml in the top-level project directory. We have an issue to change this, but until it is addressed you are going to find various problems working with this repository structure.

@shinayser
Copy link
Author

shinayser commented Aug 3, 2021

The Flutter plugin requires a pubspec.yaml in the top-level project directory. We have an issue to change this, but until it is addressed you are going to find various problems working with this repository structure.

The plug-in was working "ok" until this morning, when I updated to 59.0.4

@AlexV525
Copy link
Member

AlexV525 commented Aug 3, 2021

Kapture.2021-08-03.at.10.10.19.mp4

Facing the same issue, some projects are unable to activate the inspector window after upgraded the plugin from 58.0.4 to 59.0.4. Also no logs for IDEA were produced in the console.

@josh-burton
Copy link

The Flutter plugin requires a pubspec.yaml in the top-level project directory. We have an issue to change this, but until it is addressed you are going to find various problems working with this repository structure.

Seems like this change should be reverted until others areas of the plugin are ready for a mono repo structure.

@stevemessick
Copy link
Member

@shinayser

The plug-in was working "ok" until this morning, when I updated to 59.0.4

That statement puzzles me. If you opened a project which contains a Flutter project, none of the Flutter-specific functionality should be available. Had you done something to configure it to sort-of work? I'm sure that not everything worked, but maybe enough was available to look like it worked.

@shinayser
Copy link
Author

@shinayser

The plug-in was working "ok" until this morning, when I updated to 59.0.4

That statement puzzles me. If you opened a project which contains a Flutter project, none of the Flutter-specific functionality should be available. Had you done something to configure it to sort-of work? I'm sure that not everything worked, but maybe enough was available to look like it worked.

I mean, the side "Flutter inspectors" bars were working fine. They were all appearing and workign as properly.

@stevemessick
Copy link
Member

Well, it seems you were able to use some parts of the Flutter plugin, but a number of UI features were already missing for you.

Let me rephrase my original comment. We currently only support Flutter projects that are opened as top-level projects.

I tend to agree, though, that this sort of complex project ought to be supported. I think we may need to change some plans to adapt. @devoncarew for consideration.

@stevemessick stevemessick added this to the On Deck milestone Aug 9, 2021
@AlexV525

This comment has been minimized.

@mono0926
Copy link

mono0926 commented Oct 1, 2021

I was able to work around this by adding this to the top-level project directory:

# https://github.com/flutter/flutter-intellij/issues/5694
name: dummy
publish_to: 'none'
dependencies:
  flutter:
    sdk: flutter

@yimao009
Copy link

yimao009 commented Mar 1, 2022

#5388
In Project Settings clicked Add Content Root

@helin24 helin24 added the wip label Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants