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

just on Windows #23

Open
GunnarBernsteinHH opened this issue Aug 22, 2024 · 0 comments
Open

just on Windows #23

GunnarBernsteinHH opened this issue Aug 22, 2024 · 0 comments

Comments

@GunnarBernsteinHH
Copy link

Hi Christopher,
great repository!

I am working on windows and tried to setup the environment.
However, I ran into some issues with just, some of them I could solve.

a) just tracy
In your readme.md in the Quick setup section you ask to run the command 'brew install just tracy'.

'brew' seems to be for Mac, so I tried to run 'cargo install just tracy', which gives me:
error: could not find tracy in registry crates-io with version *

Any advice for windows?

b) run just: shell not found
I added 'set shell := ["powershell.exe", "-c"]' in the just file, which seems to solve the issue.
Maybe this could be mentioned in the just file as a comment.

c) just work day-01 part1
While 'just create day-30' works fine, using the command ' just work day-01 part1' fails with:

cargo watch -w day-01 -x "check -p day-01" -s "just test day-01 part1" -s "just lint day-01" -s "just bench day-01 part1"
error: no such command: `watch`

        Did you mean `fetch`?

        View all installed commands with `cargo --list`
        Find a package to install `watch` with `cargo search cargo-watch`
error: Recipe `work` failed on line 5 with exit code 1

After running 'cargo install cargo-watch' I could execute the just command.
Maybe this should be added to the readme.md.

d) running just work day-01 part1 never finishes

just work day-01 part1
cargo watch -w day-01 -x "check -p day-01" -s "just test day-01 part1" -s "just lint day-01" -s "just bench day-01 part1"

[Running 'cargo check -p day-01 && just test day-01 part1 && just lint day-01 && just bench day-01 part1']
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.26s
cargo nextest run -p day-01 part1
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.31s
    Starting 1 test across 5 binaries (27 skipped; run ID: 9d0beea1-49a3-482b-9d29-27ce5cb72c79, nextest profile: default)
        PASS [   0.005s] day-01 part1::tests::test_process
------------
     Summary [   0.018s] 1 test run: 1 passed, 27 skipped
cargo clippy -p day-01
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.30s
cargo bench --bench day-01-bench part1 >> day-01.bench.txt
    Finished `bench` profile [optimized] target(s) in 0.56s
     Running benches/benchmarks.rs (target\release\deps\day_01_bench-0129c8edbf8fbcee.exe)
Timer precision: 100 ns
[Finished running. Exit status: 0]

But I have to end it with Ctrl-C, is that correct?

e) bench results file 'day-01-bench.txt' scrambled

The result file looks very odd:
day_01_bench fastest Ôöé slowest Ôöé median Ôöé mean Ôöé samples Ôöé iters
Ôò░ÔöÇ part1 43.49 ┬Ás Ôöé 60.19 ┬Ás Ôöé 44.89 ┬Ás Ôöé 45.06 ┬Ás Ôöé 100 Ôöé 100

while the output look like this on the screen.
day_01_bench fastest │ slowest │ median │ mean │ samples │ iters
╰─ part1 44.39 µs │ 59.39 µs │ 45.19 µs │ 45.45 µs │ 100 │ 100

Is there a trick to adjust the character set when writing to the file?

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

No branches or pull requests

1 participant