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

Local dev experience tweaks #456

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

olexale
Copy link

@olexale olexale commented May 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant