Commit 4e17af73 authored by Christian Hergert's avatar Christian Hergert

cargo: remove error extraction from cargo builds

Quite frankly I'm sick of cargo and their inability to create tooling that
is appealing to existing C programmers. But alas, I'd rather drop the
error extraction from build consoles than deal with it any more. Rust
programmers can use RLS and perhaps someday we can propagate the error
extraction there to the side-bar.

Fixes #1124
Fixes #825
parent 679228a2
Pipeline #143626 passed with stages
in 66 minutes and 9 seconds
......@@ -74,23 +74,6 @@ class CargoPipelineAddin(Ide.Object, Ide.PipelineAddin):
The CargoPipelineAddin is responsible for creating the necessary build
stages and attaching them to phases of the build pipeline.
error_format_id = None
launcher_handler = None
def _on_launcher_created_cb(self, pipeline, launcher):
# Set RUSTFLAGS so that we can parse error formats
if launcher.getenv('RUSTFLAGS') is None:
eq_srcdir = '=' + pipeline.get_srcdir()
escaped = GLib.shell_quote(eq_srcdir)
flags = '--error-format=short --remap-path-prefix ' + escaped
launcher.setenv('RUSTFLAGS', flags, False)
def do_prepare(self, pipeline):
self.error_format_id = pipeline.add_error_format(_ERROR_FORMAT_REGEX,
GLib.RegexCompileFlags.OPTIMIZE |
self.launcher_handler = pipeline.connect('launcher-created',
def do_load(self, pipeline):
context = self.get_context()
......@@ -164,15 +147,6 @@ class CargoPipelineAddin(Ide.Object, Ide.PipelineAddin):
build_stage.connect('query', self._query)
self.track(pipeline.attach(Ide.PipelinePhase.BUILD, 0, build_stage))
def do_unload(self, pipeline):
if self.error_format_id is not None:
self.error_format_id = None
if self.launcher_handler is not None:
self.launcher_handler = None
def _query(self, stage, pipeline, targets, cancellable):
# Always defer to cargo to check if build is needed
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment