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.

Make dep-graph logic extensible

See original GitHub issue

Current Behavior

The dep-graph logic is not extensible by plugins.

The dep-graph logic was refactored to be more extensible but has not been made it public yet.

Expected Behavior

The dep-graph logic is extensible by plugins by providing hooks that would analyze files for their dependencies.

Notes

The dep-graph is extensible enough to handle different languages such as .NET and Java. If somebody from the community is interested in maintaining these kinds of plugins for Nx, please join us in the Community Slack to discuss what would be expected.

Original Description

Please make sure you have read the submission guidelines before posting an issue

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation (nx.dev) and found no answer
  • I checked to make sure that this issue has not already been filed
  • I’m reporting the issue to the correct repository (not related to React, Angular or any dependency)

Expected Behavior

I managed to integrate some Vue applications inside a newly created NX monorepo. I have 2 Vue apps depending on a lib: they both import a Vue component (layout.vue) from it.

Is there a way to extend the TypeScriptImportLocator class to change the file extensions, or pass in some argument?

Current Behavior

When I run nx dep-graph, the link between the lib and the projects doesn’t appear, because it doesn’t parse .vue files.

image

Failure Information (for bugs)

By just adding extension !== '.vue' && into the “if” clause in this file, it works like a charm! But it’s really tempering with the node modules, and i’d rather not.

Generated graph with the hack: image

Steps to Reproduce

I cannot easily share a repo with the issue, since it’s an internal project in my company.

Context

Please provide any relevant information about your setup:

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

I’m using latest Vue 2.x, with some plugins (even though it’s not related):

Failure Logs

It doesn’t fail explicitly. It just ignores vue files.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:274
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

31reactions
billyjovcommented, Mar 30, 2021

Keep this active!

23reactions
kucharskimaciejcommented, Apr 16, 2021

Bump!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Algorithms and Data Structures for Logic Synthesis and ...
pendency graph variables (e.g., DepGraph, DepGraphCopy, and Small- ... functional dependencies makes it possible to move logic off of true critical paths ...
Read more >
A User's Guide to gringo, clasp, clingo, and iclingo
The first tool, gringo, is a grounder capable of translating logic pro- ... this document aims at enabling ASP novices to make use...
Read more >
John D. Backes and Marc D. Riedel - Loonwerks
prior values on the wires, making them independent of the past sequence of inputs. ... ductory logic design courses: a 7-segment display decoder....
Read more >
[Tech Blog] Introduction to NX and Monorepos - AnyMind Group
Nx is a framework that allows you to architect, test, and build your project ... we decided to make the logic decoupled as...
Read more >
Packages - opam
Name Latest version Description 0install 2.18 Decentralised installation system 0install‑gtk 2.18 Decentralised installation system ‑ GTK UI 0install‑solver 2.18 Package dependency solver
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