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

fix: Wrong format of dependency_overrides package #821

Closed
1 task done
vietstone-ng opened this issue Jan 7, 2025 · 6 comments
Closed
1 task done

fix: Wrong format of dependency_overrides package #821

vietstone-ng opened this issue Jan 7, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@vietstone-ng
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Version

6.3.0

Description

The format of dependency_overrides packages (in pubspec_overrides.yaml) is wrong with version 6.3.0

  camera_android:
    url: https://github.com/my-name/packages.git
    ref: main
    path: packages/camera/camera_android

It's correct with version 6.2.0

  camera_android:
    git:
      url: https://github.com/my-name/packages.git
      ref: main
      path: packages/camera/camera_android

Steps to reproduce

melos: 6.3.0

Expected behavior

6.3.0 should has the same correct format of dependency_overrides as 6.2.0

  camera_android:
    git:
      url: https://github.com/my-name/packages.git
      ref: main
      path: packages/camera/camera_android

Screenshots

No response

Additional context and comments

No response

@vietstone-ng vietstone-ng added the bug Something isn't working label Jan 7, 2025
@spydon
Copy link
Collaborator

spydon commented Jan 7, 2025

Can you post your full pubspec_overrides.yaml file?

@mrverdant13
Copy link
Contributor

I am facing the very same issue.

pubspec.yaml

name: altoke_common_brick_hooks
publish_to: none

environment:
  sdk: ">=3.6.0 <4.0.0"

dependencies:
  mason: ^0.1.0
  path: ^1.9.0
  shell:
    path: ../../../../tools/shell
  value_equality_approach:
    path: ../../../../tools/value_equality_approach

dev_dependencies:
  very_good_analysis: ^7.0.0

dependency_overrides:
  shell:
    git:
      url: https://github.com/mrverdant13/altoke_bricks.git
      ref: 575389c0d0d0752834361c4b4be6888ef4e32f83
      path: ./tools/shell/
  value_equality_approach:
    git:
      url: https://github.com/mrverdant13/altoke_bricks.git
      ref: 575389c0d0d0752834361c4b4be6888ef4e32f83
      path: ./tools/value_equality_approach/

pubspec_overrides.yaml (where the git key is missing)

# melos_managed_dependency_overrides: shell,value_equality_approach
dependency_overrides:
  shell:
    url: https://github.com/mrverdant13/altoke_bricks.git
    ref: 575389c0d0d0752834361c4b4be6888ef4e32f83
    path: ./tools/shell/
  value_equality_approach:
    url: https://github.com/mrverdant13/altoke_bricks.git
    ref: 575389c0d0d0752834361c4b4be6888ef4e32f83
    path: ./tools/value_equality_approach/

The same result is generated when not setting any version nor path for the shell and value_equality_approach internal deps.

More context:
OS: macOS
Dart SDK: 3.6.0
Melos: 6.3.0

@vietstone-ng
Copy link
Author

Oh, I missed your comment @spydon
But the problem is as exact as the file by @mrverdant13

@spydon
Copy link
Collaborator

spydon commented Jan 10, 2025

Oh, I missed your comment @spydon
But the problem is as exact as the file by @mrverdant13

I found the problem, try to downgrade to Melos 6.2.0 for now.

@spydon
Copy link
Collaborator

spydon commented Jan 10, 2025

@vietstone-ng @mrverdant13 I just published v6.3.1 with a hot patch for this, can you try it out? You'll have to run melos clean first, to remove the faulty yaml, since it can't be parsed.

If you want to you can also start migrating to 7.0.0 by using v7.0.0-dev.3 if you want, that version uses the pub workspaces feature and will hopefully soon be released to stable. The issue is fixed in there too.

@spydon spydon closed this as completed Jan 10, 2025
@mrverdant13
Copy link
Contributor

I can confirm this issue got fixed in 6.3.1

Thanks, @spydon
Really appreciate the real quick support


I am avoiding pub workspaces for now as I have some projects that rely on the custom_lint package, which is not compatible with package config subsets at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants