Big boy's up and running through checks rn: <https...
# daft-dev
r
Big boy's up and running through checks rn: https://github.com/Eventual-Inc/Daft/pull/2807
Interesting observation I've noticed. if I run the pre-commit hook locally,
cargo fmt
works as expected and the entirety of the hooks succeeds. However, after pushing to GitHub and having the daft (.github/workflows/python-package.yml) workflow run, the
style
job fails. The
style
job is internally running
pre-commit run --all-files
. I ran that exact command locally and noticed that it formats additional crates that simply running
cargo fmt
or
.git/hooks/pre-commit
does not. Anyone know why this discrepancy exists?
You can try this yourself by checking out this commit: 40d84697c0dc0af7ea16838cf37234007de4b1fe and running
cargo fmt
. After doing that, you should notice no changes (i.e., by running
git status .
). Then try entering your venv and running
pre-commit run --all-files
. That will format
arrow2
and
daft-csv
. So it seems that
cargo fmt
didn't format those crates...
1.
2.
The reason why I am wondering is because the local pre-commit simply runs
cargo fmt
. The GitHub action, however, runs
pre-commit run --all-files
. Therefore, the local pre-commit hook succeeds, but the GitHub action fails.
Ah
Found out
cargo fmt
runs on all the rust files which are included in the crate hierarchy. if it's not included in the hierarchy, it will not be formatted, even if it's within the actual src dir of that crate. But
pre-commit run --all-files
runs the formatter on all the files, regardless of whether or not those files are included in the crate hierarchy or not.
@Cory Grinstead @jay @Sammy Sidhu Should we remove the above files? They're not included in the crate hierarchy at all, and so they're completely dead files.
j
(Fine by me)
🚀 2
s
We should keep those files in, we might be using those for ipc / odbc. This should be fixed once you disable fmt-ing for arrow2 and parquet2