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.11k stars 198 forks source link

Testing the shared dependencies #593

Closed Leylan24 closed 10 months ago

Leylan24 commented 10 months ago

Hi, I would like to test the shared dependencies that was merged in 2 days ago. I am trying to point melos to the git url, however when i perform a flutter pub upgrade i get an error. Is there a specific way I should do it. Currently:

pubspec.yaml

# Add regular dependencies here.
dependencies:
  melos:
    git:
      url: https://github.com/invertase/melos

the error i get when running flutter pub upgrade is:

PS D:\Github\a> flutter pub upgrade
Resolving dependencies... (5.5s)
Error on line 1, column 7: "name" field doesn't match expected name "melos".
  ╷
1 │ name: melos_workspace
  │       ^^^^^^^^^^^^^^^
  ╵
Leylan24 commented 10 months ago

Okay so I have managed to run melos locally and use the local melos instance. However i am still facing the issue where there is conflicting package versions.

i updated my melos to include the shared packages:

command:
  bootstrap:
    # It seems so that running "pub get" in parallel has some issues (like
    # https://github.com/dart-lang/pub/issues/3404). Disabling this feature
    # makes the CI much more stable.
    environment:
      sdk: ">=3.0.0 <4.0.0"
      flutter: ">=3.0.0 <4.0.0"
    dependencies:
      package1:
        git:
          url: https://github.com/Flutter-Apps-pty/package1
      package2:
        git:
          url: https://github.com/Flutter-Apps-pty/package2.git

these are only the shared dependencies and i still get the error:

melos bootstrap --help
---------------------------------------------------------
| You are running a local development version of melos. |
---------------------------------------------------------

Resolving dependencies... (3.2s)

Because every version of package2 from git depends on package1from hosted and test_app depends on package1 from git, package2 from git is forbidden.
So, because test_app depends on package2 from git, version solving failed.