4
In Dart, we specify dependencies through pubspec.yaml
through indicators of the desired version (similar to gemfile
for Ruby or the composer.json
for PHP). From this list of dependencies and versions, the Dart SDK itself works to compile this information for what is in fact wearing, currently. The result of this compilation is the file pubspec.lock
.
It is recommended (by documentation of Dart himself), in libraries, do not submit this file to the version system; on the other hand, to applications, the recommendation is go up that file, so that all developers get the same dependency on that point of code.
Doing maintenance on an application, I noticed that there was a change in the pubspec.lock
: an addiction ceased to be "transitive" to be "direct main".
Example of dependency transitive/direct main:
packages: _fe_analyzer_shared: dependency: transitive description: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted version: "1.0.0" analyzer: dependency: "direct main" description: name: analyzer url: "https://pub.dartlang.org" source: hosted version: "0.39.1"
My question is: what differs a dependency transitive of a direct main?