Closed michaelnjuguna closed 1 month ago
What is the use case?
Does https://dart.dev/tools/pub/dependencies#dependency-overrides solve the problem? It allows to use a local dependency instead of a hosted one.
We also are launching pub workspaces
. It also provides ways to test sets of related packages together before publishing.
See preliminary documentation at https://github.com/dart-lang/site-www/pull/6117
It's use case is that after creating a pub package, the developer can then link the package locally and test it in another project
Does https://dart.dev/tools/pub/dependencies#dependency-overrides solve the problem? It allows to use a local dependency instead of a hosted one.
It wouldn't hurt to have a CLI option
Generally we try to avoid having implicit configuration.
Having overrides explicit in the local project is IMO preferable as it makes it more clear what is going (harder to forget to turn it off).
If you want to have an override that is not seen by git status
you can use the file pubspec_overrides.yaml
to make the override.
To do it from the cli:
$ echo 'dependency_overrides: {foo: {path: path/to/foo}}' > pubspec_overrides.yaml
Perhaps we should have a command
$ dart pub override <pkg>:<descriptor>
For updating the overrides from the command line...
A symbolic link similar to npm link in npm that developers can use to test their packages locally before deploying them