CS FundamentalsHardProduct-company placement
Your app depends on libraries P and Q. P needs utils >=2.0 <3.0 and Q needs utils >=1.2 <2.0. In an ecosystem that allows only one version of utils per application, what is the situation?
- A. Install utils 2.0, which satisfies both
- B. Install utils 1.9, which satisfies both
- C. A diamond dependency conflict: no single version satisfies both ranges, so you must upgrade Q, downgrade P, or isolate or shade one copy
- D. The package manager picks the newest version and it will always work
Correct answer: C. A diamond dependency conflict: no single version satisfies both ranges, so you must upgrade Q, downgrade P, or isolate or shade one copy
The ranges [2.0, 3.0) and [1.2, 2.0) do not overlap. Resolving it needs a compatible release of one library or a mechanism that allows two copies, which some ecosystems (such as npm's nested installs) support.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- How many of these refactoring statements are correct? 1. A refactoring must not change the observable behaviour of the code. 2. A good…
- A structure chart shows a date-formatting utility called by 14 modules (high fan-in) and a controller module that calls 23 different…
- A team keeps postponing cleanup of a hard-coded module: each new feature touching it now takes three days instead of one. In the…
- A UML state machine has the transition Idle → Processing labelled 'submit [cart not empty] / validateCart()'. What do the three parts mean?
- A team draws one UML diagram showing which artefacts (JARs, containers) run on which nodes (servers, devices) and how the nodes…
- Using Robert Martin's Stable Dependencies Principle, package A has instability I = 0.2 and package B has I = 0.8. Which dependency…