profile
viewpoint

lunaryorn/mdcat 1300

cat for markdown

lucab/libsystemd-rs 49

A pure-Rust client library to work with systemd

lunaryorn/git-gone 37

Cleanup stale Git branches of pull requests

Jomik/vscode-search-provider 32

GNOME Search Provider for recent VS Code projects.

lunaryorn/homebins 20

Binaries for $HOME

lunaryorn/gethostname.rs 18

gethostname() for all systems

lunaryorn/jetbrains-search-provider 13

Gnome Shell search provider for Jetbrains IDEs

lunaryorn/gnome-search-providers-jetbrains 9

Gnome shell search providers for jetbrains IDEs

lunaryorn/vscode-fish-ide 7

Fish IDE features for VSCode

lunaryorn/vscode-hlint 6

Maintainer wanted: Lint Haskell with hlint in vscode

push eventlunaryorn/dotfiles

Sebastian Wiesner

commit sha 730aba5f50b0f2f81fcf63e851c42ed348c9df47

Update backup repo path

view details

push time in a day

Pull request review commenttokio-rs/tracing

Use unconnected socket

 impl Subscriber {         #[cfg(unix)]         {             let socket = UnixDatagram::unbound()?;-            socket.connect("/run/systemd/journal/socket")?;-            Ok(Self {+            let sub = Self {                 socket,                 field_prefix: Some("F".into()),-            })+            };+            // Check that we can talk to journald, by sending empty payload which journald discards.+            // However if the socket didn't exist or if none listened we'd get an error here.+            sub.send_payload(&[])?;

@Ralith I'm not sure whether this is a good idea, but it seems to work as a simple check whether we can talk to journald, as you asked for in #1745 :slightly_smiling_face:

lunaryorn

comment created time in 2 days

PullRequestReviewEvent

pull request commenttokio-rs/tracing

Use unconnected socket

/cc @Ralith

lunaryorn

comment created time in 2 days

push eventlunaryorn/tracing

Sebastian Wiesner

commit sha 7669f0d2eed53bace0cda256559b2719ebede0d9

Use unconnected socket Lets journald subscribers survive a journald restart. Closes #1745

view details

push time in 2 days

delete branch lunaryorn/tracing

delete branch : 1698-message-size

delete time in 2 days

pull request commenttokio-rs/tracing

tracing-journald: Send large journal payloads through memfd

@hawkw @Ralith Thanks for your review and for merging this :pray:

lunaryorn

comment created time in 2 days

PR opened tokio-rs/tracing

Reviewers
Use unconnected socket

Lets journald subscribers survive a journald restart.

Closes #1745

Motivation

Currently the journald subscriber immediately connects to the journald socket. As such I understand it'd not survive a full restart of journald.

Solution

Do not connect the client socket immediately; instead pass the socket pathname every time we send a message. This is also what upstream does.

+42 -10

0 comment

2 changed files

pr created time in 2 days

push eventlunaryorn/tracing

Hirochika Matsumoto

commit sha 6a61897a5e834988ad9ac709e28c93c4dbf29116

attributes: implement `#[instrument(ret)]` (#1716) * attributes: implement `#[instrument(ret)]` ## Motivation Currently, users have to explicitly call logging functions at the end of functions if they wanted to record values being returned. For example, ```rust fn increment(a: i32) -> i32 { let succ = a + 1; tracing::debug!(?succ); succ } ``` The code above will be significantly simpler if we provide the functionality to record returned values. ## Solution This PR adds the exact feature we're talking here, which enables users to write the code below instead. ```rust #[instrument(ret)] fn increment(a: i32) -> i32 { a + 1 } ``` Co-authored-by: Eliza Weisman <eliza@buoyant.io>

view details

lunaryorn

commit sha 63d41707efa98d3ce64be7fff02ee348157a6985

journald: send large journal payloads through memfd (#1744) See #1698: Properly write large payloads to journal. I'd appreciate a very careful review; this cmsg stuff is nasty, and while it's well documented in `cmsg(3)` I had to fiddle a bit because the corresponding functions in libc aren't const and thus don't permit a direct allocation of the buffer as most `cmsg` C code around does. Closes #1698 ## Motivation Linux limits the maximum amount of data permitted for a single Unix datagram; sending large payloads directly will fail. ## Solution Follow systemd.io/JOURNAL_NATIVE_PROTOCOL/ and check for `EMSGSIZE` from `send()`; in this case write the payload to a memfd, seal it, and pass it on to journald via a corresponding SCM_RIGHTS control message. Per discussion in #1698 this adds no dependency on `nix`, and instead implements fd forwarding directly with some bits of unsafe `libc` code.

view details

Sebastian Wiesner

commit sha 94027813993c36e780163c26c37026c1df923c96

Use unconnected socket Lets journald subscribers survive a journald restart. Closes #1745

view details

push time in 2 days

push eventlunaryorn/tracing

Sebastian Wiesner

commit sha f120a5e59f55a797011c6f8337079009b92399af

Send large journal payloads through memfd Linux limits the maximum amount of data permitted for a single Unix datagram; if our payload exceeds this platform-dependent size we write the content to a memfd and pass this memfd to journald, per https://systemd.io/JOURNAL_NATIVE_PROTOCOL/. Add a test which checks a large message. Closes #1698

view details

push time in 2 days

Pull request review commenttokio-rs/tracing

tracing-journald: Send large journal payloads through memfd

+//! socket helpers.++use std::io::{Error, Result};+use std::mem::size_of;+use std::os::unix::net::UnixDatagram;+use std::os::unix::prelude::{AsRawFd, RawFd};+use std::ptr;++use libc::*;++const CMSG_BUFSIZE: usize = 64;++#[repr(C)]+union AlignedBuffer<T: Copy + Clone> {+    buffer: T,+    align: cmsghdr,+}++fn cmsg_space(s: u32) -> usize {+    unsafe { CMSG_SPACE(s) as usize }+}++pub fn send_one_fd(socket: &UnixDatagram, fd: RawFd) -> Result<usize> {+    assert!(+        cmsg_space(size_of::<RawFd>() as u32) <= CMSG_BUFSIZE,+        "cmsghdr buffer too small (< {}) to hold a single fd",+        cmsg_space(size_of::<RawFd>() as u32)+    );

It's covered by the payload test, but I've still added a separate unit test now, because I think it's easier to debug that way, and it doesn't really add much.

lunaryorn

comment created time in 2 days

PullRequestReviewEvent

push eventlunaryorn/tracing

Sebastian Wiesner

commit sha 2859e0d56593423c11a1469983daebc08e270fa1

Send large journal payloads through memfd Linux limits the maximum amount of data permitted for a single Unix datagram; if our payload exceeds this platform-dependent size we write the content to a memfd and pass this memfd to journald, per https://systemd.io/JOURNAL_NATIVE_PROTOCOL/. Add a test which checks a large message. Closes #1698

view details

push time in 2 days

push eventlunaryorn/tracing

Sebastian Wiesner

commit sha 88bafb2800b5b1a68a2ff553a5a377c362408ade

Send large journal payloads through memfd Linux limits the maximum amount of data permitted for a single Unix datagram; if our payload exceeds this platform-dependent size we write the content to a memfd and pass this memfd to journald, per https://systemd.io/JOURNAL_NATIVE_PROTOCOL/. Add a test which checks a large message. Closes #1698

view details

push time in 2 days

Pull request review commenttokio-rs/tracing

tracing-journald: Send large journal payloads through memfd

 impl Subscriber {         self.field_prefix = x;         self     }++    #[cfg(not(unix))]+    fn send_payload(&self, _opayload: &[u8]) -> std::io::Result<()> {+        Err(io::Error::new(+            io::ErrorKind::Unsupported,+            "journald not supported on non-Unix",+        ))+    }++    #[cfg(unix)]+    fn send_payload(&self, payload: &[u8]) -> std::io::Result<usize> {+        self.socket.send(payload).or_else(|error| {+            if Some(libc::EMSGSIZE) == error.raw_os_error() {+                self.send_large_payload(payload)+            } else {+                Err(error)+            }+        })+    }++    #[cfg(not(target_os = "linux"))]+    fn send_large_payload(&self, _payload: &[u8]) -> std::io::Result<usize> {+        Err(io::Error::new(+            io::ErrorKind::Unsupported,+            "Large payloads not supported on non-Linux OS",+        ))+    }

I didn't actually think much about this… I used cfg to tag where things build, not necessarily where they run :slightly_smiling_face:

I don't know whether journald works on BSD; I don't know much about other Unix systems, and I must admit that I don't care enough to find out :innocent:

I can also use a simpler cfg matrix which mostly stubs out everything on non-Linux, but I think I'd prefer @Ralith's feedback about this as well :slightly_smiling_face:

lunaryorn

comment created time in 2 days

PullRequestReviewEvent

push eventlunaryorn/dotfiles

Sebastian Wiesner

commit sha dc3b6c88b65c85f6abf4f1d67a228c1d965a45f5

Remove incompatible curl flags

view details

push time in 3 days

startedzesterer/chumsky

started time in 4 days

push eventlunaryorn/gnome-search-providers-jetbrains

Sebastian Wiesner

commit sha 3deb351d941ca4be85cd1275a2a6eb61dc700909

Update link to search provider API

view details

push time in 5 days

push eventlunaryorn/gnome-search-providers-vscode

Sebastian Wiesner

commit sha c22ef1f781861c52d2305447effc143496ab5ba4

Update link to search provider docs

view details

push time in 5 days

issue commentlunaryorn/gnome-search-providers-vscode

Support multi-root workspaces

I've made a new release with your patch :)

vianney

comment created time in 5 days

push eventlunaryorn/gnome-search-providers-vscode

Sebastian Wiesner

commit sha 9f48fc1d0adde12a9a07808aed459dd31b6b5f3f

Fix README

view details

push time in 5 days

push eventlunaryorn/pkgbuilds

Sebastian Wiesner

commit sha 9cee13a9356acd4219a79a09827ad40aa75f7347

upgpkg: gnome-search-providers-vscode 1.6.0-1 upstream release

view details

push time in 5 days

push eventlunaryorn/gnome-search-providers-vscode

Sebastian Wiesner

commit sha 3c76dd5fb17c972383847b2fd7bd3a170a6a76a6

Release 1.6.0

view details

push time in 5 days

created taglunaryorn/gnome-search-providers-vscode

tagv1.6.0

Gnome search providers for recent workspaces of VSCode variants

created time in 5 days

push eventlunaryorn/gnome-search-providers-vscode

Sebastian Wiesner

commit sha aa264ded86b9cca9165a736759cb97d2570d2758

Remove redundant provider file

view details

push time in 5 days

create barnchlunaryorn/tracing

branch : 1745-unconnected-socket

created branch time in 5 days

push eventlunaryorn/gnome-search-providers-vscode

Sebastian Wiesner

commit sha ea9c3de99d016a9bf5f3014378747ca6ffeb39b9

Update changelog

view details

Sebastian Wiesner

commit sha 6dbe9f5d673e15c092be7f471ebd4fc9b36d97da

Remove Arch AUR package for vscodium The AUR package now uses the standard codium names and IDs.

view details

push time in 5 days

delete branch lunaryorn/gnome-search-providers-vscode

delete branch : go-async

delete time in 5 days

more