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

The just formatter always updates the timestamp #265

Open
jwillikers opened this issue Nov 22, 2024 · 2 comments
Open

The just formatter always updates the timestamp #265

jwillikers opened this issue Nov 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jwillikers
Copy link
Contributor

jwillikers commented Nov 22, 2024

Describe the bug

The just formatter always updates the timestamp of the file regardless of whether the file is changed or not.

DEBU formatter | just: executing: /nix/store/0irlcqx2n3qm6b1pc9rsd2i8qpvcccaj-bash-5.2p37/bin/bash -euc for f in "$@"; do
  /nix/store/qj4vq5wqbjirx4x8l5z3w9wjgl8da4w6-just-1.36.0/bin/just --fmt --unstable --justfile "$f"
done
 -- .justfile
INFO formatter | just: 1 file(s) processed in 21.883899ms
DEBU file has changed path=.justfile prev_size=1266 prev_mod_time="2024-11-22 08:28:16 -0600 CST" current_size=1266 current_mod_time="2024-11-22 08:37:27 -0600 CST"
traversed 87 files
emitted 1 files for processing
formatted 1 files (1 changed) in 68ms

To Reproduce

Steps to reproduce the behavior:

  1. Format once: treefmt-nix -c --formatters=just --verbose=2
  2. Format again: treefmt-nix -c --formatters=just --verbose=2

Expected behavior

The file should not be reported as changed when it hasn't been.

System information

just is version 1.36.

Additional context

@jwillikers jwillikers added the bug Something isn't working label Nov 22, 2024
@zimbatm
Copy link
Member

zimbatm commented Nov 22, 2024

/cc @jbott

This should be brought up upstream ideally

@jwillikers
Copy link
Contributor Author

This should be brought up upstream ideally

I've opened casey/just#2478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants