Skip to content

The impact graph only recognises Cargo, npm and Python projects #72

Description

@Muawiya-contact

The impact graph knows three kinds of project:

const PROJECTS: &[(&str, ProjectKind, &[&str])] = &[
    ("cargo.toml",     ProjectKind::Cargo,  &["target"]),
    ("package.json",   ProjectKind::Npm,    &["node_modules"]),
    ("pyproject.toml", ProjectKind::Python, &[".venv", "venv"]),
];

Which means a Go, Java, Ruby or PHP project's build output looks
abandoned to Diskern even when the project is live — it gets the same
verdict as a directory nobody has touched in two years, which is exactly
the distinction the graph exists to make.

Candidates, each a line in that table plus a store name:

Marker Store
go.mod vendor
pom.xml target
build.gradle, build.gradle.kts build, .gradle
Gemfile vendor/bundle
composer.json vendor
pubspec.yaml .dart_tool, build

Note target and vendor are shared between ecosystems, which is fine —
STORE_NAMES is a flat list and the marker decides who references what.

Worth checking as you add each one: graph.rs has tests using synthetic
paths, so a new kind needs no filesystem, just a from_entries case
asserting the store comes back referenced.

crates/diskern-core/src/graph.rs:24

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enginediskern-core: scanner, rules, risk, graph, reportenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededlevel: intermediateNeeds familiarity with one cratepriority: mediumWorth doing, not urgent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions