Buck projects are supported in a limited fashion by leveraging the archive uploader. The following is required
buck
is required to be installed in order to find the transitive dependency graph.- a
.buckconfig
file. - A functioning Buck project that has been built.
Running fossa init
can detect Buck projects two different ways:
- If a
.buckconfig
file is found, FOSSA can be sure it is at the root of a Buck cell.- Search for user defined aliases in
.buckconfig
. - If none are found, run
buck targets //
to find all local targets at the root.
- Search for user defined aliases in
- No
.buckconfig
file is found but aBUCK
file is found denoting a Buck package.- FOSSA CLI runs
buck targets <directory>:
to find all local targets to the
- FOSSA CLI runs
Add a module with type: buck
, target
set to a valid buck target, and dir
set to the current directory.
analyze:
modules:
- name: buckproject
type: buck
target: //programs:buck
dir: .
Buck projects are uploaded with all of their source code broken into dependencies for license analysis by FOSSA. This project involves a few steps:
- Determine the correct buck command to run by trying to execute
FOSSA_BUCK_CMD
,./buckw
, andbuck
. - Run
buck audit input <target> --json
to retrieve a list of all dependencies. - Upload these dependencies and maintain references to their uploaded locator.
- Create a dependency graph by recursively running
buck audit dependencies <target>
on each dependency and add it to the graph. - Upload the dependency graph to FOSSA which will match the dependency locators to the raw upload and analysis of each dependency.