[gnome-builder] cargo: remove error extraction from cargo builds
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] cargo: remove error extraction from cargo builds
- Date: Tue, 14 Jan 2020 20:03:03 +0000 (UTC)
commit 4e17af736e9f52195c570d2c2a3fff832b0ea840
Author: Christian Hergert <chergert redhat com>
Date: Tue Jan 14 12:01:05 2020 -0800
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
src/plugins/cargo/cargo_plugin.py | 26 --------------------------
1 file changed, 26 deletions(-)
---
diff --git a/src/plugins/cargo/cargo_plugin.py b/src/plugins/cargo/cargo_plugin.py
index 0b43b2149..6f311b274 100644
--- a/src/plugins/cargo/cargo_plugin.py
+++ b/src/plugins/cargo/cargo_plugin.py
@@ -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 |
- GLib.RegexCompileFlags.CASELESS);
- self.launcher_handler = pipeline.connect('launcher-created',
- self._on_launcher_created_cb)
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:
- pipeline.remove_error_format(self.error_format_id)
- self.error_format_id = None
-
- if self.launcher_handler is not None:
- pipeline.disconnect(self.launcher_handler)
- self.launcher_handler = None
-
def _query(self, stage, pipeline, targets, cancellable):
# Always defer to cargo to check if build is needed
stage.set_completed(False)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]