question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why aren't dependencies explicit?

See original GitHub issue

Looking around I noticed that many packages in the pex-gl organization do not appear to explicitly reference each other via the dependencies field in their package.json files.

I noticed this: https://github.com/pex-gl/pex/blob/master/lib/pkg/pex-packages-core.json

Which seems to make sure that if you use pex init your project gets all the right things installed, but I’m curious to understand why this approach is used over the more traditional dependencies field?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vorgcommented, Jul 1, 2016
0reactions
vorgcommented, Jul 1, 2016
Window.create({
    context: new Context(),

This is currently not possible as Context creation is platform specific and that functionality is within Window. Peer dependencies problem in pex has two versions.

Explicit

In pex-sys/WindowImplBrowser:

var Context  = require('pex-context/Context');
...
windowPex._ctx = new Context(gl);

We should probably add pex-context to the package json of pex-sys as we require it.

Implicit

In pex-gui/GUI:

function GUI(ctx, windowWidth, windowHeight, pixelRatio) {
...
ctx.createMesh()

Where we don’t do node require for pex-context but we assume that what we get as ctx is certain version of the pex-context/Context that has createMesh method. I don’t know how to get rid of that kind of dependency.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Explicit Dependencies Principle
The Explicit Dependencies Principle states that methods and classes should explicitly require (typically through method parameters or constructor ...
Read more >
cb372/sbt-explicit-dependencies
An sbt plugin to check that your libraryDependencies accurately reflects the libraries that your code depends on in order to compile. For example,...
Read more >
How Branch-Coupled Dependencies Ruin Your Software ...
It's simple, has only a few constructor arguments, uses explicit dependencies to delegate operations to other classes, and has a single purpose: ...
Read more >
Why aren't the Maven dependencies of my JAR being ...
I am under the impression I do not need to specify them explicitly in the pom.xml of my-deployable because they are already listed...
Read more >
Understanding the npm dependency model - Alexis King
Since npm 3, things are a little bit less straightforward (specifically, peer dependencies are not automatically installed unless a dependent ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found