Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output is completelly blank #14

Closed
ctsrc opened this issue May 27, 2024 · 9 comments
Closed

Output is completelly blank #14

ctsrc opened this issue May 27, 2024 · 9 comments
Labels
good first issue Good for newcomers

Comments

@ctsrc
Copy link

ctsrc commented May 27, 2024

On my MacBook Pro 13-inch, M1, 2020 running macOS Ventura 13.4 i installed zeitfetch

cargo install zeitfetch
rustup info
Default host: aarch64-apple-darwin
rustup home:  /Users/user/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin (default)
1.64-aarch64-apple-darwin

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
aarch64-unknown-linux-gnu
wasm32-unknown-unknown

active toolchain
----------------

stable-aarch64-apple-darwin (default)
rustc 1.78.0 (9b00956e5 2024-04-29)
cargo version
cargo 1.78.0 (54d8815d0 2024-03-26)

But when I run zeitfetch, the output consists of a bunch of completely blank lines

zeitfetch



















The installed version is the latest one

zeitfetch -v
zeitfetch v0.1.10
@nidnogg
Copy link
Owner

nidnogg commented May 27, 2024

Hi! That's odd. I'll replicate your env here and see if it happens on my mac a well. In the meantime, does the issue persist if you run sudo zeitfetch instead?

@angch
Copy link

angch commented May 28, 2024

I can replicate this, but also that somehow a cargo install --debug zeitfetch works. Checking out the code and building both the release and debug version:

angch@nardole:~/project/zeitfetch$ ./target/debug/zeitfetch 
                                      angch@nardole 
                         ./+o+-       ------------- 
                 yyyyy- -yyyyyy+      OS: Ubuntu 22.04 
              ://+//////-yyyyyyo      Host: nardole 
          .++ .:/++++++/-.+sss/`      Uptime: 40 minute(s) 
        .:++o:  /++++++++/:--:/-      Kernel: 5.15.146.1-microsoft-standard-WSL2 
       o:+o+:++.`..```.-/oo+++++/     System OS version: 22.04 
      .:+o:+o/.          `+sssoo+/    NB CPUs: 12 
 .++/+:+oo+o:`             /sssooo.   CPU: AMD Ryzen 5 5600H with Radeon Graphics @ 3293 GHz 
 /+++//+:`oo+o               /::--:.  GPU #1: Device 008e 
 \+/+o+++`o++o               ++////.  GPU #2: Device 008e 
  .++.o+++oo+:`             /dddhhh.  Memory: 4842/19677 MiB 
       .+.o+oo:.          `oddhhhh+    
        \+.++o+o``-````.:ohdhhhhh+    ████████████████████████ 
         `:o+++ `ohhhhhhhhyo++os:     ████████████████████████ 
           .o:`.syhhhhhhh/.oo++o`      
               /osyyyyyyo++ooo+++/     
                   ````` +oo+++o\:     
                          `oo++.       
angch@nardole:~/project/zeitfetch$ ./target/release/zeitfetch 



















angch@nardole:~/project/zeitfetch$

Fresh checkout of the main branch, running on Ubuntu 22.04 wsl'd on Windows 11.
Another laptop with native Ubuntu 24.04 had the same issue.

@pickfire
Copy link

Same issue on konsole arch. Only release build broke.

@nidnogg
Copy link
Owner

nidnogg commented May 28, 2024

Thanks @angch, I was able to replicate locally now. I've narrowed the issue to this recent PR #11, where termsize was added as a dependency. Apparently, termsize is unable to properly scan terminal size on release optimizations atm.

The issue is right here, I'll provide a standard width of 80 lines in case it doesn't read properly in the next build.

I'll figure out termsize later on, and I might tag this stretch goal as a good first issue because it should be pretty straightforward to replicate and debug.

Versions 0.1.9 and 0.1.10 should be affected by this. I'm not sure why the brew build is fine, I figure it must be using the standard build binary without release optimizations.

@nidnogg
Copy link
Owner

nidnogg commented May 28, 2024

I put a temporary fix there as I'm currently in work hours atm. It should fix the main issue at the cost of ANSI truncating not working 100% for the time being.

@nidnogg nidnogg added the good first issue Good for newcomers label May 28, 2024
@nidnogg
Copy link
Owner

nidnogg commented May 28, 2024

For anyone wanting to try a hand at this while I don't get around to it: I've left a couple of TO-DOs in the latest build. Replicating this should be as easy as uncommenting those blocks and running:

❯ cargo build --release && ./target/release/zeitfetch

Then seeing if the output is size 0 cols 0. It should read your actual terminal column size.

@nidnogg
Copy link
Owner

nidnogg commented May 28, 2024

Traced down to softprops/termsize#19.

@angch
Copy link

angch commented May 30, 2024

Practically fixed. Thanks!

@nidnogg nidnogg mentioned this issue Jun 27, 2024
@nidnogg
Copy link
Owner

nidnogg commented Jul 5, 2024

Fixed on latest 0.11.2 release

@nidnogg nidnogg closed this as completed Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants