Questions tagged [dependencies]

A dependency exists between two elements if changes to the definition of one element may cause changes to the other.

A dependency exists between two elements if changes to the definition of one element may cause changes to the other.

To quote from the 3rd edition of UML Distilled:

An element C (the client) depends on an element S (the supplier) if and only if changes to the definition of S may cause changes to C.

If the elements are classes, only the direct cause for change (i.e. not through a ripple effect) is called a dependency, i.e. the relation is not transitive.

For packages, C depends on S if a class in C depends on a class in S. Sometimes, the transitive closure is taken, i.e. the dependency of C on a package T can be caused by C depending on S depending on T via class dependencies.

References:

  1. Understanding Dependencies
  2. What is the difference between dependency and association?
12826 questions
5
votes
4 answers

Where do I add repositories in my root-level build.gradle file?

Recently, I updated my Android Studio to Bumblebee(stable version) that was released around 2 weeks back. The structure of the build.gradle(root-level) file seems to have changed a lot since the last version. I am facing issue in adding dependencies…
5
votes
1 answer

Copying node_modules into a dockerfile vs installing them

I’ve been tasked with dockerizing our Node app at work. When it comes to node_modules, I’m in a bit of a disagreement with our lead dev. He is advocating for something like this in the dockerfile. His reasoning is that the docker image will be more…
J. Munson
  • 2,275
  • 2
  • 17
  • 22
5
votes
1 answer

Newtonsoft.Json dependency not publishing with the right version on "dotnet publish -o "

Problem So basically, i'm in DLL hell. I have a dotnet 5.0 + react project where a C# dependency (I assume Microsoft.AspNetCore.Mvc.NewtonsoftJson) needs another one Newtonsoft.Json. When building and publishing in release or debug in the bin…
Nathan G-T
  • 81
  • 6
5
votes
3 answers

Grails Project - Common Java Project Dependency in Eclipse

All, We have standard java projects that contain our common data model, common util classes, etc... What I can’t seem to figure out is how, to make my Grails project (in Eclipse) have a dependency on the other standard (non Grails) java project in…
Kasturi
  • 3,335
  • 3
  • 28
  • 42
5
votes
8 answers

In C++, how can I avoid #including a header file when I need to use an enumeration?

In my C++ header files I try to use forward declarations (class MyClass;) instead of #including the class header, as recommended in many C++ coding standards (the Google C++ Style Guide is one). Unfortunately, when I introduce enumerations, I can't…
chrisp451
  • 85
  • 1
  • 6
5
votes
1 answer

Multiple Kotlin Runtimes in the same Flutter app

I'm building a Flutter app that uses some packages. Some of those packages bundle a Kotlin runtime. And of course, different packages use different Kotlin runtimes. And, in addition, there's a lot of native code in my app that, of course, also…
Roc Boronat
  • 11,395
  • 5
  • 47
  • 59
5
votes
1 answer

Optionally exclude some dependencies when `pip install`ing

setuptools provides, as is often used, a way to specify optional dependencies with extras_require. Is there a way to do the opposite? That is, to have pip install mypackage install a full set of dependencies, but to have something like pip install…
Linuxios
  • 34,849
  • 13
  • 91
  • 116
5
votes
0 answers

How do I load JARs into the Runtime Dynamically in Java 16?

I have taken a look here before to see how I could load the jar into the classpath dynamically. At the time, this solution proposed worked flawlessly: File file = ... URL url = file.toURI().toURL(); URLClassLoader classLoader =…
Brandon Li
  • 63
  • 1
  • 1
  • 6
5
votes
0 answers

Yarn workspaces shared dependencies

I'm trying to build a project that uses yarn workspaces. And here's what I want to accomplish in my setup: > root > packages > client package.json - graphql > server package.json - graphql …
5
votes
4 answers

Elegantly reducing the number of dependencies in ASP.NET MVC controllers

We are developing what is becoming a sizable ASP.NET MVC project and a code smell is starting to raise its head. Every controller has 5 or more dependencies, some of these dependencies are only used for 1 of the action methods on the controller but…
5
votes
3 answers

Best way to organize dependant projects?

I have a set of projects that depend on other projects (you can say utilities), the problem is every time I change the code of any one of these utilities my colleagues need to take the latest code and build on their machines to use the latest…
Ahmed
  • 7,148
  • 12
  • 57
  • 96
5
votes
1 answer

Why library() or require() should not be used in a R package

My goal is to create R package which use other library such as grid and ggplot2. According to https://tinyheero.github.io/jekyll/update/2015/07/26/making-your-first-R-package.html, it is said that library() or require() should not be used in a R…
Soon
  • 491
  • 3
  • 16
5
votes
3 answers

Dependency Isolation meaning

I 'm reading the 12-factor-app manifesto and I'm at the dependencies section right now. Dependency Isolation is something I cannot get my head around, though. Unfortunately no actual definition as to what that is is given, aside from that…
5
votes
2 answers

Could not load file or assembly for project reference

I have two class library projects and one Web API project. Let it be ClassLibrary1, ClassLibrary2, WebApi. I add link for Web API to both ClassLibrary1 and ClassLibrary2 as a project reference. In addition, ClassLibrary1 has link to ClassLibrary2…
5
votes
2 answers

Having to restart Android Studio everytime I add a new dependency in pubspec.yaml| Flutter

Whenever I add a new dependency/package in pub spec and run my code is throws out the error: Compiler message: Error: Could not resolve the package 'circulardropdownmenu' It works after I restart android studio.
ShahinS
  • 393
  • 1
  • 3
  • 5