After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765021 - Meld unable to diff pipe outputs (Not a regular file)
Meld unable to diff pipe outputs (Not a regular file)
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: general
3.15.x
Other All
: Normal normal
: ---
Assigned To: meld-maint
meld-maint
: 767227 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-04-13 23:29 UTC by Ángel
Modified: 2016-06-13 21:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (2.25 KB, patch)
2016-06-07 22:25 UTC, Kai Willadsen
none Details | Review

Description Ángel 2016-04-13 23:29:50 UTC
Since upgrading to meld 3.15, it is no longer possible to make meld diff from a named pipe result of bash process substitution, which was very handy.

In meld 3.14 it was possible to do eg:
 meld <(cut -d: -f 1 /etc/passwd |sort) <(cut -d : -f 1 /etc/group | sort)

The bars showed the filenames like /dev/fd/63 (the program doesn't even see the command that was ran) but otherwise it worked ok.

Now, it doesn't even load, with error: «There was a problem opening the file “/dev/fd/63”. Not a regular file»
Comment 1 Kai Willadsen 2016-04-14 21:17:35 UTC
This looks like behaviour that was lost with the GtkSourceView port. We currently expect everything we handle to be an actual file; just having a fd isn't enough.

I think this may involve a moderate amount of work to get the Gio wrapping correct, and make sure we handle creating a GtkSourceViewLoader correctly (from a GInputStream?). However, this seems doable.

I don't object to adding back support for this, since I can see that being cool, but I'm also not going to hold up the 3.16 release for it.
Comment 2 Ángel 2016-04-21 22:16:32 UTC
Is there anything requiring a rewindable fd in the diffing code?
Looks like changing GtkSource.FileLoader.new() to GtkSource.FileLoader.new_from_stream() on FileDiff would do it.
Comment 3 Kai Willadsen 2016-04-26 21:21:11 UTC
That would be the core of the change, yes. I suspect it's going to be more involved than that, but I haven't spent any real time looking yet.
Comment 4 Kai Willadsen 2016-06-04 00:59:44 UTC
*** Bug 767227 has been marked as a duplicate of this bug. ***
Comment 5 Balint Reczey 2016-06-07 20:08:18 UTC
This has been reported to Debian BTS, too:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825979
Comment 6 Kai Willadsen 2016-06-07 22:25:16 UTC
Created attachment 329346 [details] [review]
Proposed patch

This is a first (and hopefully final) pass at getting this working. I'm yet to satisfy myself that this won't break anything else, but I'm feeling relatively okay about it.

Since I'd like to be able to put this in the stable series, I'd really appreciate it if people could try the patch out and let me know how it goes for them. The patch is against master, but I'd expect it to apply just fine against 1.6.0; if it doesn't, let me know.
Comment 7 Balint Reczey 2016-06-08 13:24:02 UTC
Looks OK, works fine for me with no visible regression on normal files.
Thanks!
Comment 8 Kai Willadsen 2016-06-13 21:54:35 UTC
I've pushed this fix to master and the 3.16 stable branch, so it should appear in 3.16.1. Thanks for the bug reports.