invertase / melos

🌋 A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
https://melos.invertase.dev/~melos-latest
Apache License 2.0
1.13k stars 201 forks source link

Melos on Windows failed to build #645

Closed petrnymsa closed 7 months ago

petrnymsa commented 7 months ago

Is there an existing issue for this?

Version

4.1.0

Description

On Windows running any melos command results into error

/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:751:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> fromIterator(V anchor,

Steps to reproduce

dart pub global activate melos

>>>
Package melos is currently active at version 4.1.0.
The package melos is already activated at newest available version.
To recompile executables, first run `dart pub global deactivate melos`.
Installed executable melos.
Activated melos 4.1.0.

Then

melos --version

>>>

/C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:45:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> get iterator;
Details Failed to build melos:melos: /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:45:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get iterator; ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:49:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get reverseIterator; ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:58:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator fromIterator(V anchor, ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:742:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get iterator => _AvlTreeIterator._(this); ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:746:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get reverseIterator => ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:751:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator fromIterator(V anchor, ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:894:38: Error: Type 'BidirectionalIterator' not found. class _AvlTreeIterator implements BidirectionalIterator { ^^^^^^^^^^^^^^^^^^^^^ Failed to build melos:melos: /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:45:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get iterator; ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:49:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get reverseIterator; ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:58:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator fromIterator(V anchor, ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:742:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get iterator => _AvlTreeIterator._(this); ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:746:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get reverseIterator => ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:751:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator fromIterator(V anchor, ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:894:38: Error: Type 'BidirectionalIterator' not found. class _AvlTreeIterator implements BidirectionalIterator { ^^^^^^^^^^^^^^^^^^^^^ Failed to build melos:melos: /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:45:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get iterator; ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:49:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get reverseIterator; ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:58:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator fromIterator(V anchor, ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:742:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get iterator => _AvlTreeIterator._(this); ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:746:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get reverseIterator => ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:751:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator fromIterator(V anchor, ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:894:38: Error: Type 'BidirectionalIterator' not found. class _AvlTreeIterator implements BidirectionalIterator { ^^^^^^^^^^^^^^^^^^^^^ Failed to build melos:melos: /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:45:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get iterator; ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:49:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get reverseIterator; ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:58:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator fromIterator(V anchor, ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:742:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get iterator => _AvlTreeIterator._(this); ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:746:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator get reverseIterator => ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:751:3: Error: Type 'BidirectionalIterator' not found. BidirectionalIterator fromIterator(V anchor, ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/nymsa/AppData/Local/Pub/Cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:894:38: Error: Type 'BidirectionalIterator' not found. class _AvlTreeIterator implements BidirectionalIterator { ^^^^^^^^^^^^^^^^^^^^^

Expected behavior

Melos command works

Screenshots

No response

Additional context and comments

I tried:

spydon commented 7 months ago

Interesting, which dart version do you have?

petrnymsa commented 7 months ago

I have also FVM installed, maybe it is connected with #616 ? However

flutter --version

>>>
Flutter 3.16.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 78666c8dc5 (8 weeks ago) • 2023-12-19 16:14:14 -0800
Engine • revision 3f3e560236
Tools • Dart 3.2.3 • DevTools 2.28.4

and

dart --version
>>>
Dart SDK version: 3.2.3 (stable) (Tue Dec 5 17:58:33 2023 +0000) on "windows_x64"

➜ (Get-Command dart).Path  
C:\Users\nymsa\fvm\versions\3.16.5\bin\dart.bat
spydon commented 7 months ago

What does which melos say?

petrnymsa commented 7 months ago
(Get-Command melos).Path
C:\Users\nymsa\AppData\Local\Pub\Cache\bin\melos.bat
petrnymsa commented 7 months ago

Seems like fixed by running dart pub cache clean

spydon commented 7 months ago

Seems like fixed by running dart pub cache clean

Good to hear!

petrnymsa commented 7 months ago

@spydon should be reopened

First of all, happening on MacOS as well and dart pub cache clean do not work..

dart --version
Dart SDK version: 3.2.6 (stable) (Wed Jan 24 13:41:58 2024 +0000) on "macos_arm64"

dart pub global activate melos

Running melos --version

melos bs
Building package executable...
Failed to build melos:melos:
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:45:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> get iterator;
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:49:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> get reverseIterator;
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:58:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> fromIterator(V anchor,
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:742:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> get iterator => _AvlTreeIterator._(this);
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:746:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> get reverseIterator =>
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:751:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> fromIterator(V anchor,
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:894:38: Error: Type 'BidirectionalIterator' not found.
class _AvlTreeIterator<V> implements BidirectionalIterator<V> {
                                     ^^^^^^^^^^^^^^^^^^^^^
Failed to build melos:melos:
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:45:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> get iterator;
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:49:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> get reverseIterator;
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:58:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> fromIterator(V anchor,
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:742:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> get iterator => _AvlTreeIterator._(this);
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:746:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> get reverseIterator =>
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:751:3: Error: Type 'BidirectionalIterator' not found.
  BidirectionalIterator<V> fromIterator(V anchor,
  ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/quiver-3.0.1+1/lib/src/collection/treeset.dart:894:38: Error: Type 'BidirectionalIterator' not found.
class _AvlTreeIterator<V> implements BidirectionalIterator<V> {
                                     ^^^^^^^^^^^^^^^^^^^^^
spydon commented 7 months ago

There must be something strange with your local setup, I just tried on both windows and macos and it works fine. 🤔

Have you tried re-installing flutter? Or just changing channels back and forth is usually enough.

petrnymsa commented 7 months ago

I am using FVM though. No standalone flutter / dart on system

spydon commented 7 months ago

I am using FVM though. No standalone flutter / dart on system

And if you try setting another flutter version through fvm? Maybe your current one is corrupt?

spydon commented 7 months ago

Does fvm only have one cache for all installed binaries, no matter which version they were installed with?

petrnymsa commented 7 months ago

Reinstalled all fvm installations, cleared fvm list. only flutter 3.16.9 is activated. Still same issue