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

Pre commit hooks #1

Merged
merged 2 commits into from
Nov 2, 2021
Merged

Pre commit hooks #1

merged 2 commits into from
Nov 2, 2021

Conversation

ahirner
Copy link
Member

@ahirner ahirner commented Nov 1, 2021

This is my favorite pre-commit setup for Rust projects. It needs python, but is still most featureful compared and simpler than alternatives like xtask based workflows.

LMK if you are interested.

@ahirner ahirner self-assigned this Nov 1, 2021
@ahirner ahirner requested a review from truh November 1, 2021 13:26
@truh
Copy link
Member

truh commented Nov 2, 2021

Changed it so that pre-commit is automatically installed and enabled. Can you test if that works for you?

@ahirner
Copy link
Member Author

ahirner commented Nov 2, 2021

I can't test it, since I'm not a nix user. From the README it's unclear what a minimal installation for Mac OS is... I assume it works with the package manager only, not the entire nix OS?

@truh
Copy link
Member

truh commented Nov 2, 2021

Only Nix, not NixOS needed.
https://nixos.org/guides/install-nix.html
https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos-installation-a-namesect-macos-installation-change-store-prefixaa-namesect-macos-installation-encrypted-volumeaa-namesect-macos-installation-symlinkaa-namesect-macos-installation-recommended-notesa

I have dir-env installed with home-manager https://github.com/nix-community/home-manager but home-manager isn't required for the development of this tools so I didn't want to include it in the readme.

  programs.direnv = {
    enable = true;
    enableFishIntegration = true;
    enableBashIntegration = true;
  };

@ahirner
Copy link
Member Author

ahirner commented Nov 2, 2021

Installing nix on my mac failed and left me with a broken shell. I got cwd not allowed for many commands, including brew.
Screenshot 2021-11-02 at 17 47 57

Then I want through manual uninstall: NixOS/nix#4390

I still have a zombie daemon running after multiple reboots

Screenshot 2021-11-02 at 18 13 37

I won't touch it for some time.

Overall, I think it's fine that the user is responsible for pre-commit install. One could also add a simple github CI with those tests: https://github.com/MoonVision/open-vidapi-rs/blob/main/.github/workflows/tests.yaml#L10

@truh truh merged commit 31ffca3 into main Nov 2, 2021
@truh truh deleted the feature/pre_commit_hooks branch November 2, 2021 18:10
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

Successfully merging this pull request may close these issues.

None yet

2 participants