-
Notifications
You must be signed in to change notification settings - Fork 231
dart pub get --no-dev-dependencies
#4570
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
Comments
One workaround for some use cases is to make a "dummy" package with a single (path) dependency on the downloaded package. That is in principle how eg. |
That does indeed only |
Can you explain your use case in more detail? Why do you want to download a package from pub in a script and do |
cc @mosuem |
There is a breaking API check done in PR health checks via the https://github.com/bmw-tech/dart_apitool, which compares the API of the latest published version of a package to the one in a PR. This needs to analyze the API of a package downloaded from pub. cc @devmil |
We have before discussed some kind of "production" mode of
I think we have always punted it because you can do the workaround above. But I think it is a meaningful thing to do in many cases. @jonasfj WDYT? |
That doesn't mean you need to download the package from pub.dev and run You make a dummy package that depends on the target package, then resolve the dummy package and run the analyzer in said context. Problem with For For running tools we have Thus, I could question if we even need a "production" mode, because you should build AOT and then use the binary in production. |
We have the following repository structure:
I don't want to publish
lints_for_this_repo
andtools_for_this_repo
, they are just for the repository, not for the larger Dart eco system.On most use cases using dev path dependencies (either directly, or via a pub workspace) is fine:
git clone
you'll have the other packages at the paths.pub get
withmy_package
will not requirelints_for_this_repo
.However, there are use cases in a package might be downloaded from pub in a script, and that script then does pub get. This use case is not supported, because the dev dependencies don't exist on pub or on the path.
package_graph.json
fallback native#2266 (comment)Should we consider having a
dart pub get --no-dev-dependencies
?Or should we make a best practice that someone should publish unlisted packages for these use cases such as your own custom lints and tools?
The text was updated successfully, but these errors were encountered: