Skip to content

Meson Buildless Detector#1714

Draft
zahidblackduck wants to merge 4 commits intomasterfrom
dev/zahidblackduck/IDETECT-5025-meson-detector
Draft

Meson Buildless Detector#1714
zahidblackduck wants to merge 4 commits intomasterfrom
dev/zahidblackduck/IDETECT-5025-meson-detector

Conversation

@zahidblackduck
Copy link
Copy Markdown
Collaborator

Description

Please include a short description of the changes and problems fixed.

Github Issues

(Optional) Please link to any applicable github issues.

jmgeertsma and others added 4 commits February 9, 2026 11:24
Added 2 unit tests for MesonDetectable, 1 functional test MesonDependencyFileParser
Mockito the meson.build and introspect files
Update dita name to match the detector name
Use BufferedReader for the JSON files
Use Generic as forge
@zahidblackduck zahidblackduck self-assigned this Apr 7, 2026
@zahidblackduck zahidblackduck marked this pull request as draft April 7, 2026 12:37
}
logger.debug("even though {} is found, also a builddirectory with the introspect files is needed", detectable_file);
return new FilesNotFoundDetectableResult();
projectInfoFile = fileFinder.findFile(environment.getDirectory(), INTROSPECT_PROJECT_FILENAME, false, 2);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally made only "meson.build" the file that makes detect.jar aware that this is a meson project and only then check if the introspects exist.

If the "meson setup builddir" has been not been run first, the fileFinder will not find the introspect files. "Buildless" makes me feel "meson setup" is not needed. Instead of reading introspect files created by meson, it is also possible to read the dependencies straight from the meson.build file, the example I added to the testcases are simple

deps = [dependency('boost'),dependency('libcurl'),]

But meson itself has multiple ways to determine dependencies
https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencies/base.py#L111

Other detectables try to look for the binary and run the application if found. It is possible to run "meson setup bd_temp" and than read the introspect_files that are freshly created in the bd_temp directory.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants