Repository navigation
Complete Octave, LuaRocks, Alire and DUB detection and dependency discovery #195
Description
Fill the knowledge-base and dependency-discovery gaps for Octave, LuaRocks, Alire and DUB. Checked with a CLI built from revision dddbfd260229412890d8e6712b8ce54d2ea18021, using Go 1.27.1, against small project directories containing the files below.
| Project input | Current CLI result | Required change |
|---|---|---|
Octave DESCRIPTION and inst/hello.m |
Languages are Objective-C and R; the dependency is reported as pkg:cran/octave |
Add Octave language/package-manager definitions and disambiguate shared file extensions and manifest names |
hello.lua and hello-1.0-1.rockspec |
Lua detected; no package manager or dependencies | Add LuaRocks definition, rockspec language markers and manifest discovery |
alire.toml alone |
No language or package manager | Include the manifest in Ada detection so ecosystem filtering does not suppress Alire |
alire.toml plus src/hello.adb |
Ada and Alire detected; no dependencies | Discover the manifest after upstream parser support is available |
dub.json declaring a dependency on vibe-d |
D and DUB detected; no dependencies | Add DUB manifests to dependency discovery |
To reproduce the Octave case, create DESCRIPTION containing:
Name: hello
Version: 1.0.0
Date: 2026-09-22
Author: Example
Maintainer: Example
Title: Hello world
Description: A sample Octave package.
Depends: octave (>= 4.0.0)
License: GPL-3.0-or-later
Add inst/hello.m containing an Octave function, then run brief <project-directory>. knowledge/objc/language.toml matches every .m file, while knowledge/r/language.toml matches DESCRIPTION without checking its contents. Adding another positive Octave match alone would leave the incorrect detections in place. Cover genuine Objective-C, MATLAB and R inputs when disambiguating these markers.
For DUB, a directory containing only dub.json with {"name":"hello","dependencies":{"vibe-d":"*"}} reproduces the missing dependency output. DUB and LuaRocks parsers already exist in the manifests dependency, but knowledge/_shared/_manifests.toml omits their files. Rockspec filenames vary, so discovery needs pattern expansion rather than passing a literal *.rockspec filename to the parser. The DUB definition already declares dub.selections.json as a lockfile; preserve that reporting. Its configured documentation URL, https://dub.pm/dub-guide/getting-started, returned 404 and needs replacing.
The parser work for Alire and Octave is tracked in git-pkgs/manifests#103. Fix Octave's incorrect CRAN classification there and update the dependency when that fix is available. Keep format parsing in manifests rather than adding a Brief-specific workaround.
Missing technology terms are tracked in ecosyste-ms/oss-taxonomy#22. Once published, refresh kb/testdata/oss-taxonomy-terms.txt and use the terms in the relevant definitions.
Add project fixtures and tests through the CLI or normal scan entrypoint for these cases, including manifest-only Alire projects and rockspec-only Lua packages. Check the resulting languages, package managers and dependency output as well as validating the TOML definitions.
Activity