-
Notifications
You must be signed in to change notification settings - Fork 24
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
Proposal: Nix Powered Checks #135
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…warnings; utilising the tooling's recommended approach: https://sass-lang.com/documentation/cli/migrator/)
…number of top-level files
…ependencies to handle new structure
…nfig changes, migrate dayjs to luxon as a shortest path solve for type errors refactor: lexicographically sort meetup json to make it easier to understand what communities exist in a reasonable way
refactor: change variable name to align with ts norms (camel)
note: this commit intentionally includes an incorrect push branch to validate the deployment prior to a merge request being created
A better representation of the changeset is: this comparison |
Closing in favour of: #141 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Creating this as only a proposal for now; as I had written the majority of code required for this change-set in #134 I figured I'd create it anyway.
This changeset could be seem as covering #90 but has a caveat that the underlying technology is generally a unix-only option leading to a need to either:
Why
Why
nix
when it is known to have a reasonable learning curve?Non-Blocking
If considered suitable; I would suggest we keep the check run as not-required and instead it can provide value by providing feedback on how adherent a PR is to the listed checks above.
Reproducibility
Nix enables reproducibility rather than just repeatability; if the checks pass on your machine utilising this mechanism, it'll absolutely pass within the checks flow also, the only possible caveat to this will be if a macOS or Windows opinion differs from Linux; only as the checks run will run under Linux;
Between macOS and Linux I've never seen this eventuate. I cannot speak for Windows; but in the Windows case I believe the only reasonable approaches to run this would be via docker anyway.
Enabler of Auto-Merge
Currently the repository does not have auto merges enabled; this could be utilised as an approach to ensuring rigour of a changeset that enables this feature to be enabled
Features
In essence, the added
flake.*
files and.envrc
allow a user who hasnix
installed to runnix flake check
to ensure all code adheres to checks described here:*nix
files that are evaluated is unused or proposes removing it*nix
code (plus the custom write check I've written enforces those opinions)How
These checks can be adopted into a workflow via direnv running or via nix develop which will install the hooks at shell start time and provide the listed packages also as an ephemeral shell.
Examples
An example of all checks passing is as per this actions run, if ran locally it would emit the following when in verbose mode:
Further
An example of utilising this integrated with git hooks (change on the right is the modification the hook as applied, left is git error log)
Treefmt is supported by the underlying git-hooks.nix repository and might be a good option to centralise all checks if this change-set is considered suitable.
Next Steps
Feel free to provide feedback; good and bad; I'm happy to enable conversation to clarify anything required on the above ❤️