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

JetBrains IDE (IntelliJ) does not understand workspaces (always suggests to run pub get even when it's been run) #7623

Open
jwren opened this issue Aug 22, 2024 · 6 comments

Comments

@jwren
Copy link
Member

jwren commented Aug 22, 2024

Tracking issue for dart-lang/sdk#56380 in the flutter/flutter-intellij bug repo.

@jwren
Copy link
Member Author

jwren commented Aug 22, 2024

Using the latest version of the Flutter IJ plugin, 2024.2, Flutter IJ plugin 242.20629, I get the following when I run dart pub get with the flutter/engine repository I am getting this error:

Because _engine_workspace depends on yaml from path which doesn't exist (could not find package yaml at "third_party/dart/third_party/pkg/yaml"), version
  solving failed.

And this error from the Dart IJ plugin:

java.lang.IllegalStateException: access contentManager when it's not yet available
	at com.intellij.ui.content.impl.MessageViewImpl.getContentManager(MessageViewImpl.kt:47)
	at com.jetbrains.lang.dart.ide.actions.DartPubActionBase.findExistingInfoForCommand(DartPubActionBase.java:308)
	at com.jetbrains.lang.dart.ide.actions.DartPubActionBase.showPubOutputConsole(DartPubActionBase.java:260)
	at com.jetbrains.lang.dart.ide.actions.DartPubActionBase.doPerformPubAction(DartPubActionBase.java:242)
	at com.jetbrains.lang.dart.ide.actions.DartPubActionBase.performPubAction(DartPubActionBase.java:207)
	at com.jetbrains.lang.dart.ide.inspections.DartOutdatedDependenciesInspection$RunPubFix.applyFix(DartOutdatedDependenciesInspection.java:139)
...

@jwren jwren removed their assignment Aug 22, 2024
@helin24 helin24 self-assigned this Sep 9, 2024
@brian-superlist
Copy link

brian-superlist commented Sep 19, 2024

To add onto this: Tests also always run flutter pub get before executing the tests as well, slowing down test execution.

To reproduce:

  1. Create unit / widget test
  2. Run test
  3. See pub get executed
  4. See results (pass / fail)
  5. Run again
  6. Pub get run again

@jwren jwren modified the milestones: M82, M83 Oct 9, 2024
@sigurdm
Copy link

sigurdm commented Oct 22, 2024

@helin24 is this on track? We'd love workspaces to work also in intellij with the release of dart 3.6.

Feel free to reach out if you need help with anything.

@jwren jwren assigned jwren and unassigned helin24 Oct 22, 2024
@jwren jwren added the P1 label Oct 22, 2024
@sigurdm
Copy link

sigurdm commented Oct 24, 2024

I tried to reproduce the issue

I used

  • IntelliJ IDEA 2022.3.3 (Community Edition)
  • Dart plugin 223.8977
  • Dart from Flutter 3.24.3 • channel stable

Even in a non-workspace, I always have the button that suggests to run pub get.

Is there some other suggestion that is depending on the freshness of the resolution?

image

Also I tried loading the engine with the third_party/dart/third_party/pkg/yaml missing. I got an error from pub get (as expected) but I did not see the java.lang.IllegalStateException: - maybe there is some console I am missing.

@sigurdm
Copy link

sigurdm commented Oct 25, 2024

Is there some other suggestion that is depending on the freshness of the resolution?

I realized I was only using the dart plugin - not the flutter plugin.

maybe there is some console I am missing.

Ah - these logs come in the terminal when intellij is started from terminal...

Ok - still haven't reproduced exactly - but I'm getting closer...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants