injectable icon indicating copy to clipboard operation
injectable copied to clipboard

Local dev experience tweaks

Open olexale opened this issue 1 year ago • 0 comments

With this PR I propose some minor repo chores that will make the maintenance of the package slightly easier:

  1. Drop pubspec.lock files from packages. According to the official recommendation, pubspec.lock files should not be commited unless it is an application. I noticed in the commit history that some contributors struggled with conflicts in these files.
  2. Replace the // used for testing comment with the @visibleForTesting annotation. That will make the analyzer complain if someone accidentally misuses DependencyConfig factories.
  3. Use dependency_overrides for forcing packages to use dependencies via path. According to the documentation

Only the dependency overrides in a package's own pubspec are considered during package resolution. Dependency overrides inside any depended-on packages are ignored. As a result, if you publish a package to pub.dev, keep in mind that your package's dependency overrides are ignored by all users of your package.

Hence such a change removes the need of updating dependencies in pubspec.yaml files for local development, keeping the behavior the same for the actual users. More robust approach would be to use melos, but for two packages in the repo that might be an overkill.

olexale avatar May 06 '24 09:05 olexale