Class

IdePipeline

Description

final class Ide.Pipeline : Ide.Object
  implements Gio.Initable, Gio.ListModel {
  /* No available fields */
}

The IdePipeline is responsible for managing the build process for Builder. It consists of multiple build “phases” (see IdePipelinePhase for the individual phases). An IdePipelineStage can be attached with a priority to each phase and is the primary mechanism that plugins use to perform their operations in the proper ordering.

For example, the flatpak plugin provides its download stage as part of the IDE_PIPELINE_PHASE_DOWNLOAD phase. The autotools plugin provides stages to phases such as IDE_PIPELINE_PHASE_AUTOGEN, IDE_PIPELINE_PHASE_CONFIGURE, IDE_PIPELINE_PHASE_BUILD, and IDE_PIPELINE_PHASE_INSTALL.

If you want ensure a particular phase is performed as part of a build, then fall ide_pipeline_request_phase() with the phase you are interested in seeing complete successfully.

If your plugin has discovered that something has changed that invalidates a given phase, use ide_pipeline_invalidate_phase() to ensure that the phase is re-build the next time a requested phase of higher precedence is requested.

It can be useful to perform operations before or after a given stage (but still be built as part of that stage) so the IDE_PIPELINE_PHASE_BEFORE and IDE_PIPELINE_PHASE_AFTER flags may be xor’d with the requested phase. If more precise ordering is required, you may use the priority parameter to order the operation with regards to other stages in that phase.

Transient stages may be added to the pipeline and they will be removed after the ide_pipeline_build_async() operation has completed successfully or has failed. You can mark a stage as transient with ide_pipeline_stage_set_transient(). This may be useful to perform operations such as an “export tarball” stage which should only run once as determined by the user requesting a “make dist” style operation.

Hierarchy

hierarchy this IdePipeline implements_0 GInitable this--implements_0 implements_1 GListModel this--implements_1 ancestor_0 IdeObject ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Ancestors

Implements

Instance methods

ide_pipeline_add_error_format

This can be used to add a regex that will extract errors from standard output. This is similar to the “errorformat” feature of vim to extract warnings from standard output.

ide_pipeline_add_log_observer
No description available.

ide_pipeline_addin_find_by_module_name

Finds the addin (if any) matching the plugin’s module_name.

ide_pipeline_attach

Insert stage into the pipeline as part of the phase denoted by phase.

ide_pipeline_attach_command

This creates a new stage that will spawn a process using run_command and log the output of stdin/stdout.

ide_pipeline_attach_launcher

This creates a new stage that will spawn a process using launcher and log the output of stdin/stdout.

ide_pipeline_attach_pty

Attaches a PTY to stdin/stdout/stderr of the IdeSubprocessLauncher. This is useful if the application can take advantage of a PTY for features like colors and other escape sequences.

ide_pipeline_build_async

Asynchronously starts the build pipeline.

ide_pipeline_build_builddir_path

This is a convenience function to create a new path that starts with the build directory for this build configuration.

ide_pipeline_build_finish

This function completes the asynchronous request to build up to a particular phase of the build pipeline.

ide_pipeline_build_srcdir_path

This is a convenience function to create a new path that starts with the source directory of the project.

ide_pipeline_build_targets_async

Asynchronously starts the build pipeline.

ide_pipeline_build_targets_finish

This function completes the asynchronous request to build up to a particular phase and targets of the build pipeline.

ide_pipeline_clean_async
No description available.

ide_pipeline_clean_finish
No description available.

ide_pipeline_contains_program_in_path

Looks through the runtime and SDK extensions for binaries matching name that may be executed.

ide_pipeline_create_launcher

This is a convenience function to create a new IdeSubprocessLauncher using the configuration and runtime associated with the pipeline.

ide_pipeline_create_run_context

Creates a new IdeRunContext to run run_command.

ide_pipeline_detach

This removes the stage matching stage_id. You are returned a stage_id when inserting a stage with functions such as ide_pipeline_attach() or ide_pipeline_attach_launcher().

ide_pipeline_dup_arch

Gets the name of the arch.

since: 44

ide_pipeline_emit_diagnostic
No description available.

ide_pipeline_foreach_stage

This function will call stage_callback for every IdePipelineStage registered in the pipeline.

ide_pipeline_get_builddir

Gets the “builddir” to be used for the build process. This is generally the location that build systems will use for out-of-tree builds.

ide_pipeline_get_busy
No description available.

ide_pipeline_get_can_export

This function is useful to discover if there are any pipeline addins which implement the export phase. UI or GAction implementations may want to use this value to set the enabled state of the action or sensitivity of a button.

ide_pipeline_get_config

Gets the IdeConfig to use for the pipeline.

ide_pipeline_get_deploy_strategy

Gets the best discovered deployment strategry.

ide_pipeline_get_device

Gets the device that the pipeline is building for.

ide_pipeline_get_device_info

Gets the device info for the current device.

ide_pipeline_get_host_triplet

Gets the “host” triplet which specifies where the build results will run.

ide_pipeline_get_message

Gets the current message for the build pipeline. This can be shown to users in UI elements to signify progress in the build.

ide_pipeline_get_phase

Gets the current phase that is executing. This is only useful during execution of the pipeline.

ide_pipeline_get_pty

Gets the VtePty for the pipeline, if set.

ide_pipeline_get_requested_phase

Gets the phase that has been requested. This can be useful when you want to get an idea of where the build pipeline will attempt to advance.

ide_pipeline_get_runtime

A convenience function to get the runtime for a build pipeline.

ide_pipeline_get_srcdir

Gets the “srcdir” of the project. This is equivalent to the IdeVcs:working-directory property as a string.

ide_pipeline_get_stage_by_id

Gets the stage matching the identifier stage_id as returned from ide_pipeline_attach().

ide_pipeline_get_toolchain

A convenience function to get the toolchain for a build pipeline.

ide_pipeline_has_configured

Checks to see if the pipeline has advanced far enough to ensure that the configure stage has been reached.

ide_pipeline_invalidate_phase

Invalidates the phases matching phases flags.

ide_pipeline_is_native

This is a helper to check if the triplet that we are compiling for matches the host system. That allows some plugins to do less work by avoiding some cross-compiling work.

ide_pipeline_is_ready

Checks to see if the pipeline has been loaded. Loading may be delayed due to various initialization routines that need to complete.

ide_pipeline_prepare_run_context

Prepares IdeRunContext to build within the pipeline.

ide_pipeline_rebuild_async

Asynchronously starts the build pipeline after cleaning any existing build artifacts.

ide_pipeline_rebuild_finish
No description available.

ide_pipeline_ref_toolchain

Thread-safe variant of ide_pipeline_get_toolchain().

ide_pipeline_remove_error_format

Removes an error format that was registered with ide_pipeline_add_error_format().

ide_pipeline_remove_log_observer
No description available.

ide_pipeline_request_phase

Requests that the next execution of the pipeline will build up to phase including all stages that were previously invalidated.

Methods inherited from IdeObject (29)

Please see IdeObject for a full list of methods.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Methods inherited from GInitable (1)
g_initable_init

Initializes the object implementing the interface.

since: 2.22

Methods inherited from GListModel (5)
g_list_model_get_item

Get the item at position.

since: 2.44

g_list_model_get_item_type

Gets the type of the items in list.

since: 2.44

g_list_model_get_n_items

Gets the number of items in list.

since: 2.44

g_list_model_get_object

Get the item at position.

since: 2.44

g_list_model_items_changed

Emits the GListModel::items-changed signal on list.

since: 2.44

Properties

Ide.Pipeline:busy

Gets the “busy” property. If TRUE, the pipeline is busy executing.

Ide.Pipeline:config
No description available.

Ide.Pipeline:device

The “device” property is the device we are compiling for.

Ide.Pipeline:message

The “message” property is descriptive text about what the the pipeline is doing or it’s readiness status.

Ide.Pipeline:phase

The current build phase during execution of the pipeline.

Ide.Pipeline:pty

The “pty” property is the VtePty that is used by build stages that build subprocesses with a pseudo terminal.

Properties inherited from IdeObject (2)
Ide.Object:cancellable

The “cancellable” property is a GCancellable that can be used by operations that will be cancelled when the IdeObject::destroy signal is emitted on self.

Ide.Object:parent

The parent IdeObject, if any.

Signals

Ide.Pipeline::diagnostic

This signal is emitted when a plugin has detected a diagnostic while building the pipeline.

Ide.Pipeline::finished

This signal is emitted when the build process has finished executing. If the build failed to complete all requested stages, then failed will be set to TRUE, otherwise FALSE.

Ide.Pipeline::launcher-created

The “launcher-created” signal is emitted when a new IdeSubprocessLauncher is created by the pipeline. This may be useful to plugins that wan to modify the launcher in a consistent way for all pipeline consumers.

Ide.Pipeline::loaded

The “loaded” signal is emitted after the pipeline has finished loading addins.

Ide.Pipeline::started

This signal is emitted when the pipeline has started executing in response to ide_pipeline_build_async() being called.

Signals inherited from IdeObject (1)
IdeObject::destroy

The “destroy” signal is emitted when the object should destroy itself and cleanup any state that is no longer necessary. This happens when the object has been removed from the because it was requested to be destroyed, or because a parent object is being destroyed.

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Signals inherited from GListModel (1)
GListModel::items-changed

This signal is emitted whenever items were added to or removed from list. At position, removed items were removed and added items were added in their place.

since: 2.44

Class structure

struct IdePipelineClass {
  IdeObjectClass parent_class;
  
}
No description available.
Class members
parent_class: IdeObjectClass
No description available.