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

[bug] cargo's terminal output overflows #3995

Closed
FabianLars opened this issue Apr 29, 2022 · 9 comments
Closed

[bug] cargo's terminal output overflows #3995

FabianLars opened this issue Apr 29, 2022 · 9 comments
Assignees

Comments

@FabianLars
Copy link
Sponsor Member

Describe the bug

Tested in cmd and powershell, both inside and outside of the MS Terminal app.
image

Reproduction

  1. run cargo clean in your src-tauri dir.
  2. run tauri dev

Expected behavior

No response

Platform and versions

Environment
  › OS: Windows 10.0.19044 X64
  › Webview2: 100.0.1185.50
  › MSVC:
      - Visual Studio Build Tools 2022
  › Node.js: 16.15.0
  › npm: 8.5.5
  › pnpm: 6.32.10
  › yarn: 1.22.18
  › rustup: 1.24.3
  › rustc: 1.60.0
  › cargo: 1.60.0
  › Rust toolchain: stable-x86_64-pc-windows-msvc

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.9
  › @tauri-apps/api [NPM]: 1.0.0-rc.4
  › tauri [RUST]: 1.0.0-rc.6,
  › tauri-build [RUST]: 1.0.0-rc.5,
  › tao [RUST]: 0.7.0,
  › wry [RUST]: 0.14.0,

App
  › build-type: bundle
  › CSP: default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
  › distDir: ../dist
  › devPath: ../dist

App directory structure
  ├─ dist
  ├─ node_modules
  └─ src-tauri

Stack trace

No response

Additional context

No response

@lucasfernog
Copy link
Member

It looks like it isn't clearing the line properly to show the Building [==============] ... line. I'm not sure if that's the actual problem though.

@FabianLars
Copy link
Sponsor Member Author

rust-lang/cargo#9155

@lucasfernog
Copy link
Member

We're also forcing the color option, seems like that should be fixed in recent cargo releases.

@lucasfernog
Copy link
Member

When running cargo with output not going to a TTY, and with the progress bar and color force-enabled, the output will now correctly clear the progress line (part of the Cargo 1.52 changelog)

@FabianLars
Copy link
Sponsor Member Author

okay then i guess it's not that cargo issue then since i'm on 1.60 🤔

@lucasfernog
Copy link
Member

It was happening to me once too, but then it just disappeared :D

@lucasfernog
Copy link
Member

You can see it's not a Cargo issue by running this:

 $env:CARGO_TERM_PROGRESS_WIDTH=100
 $env:CARGO_TERM_PROGRESS_WHEN='always'
cargo build --color always

something must be off on our processing

@lucasfernog
Copy link
Member

Got the error again lol let's see if i can fix it this time.

@lucasfernog
Copy link
Member

Seems like the problem is the terminal size. I'll see if their implementation is different, and fix it. Changing it from the 120 returned from terminal_size to 60 fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants