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

request: Untracked, local additions to pubspec_overrides.yaml #409

Closed
1 task done
hacker1024 opened this issue Oct 17, 2022 · 2 comments · Fixed by #410
Closed
1 task done

request: Untracked, local additions to pubspec_overrides.yaml #409

hacker1024 opened this issue Oct 17, 2022 · 2 comments · Fixed by #410

Comments

@hacker1024
Copy link
Contributor

hacker1024 commented Oct 17, 2022

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

No response

Description

An untracked file called melos_overrides.yaml can be placed in the monorepo alongside the melos.yaml file. Melos will add the packages listed in this file to all generated pubspec_overrides.yaml files.

Reasoning

It's convenient sometimes to use local copies of packages that are outside a monorepo, but being developed concurrently.

dependencyA/
dependencyB/
project/
├─ packageA/
├─ packageB/
├─ melos.yaml

These dependencies could be added to each monorepo package's pubspec_overrides.yaml.
Melos generates this file, and provides no option at the moment to add external packages in this fashion.

melos_overrides.yaml

dependency_overrides:
  - ../dependencyA
  - ../dependencyB

Additional context and comments

No response

@hacker1024 hacker1024 added feature request Needs: Triage The issue needs triaging labels Oct 17, 2022
@blaugold
Copy link
Collaborator

blaugold commented Oct 17, 2022

I think this feature request makes sense.

Maybe the following info helps meanwhile:

  • You can add dependency_overrides to pubspec.yaml files of individual packages and those will be merged into the generated pubspec_overrides.yaml file.
  • You can directly add dependency_overrides in pubspec_overrides.yaml files in addition to those added by Melos. Melos will only touch those dependencies listed in the # melos_managed_dependency_overrides: comment.

@blaugold blaugold removed the Needs: Triage The issue needs triaging label Oct 17, 2022
hacker1024 added a commit to hacker1024/melos that referenced this issue Oct 18, 2022
…rtase#409)

This is limited to packages within the workspace directory, but symlinks can be used to work around this.

invertase#43
@hacker1024
Copy link
Contributor Author

I have made a PR mostly implementing the feature discussed here. The one difference is that external paths cannot be used due to the design of the glob expression resolver, but this can be resolved with a symlink.

blaugold pushed a commit to hacker1024/melos that referenced this issue Dec 20, 2022
…rtase#409)

This is limited to packages within the workspace directory, but symlinks can be used to work around this.

invertase#43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants