Prettify the json files in a floxmeta repository

I don’t know if those files are compact on purpose but it might be good to be able to read what they contain without having to format them first (unless this is done for performance reasons?)

There is no particular reason. The performance difference is negligible. We can have them be formatted as we develop our next release.

1 Like

Hi @etorreborre, to provide a little technical background this implementation detail stems from the fact that we are currently using nix profile to build the environment package, and that command is hard-coded to create the manifest.json file using the compact form. We then copy these files to the floxmeta repository verbatim so that we can perform a simple cmp-based sanity check when materialising environments on other machines. Or in other words, flox pull first pulls down the floxmeta repository, then uses the current manifest.json file to build an environment, and as a final check performs a cmp manifest.json /nix/store/<new-package>/manifest.json to verify that the environment was rendered correctly - if we didn’t keep that format then it would be (only slightly) harder to make that comparison.

But perhaps more importantly, Tom is correct that we’re on the verge of releasing a new implementation of environment packages that will completely change the format of the configuration files, so it won’t be an issue much longer anyway. We’ll be sure to avoid the compact format in light of your feedback! :+1:

One final question before we close this out, can I just ask what led you to inspect the contents of the floxmeta repo in the first place? Our intent is to wrap all interactions with that repository and for its contents to remain an internal implementation detail. It’s perfectly fine if you were just looking around, but I’d be curious to hear if you found any reason to tinker with the contents of that repository out of band.

Thanks again for your feedback!

1 Like

Thanks for the explanation, that makes sense.

I went to the repository because git printed a message like you can create a PR at <URL> after pushing to the repository. So I went there and saw a list of diffs which I was expecting to be able to read as I would do for a normal PR. I agree that there shouldn’t be a need to look into the floxmeta repository but at the same time it feels quite natural to be able to visually inspect what the latest state looks like in this repository (maybe compare one branch with the same branch in a fork at some stage etc…).

This is just a suggestion BTW. I understand that it might be overall better to keep the implementation simpler.


I totally agree - the compact format defeats what might otherwise be a useful way to view the history of the “transaction” using standard tooling, GitHub, etc. We’ll be sure to avoid the use of compact form going forward - thanks again for the suggestion!