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.

Show library typing/runtime dependencies differently in dependency graph

See original GitHub issue

Expected Behavior

When importing just the type information from a library using Typescript >3.8:

import type { MyInterface } from '@project/my-models';

The affected:dep-graph should indicate it is a type dependency rather than a runtime dependency, or optionally filter type dependencies.

Current Behavior

Libraries which are depended on for just type information are shown with the same dependency arrow-line as those libraries which provide runtime services.

Steps to Reproduce

  1. Create an app
  2. Create a library
  3. Create a interface model in the library and export it.
  4. Import the interface via import type into the app.
  5. Run affected:dep-graph command.
  6. Library is shown as a hard dependency for the app.

Context

  @nrwl/angular : 9.1.4
  @nrwl/cli : 9.1.4
  @nrwl/cypress : 9.1.4
  @nrwl/eslint-plugin-nx : Not Found
  @nrwl/express : Not Found
  @nrwl/jest : 9.1.4
  @nrwl/linter : 9.1.4
  @nrwl/nest : 9.1.4
  @nrwl/next : Not Found
  @nrwl/node : 9.1.4
  @nrwl/react : Not Found
  @nrwl/schematics : Not Found
  @nrwl/tao : 9.1.4
  @nrwl/web : 9.1.4
  @nrwl/workspace : 9.1.4
  typescript : 3.8.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
spaceribscommented, Apr 25, 2022

Yeah, i’m a bit confused myself, did this not mean to be released?

2reactions
MaximSagancommented, Dec 7, 2021

Unstale

I might see if I can take this one

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identifying application runtime dependencies
A toolkit for identifying the runtime libraries and associated data that applications require in order to run correctly inside containers.
Read more >
Dependencies and .NET libraries - Microsoft Learn
A diamond dependency now exists in the app's dependency graph. Diamond dependency. At build time, NuGet analyzes all the packages that a project ......
Read more >
Can a program depend on a library during compilation but not ...
A compile-time dependency is generally required at runtime. In maven, a compile scoped dependency will be added to the classpath on runtime ......
Read more >
View the Gradle Dependency Tree - Tom Gregory
In Gradle dependencies are libraries required to build your code. ... In this article you'll learn how to view the dependency tree, ...
Read more >
Managing dependencies in Visual Studio C++ projects with ...
It is important to note that in the general case it is not possible to link libraries compiled with a different build type...
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