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

Cannot get 'clear' command to run #160

Closed
LAC-Tech opened this issue Nov 20, 2020 · 7 comments
Closed

Cannot get 'clear' command to run #160

LAC-Tech opened this issue Nov 20, 2020 · 7 comments

Comments

@LAC-Tech
Copy link

Sanity check - this is a perfectly normal command to run, right?

cargo watch -c -x test --poll

This just appends each output to the end of the previous output, no screen clearing, on my machine. Am I misunderstanding what 'clear' does?

@passcod
Copy link
Member

passcod commented Nov 20, 2020

Sure, that looks fine. Can we have platform, terminal emulator info, and a verbose log please?

@LAC-Tech
Copy link
Author

Sure thing.

Platform is WSL2 Alpine
$TERM is xterm-256color

The 'clear' command works, and I could swear I had the clear flag working with cargo watch at some point.

2020-11-20T21:49:36.887+00:00 - DEBUG - Load Git/VCS ignores: true
2020-11-20T21:49:36.887+00:00 - DEBUG - Load .ignore ignores: true
2020-11-20T21:49:36.887+00:00 - DEBUG - Default ignores: ["*/.DS_Store", "*.sw?", "*.sw?x", "#*#", ".#*", ".*.kate-swp", "*/.hg/**", "*/.git/**", "*/.svn/**", "*.db", "*.db-*", "*/*.db-journal/**", "*/target/**"]
2020-11-20T21:49:36.887+00:00 - DEBUG - All ignores: ["*/.DS_Store", "*.sw?", "*.sw?x", "#*#", ".#*", ".*.kate-swp", "*/.hg/**", "*/.git/**", "*/.svn/**", "*.db", "*.db-*", "*/*.db-journal/**", "*/target/**"]
2020-11-20T21:49:36.887+00:00 - DEBUG - File updates debounce: 0.5 seconds
2020-11-20T21:49:36.887+00:00 - DEBUG - Watches: ["."]
2020-11-20T21:49:36.887+00:00 - DEBUG - Commands: ["cargo check"]
2020-11-20T21:49:36.887+00:00 - DEBUG - Watchexec arguments: Args { cmd: ["cargo check"], paths: ["."], filters: [], ignores: ["*/.DS_Store", "*.sw?", "*.sw?x", "#*#", ".#*", ".*.kate-swp", "*/.hg/**", "*/.git/**", "*/.svn/**", "*.db", "*.db-*", "*/*.db-journal/**", "*/target/**"], clear_screen: true, signal: None, restart: true, debounce: 500, debug: false, run_initially: true, no_shell: false, no_meta: false, no_environment: true, no_vcs_ignore: false, no_ignore: false, once: false, poll: false, poll_interval: 500, watch_when_idle: false }
2020-11-20T21:49:36.912+00:00 - DEBUG - Looking in "/home/lewis/rust-cms" for a .git directory
2020-11-20T21:49:36.913+00:00 - DEBUG - glob converted to regex: Glob { glob: "target/**", re: "(?-u)^target(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([Literal('t'), Literal('a'), Literal('r'), Literal('g'), Literal('e'), Literal('t'), RecursiveSuffix]) }
2020-11-20T21:49:36.913+00:00 - DEBUG - built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 1 regexes
2020-11-20T21:49:36.913+00:00 - DEBUG - Loaded "/home/lewis/rust-cms/.gitignore"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "*/.DS_Store/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "*.sw?/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "*.sw?x/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "**/#*#/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "**/.#*"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "**/.*.kate-swp/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "*/.hg/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "*/.git/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "*/.svn/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "*.db/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "*.db-*"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "*/*.db-journal/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - Adding ignore: "*/target/**"
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "*/.DS_Store/**", re: "(?-u)^.*/\\.DS_Store(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('D'), Literal('S'), Literal('_'), Literal('S'), Literal('t'), Literal('o'), Literal('r'), Literal('e'), RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "*.sw?/**", re: "(?-u)^.*\\.sw.(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([ZeroOrMore, Literal('.'), Literal('s'), Literal('w'), Any, RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "*.sw?x/**", re: "(?-u)^.*\\.sw.x(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([ZeroOrMore, Literal('.'), Literal('s'), Literal('w'), Any, Literal('x'), RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "**/#*#/**", re: "(?-u)^(?:/?|.*/)\\#.*\\#(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('#'), ZeroOrMore, Literal('#'), RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "**/.#*", re: "(?-u)^(?:/?|.*/)\\.\\#.*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), Literal('#'), ZeroOrMore]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "**/.*.kate-swp/**", re: "(?-u)^(?:/?|.*/)\\..*\\.kate\\-swp(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore, Literal('.'), Literal('k'), Literal('a'), Literal('t'), Literal('e'), Literal('-'), Literal('s'), Literal('w'), Literal('p'), RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "*/.hg/**", re: "(?-u)^.*/\\.hg(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('h'), Literal('g'), RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "*/.git/**", re: "(?-u)^.*/\\.git(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('g'), Literal('i'), Literal('t'), RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "*/.svn/**", re: "(?-u)^.*/\\.svn(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('s'), Literal('v'), Literal('n'), RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "*.db/**", re: "(?-u)^.*\\.db(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([ZeroOrMore, Literal('.'), Literal('d'), Literal('b'), RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "*.db-*", re: "(?-u)^.*\\.db\\-.*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([ZeroOrMore, Literal('.'), Literal('d'), Literal('b'), Literal('-'), ZeroOrMore]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "*/*.db-journal/**", re: "(?-u)^.*/.*\\.db\\-journal(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([ZeroOrMore, Literal('/'), ZeroOrMore, Literal('.'), Literal('d'), Literal('b'), Literal('-'), Literal('j'), Literal('o'), Literal('u'), Literal('r'), Literal('n'), Literal('a'), Literal('l'), RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - glob converted to regex: Glob { glob: "*/target/**", re: "(?-u)^.*/target(?:/?|/.*)$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('t'), Literal('a'), Literal('r'), Literal('g'), Literal('e'), Literal('t'), RecursiveSuffix]) }
2020-11-20T21:49:36.937+00:00 - DEBUG - built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 13 regexes
2020-11-20T21:49:36.991+00:00 - DEBUG - Watching "/home/lewis/rust-cms"
[Running 'cargo check']
2020-11-20T21:49:36.996+00:00 - DEBUG - Received SIGCHLD
2020-11-20T21:49:36.996+00:00 - DEBUG - Launching child process
2020-11-20T21:49:36.996+00:00 - DEBUG - Assembled command "sh" "-c" "cargo check; echo [Finished running. Exit status: $?]"
2020-11-20T21:49:37.000+00:00 - DEBUG - Waiting for filesystem activity
    Finished dev [unoptimized + debuginfo] target(s) in 0.22s
2020-11-20T21:49:37.234+00:00 - DEBUG - Ignoring "/home/lewis/rust-cms/target/debug/.cargo-lock": matched ignore filter
[Finished running. Exit status: 0]
2020-11-20T21:49:37.238+00:00 - DEBUG - Received SIGCHLD
2020-11-20T21:49:37.748+00:00 - DEBUG - Paths updated: [PathOp { path: "/home/lewis/rust-cms/debug.txt", op: Some(WRITE), cookie: None }]
[Running 'cargo check']
2020-11-20T21:49:37.748+00:00 - DEBUG - Sending SIGTERM (int: 15) to child process
2020-11-20T21:49:37.748+00:00 - DEBUG - Waiting for process to exit...
2020-11-20T21:49:37.753+00:00 - DEBUG - Received SIGCHLD
2020-11-20T21:49:37.753+00:00 - DEBUG - Launching child process
2020-11-20T21:49:37.753+00:00 - DEBUG - Assembled command "sh" "-c" "cargo check; echo [Finished running. Exit status: $?]"
2020-11-20T21:49:37.757+00:00 - DEBUG - Waiting for filesystem activity
    Finished dev [unoptimized + debuginfo] target(s) in 0.20s
2020-11-20T21:49:37.974+00:00 - DEBUG - Ignoring "/home/lewis/rust-cms/target/debug/.cargo-lock": matched ignore filter
[Finished running. Exit status: 0]
2020-11-20T21:49:37.977+00:00 - DEBUG - Received SIGCHLD

@passcod
Copy link
Member

passcod commented Nov 21, 2020 via email

@LAC-Tech
Copy link
Author

tput clear works fine.

the terminal is the default WSL2 terminal
same issue in alacritty though

@passcod
Copy link
Member

passcod commented Nov 21, 2020

I was mistaken, what we actually run is tput reset. Nevertheless, that should work as well. I wonder if the build picked up the wrong platform when installing: "windows" builds run cmd /c "tput reset || cls" [source] which I think wouldn't work in a WSL environment.

@LAC-Tech
Copy link
Author

Ok so I'm experimenting with other platforms. This is openbsd, running on a virtual machine, ssh'd with windows terminal. cargo watch was compiled on the openBSD virtual machine, so I imagine it picks up the right platform.

openbsd / windows terminal

Then I thought "well maybe it's windows terminal fault", so here's the raw output from virtualbox.

openbsd / virtualbox

So now I'm thinking maybe I'm confused - I expected "--clear" to just show one result of checking/running tests, not append multiple. Or do I have that wrong?

Anyway happy to try on a more 'normal' OS on virtualbox, if you have one you know that works.

@passcod
Copy link
Member

passcod commented Apr 11, 2021

Closing in favour of upstream issue: watchexec/watchexec#185.

@passcod passcod closed this as completed Apr 11, 2021
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