Skip to content

treewide: generate JSON instead of Nix#3832

Merged
zowoq merged 1 commit into
nix-community:mainfrom
saygo-png:use-json
Oct 19, 2025
Merged

treewide: generate JSON instead of Nix#3832
zowoq merged 1 commit into
nix-community:mainfrom
saygo-png:use-json

Conversation

@saygo-png

Copy link
Copy Markdown
Contributor

#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.

@MattSturgeon MattSturgeon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread ci/conform-nvim.nix Outdated
Comment thread ci/efmls-configs.nix Outdated
Comment thread ci/generate.nix
# 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"

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

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.

Comment thread ci/none-ls.nix Outdated
Comment thread ci/rust-analyzer/default.nix Outdated
Comment thread ci/conform-nvim.nix Outdated

@MattSturgeon MattSturgeon left a comment

Copy link
Copy Markdown
Member

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.

Comment thread ci/conform-nvim.nix Outdated
Comment thread ci/conform-nvim.nix Outdated
Signed-off-by: saygo-png <saygo.mail@proton.me>
@MattSturgeon MattSturgeon added this pull request to the merge queue Oct 19, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 19, 2025
@MattSturgeon

MattSturgeon commented Oct 19, 2025

Copy link
Copy Markdown
Member

cancelled (Master Shutdown)
-- https://buildbot.nix-community.org/#/builders/26/builds/7198

Sounds like buildbot is rebooting

@MattSturgeon MattSturgeon added this pull request to the merge queue Oct 19, 2025
@zowoq

zowoq commented Oct 19, 2025

Copy link
Copy Markdown
Contributor

Sounds like buildbot is rebooting

Yes, sorry. I'll re-queue this PR.

@zowoq zowoq removed this pull request from the merge queue due to a manual request Oct 19, 2025
@zowoq zowoq added this pull request to the merge queue Oct 19, 2025
Merged via the queue into nix-community:main with commit c89994b Oct 19, 2025
4 checks passed
@saygo-png saygo-png deleted the use-json branch October 25, 2025 08:08
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.

3 participants