Ide.BuildSystemDiscovery.discover

### Method

# Ide BuildSystemDiscoverydiscover

#### Declaration

    gchar*
    ide_build_system_discovery_discover (
      IdeBuildSystemDiscovery* self,
      GFile* project_file,
      GCancellable* cancellable,
      gint* priority,
      GError** error
    )

#### Description

This virtual method can be used to try to discover the build system to use for a particular project. This might be used in cases like Flatpak where the build system can be determined from the .json manifest rather than auto-discovery by locating project files.

Available since: | 3.32

#### Parameters

`project_file` | `GFile`
| A `GFile` containing the project file (a directory)
| The data is owned by the caller of the function.
`cancellable` | `GCancellable`
| A `GCancellable` or `NULL`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`priority` | `gint*`
| A location for the priority.
| The argument will be set by the function.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `gchar*`
| The hint for the build system, which should match what the build system returns from ide_build_system_get_id().
| The caller of the method takes ownership of the data, and is responsible for freeing it.
| The value is a NUL terminated UTF-8 string.