-
-
Couldn't load subscription status.
- Fork 353
treewide: generate JSON instead of Nix #3832
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
| # Get file part from filepath and remove hash prefix | ||
| output_name=$(basename "$1" | cut -d "-" -f "2-") | ||
| basename "$1" ".json" | ||
| prettier "$1" > "$generated_dir/$output_name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside: directly calling prettier in the update-script probably isn't the best design. Really, we should be using our treefmt configuration, so that we also get any settings (etc). But doing that without having to evaluate the rest of nixvim's flake may be non-trivial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree but out of scope for this PR. Though in practice our treefmt prettier is the same as this one for JSON files but of course this would help keep it in sync in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should avoid taking pkgs as an argument in callPackage functions.
Signed-off-by: saygo-png <[email protected]>
Sounds like buildbot is rebooting |
Yes, sorry. I'll re-queue this PR. |
#3682 (comment)
It also cleans up the generate script a bit so we no longer have to repeat the name and the files always have the .json extension even in the nix derivation.
Didn't touch the maintainers script because I can't nor want to read Python.