{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":143292270,"defaultBranch":"master","name":"nixfmt","ownerLogin":"NixOS","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2018-08-02T12:33:51.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/487568?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1719975057.0","currentOid":""},"activityList":{"items":[{"before":"dc1f1ec885d4c648bad640549ea65598c13ebb78","after":null,"ref":"refs/heads/fix/197","pushedAt":"2024-07-03T02:50:57.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"}},{"before":null,"after":"7dafbe1a4be59f5031c5e959a9c87b0aa3bed1a9","ref":"refs/heads/update-description","pushedAt":"2024-07-03T02:45:52.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Update synopsis and description\n\nhttps://github.com/NixOS/nixpkgs/pull/324192#discussion_r1663384565","shortMessageHtmlLink":"Update synopsis and description"}},{"before":"ea74366f0170ff30daa5ef7c3fcf9049c425217e","after":null,"ref":"refs/heads/match-nix-str-parsing","pushedAt":"2024-07-03T01:26:45.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"}},{"before":"c67a7b65906bd2432730929bd0e4957659c95b8e","after":"698954723ecec3f91770460ecae762ce590f2d9e","ref":"refs/heads/master","pushedAt":"2024-07-03T01:26:44.000Z","pushType":"pr_merge","commitsCount":3,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Merge pull request #210 from NixOS/match-nix-str-parsing\n\nRe-implement indented string parsing to be more preservative and match the Nix one","shortMessageHtmlLink":"Merge pull request #210 from NixOS/match-nix-str-parsing"}},{"before":"ee4d42101d4ec10e4cc075d18634ef660509146c","after":"508917fab06a7fc0949e19f83baa87a39d894ff3","ref":"refs/heads/fix/quadratic-complexities","pushedAt":"2024-07-01T12:32:11.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dasJ","name":"Janne Heß","path":"/dasJ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4971975?s=80&v=4"},"commit":{"message":"Predoc: Fix quadratic complexities in nest and offset\n\nI honestly don't understand why this makes it faster, but for me the\ntest suite runs ~2s faster now. This is an AI-generated contribution.\nThe GPT explanation is:\n\nBy abstracting the transformation logic into a single function `transform`, we can pass different transformations for nesting and offsetting. This way, we avoid repeated traversals and ensure each element is processed exactly once.\n\nThis change ensures linear complexity for the `nest` and `offset` functions. We leverage the `map` function to traverse and transform the `Doc` structure only once, applying the necessary changes to each element.","shortMessageHtmlLink":"Predoc: Fix quadratic complexities in nest and offset"}},{"before":null,"after":"ee4d42101d4ec10e4cc075d18634ef660509146c","ref":"refs/heads/fix/quadratic-complexities","pushedAt":"2024-07-01T12:29:22.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"dasJ","name":"Janne Heß","path":"/dasJ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4971975?s=80&v=4"},"commit":{"message":"Predoc: Fix quadratic complexities in nest and offset\n\nI honestly don't understand why this makes it faster, but for me the\ntest suite runs ~2s faster now. This is an AI-generated contribution.\nThe GPT explanation is:\n\nBy abstracting the transformation logic into a single function `transform`, we can pass different transformations for nesting and offsetting. This way, we avoid repeated traversals and ensure each element is processed exactly once.\n\nThis change ensures linear complexity for the `nest` and `offset` functions. We leverage the `map` function to traverse and transform the `Doc` structure only once, applying the necessary changes to each element.","shortMessageHtmlLink":"Predoc: Fix quadratic complexities in nest and offset"}},{"before":"72361ab042d3395b816a39ede8564ceb7f65c376","after":"ea74366f0170ff30daa5ef7c3fcf9049c425217e","ref":"refs/heads/match-nix-str-parsing","pushedAt":"2024-06-26T19:40:37.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Fully preserve indented strings and match Nix parser\n\nThis should make sure that:\n- No sequences of characters get modified during parsing,\n indented strings are left exactly as is\n- We won't have any parsing bugs\n\nAlso added a ton of docs to explain how it works and more tests","shortMessageHtmlLink":"Fully preserve indented strings and match Nix parser"}},{"before":"086f0bc6af07604ef1157c8bd6b5e0413a07cf6c","after":"72361ab042d3395b816a39ede8564ceb7f65c376","ref":"refs/heads/match-nix-str-parsing","pushedAt":"2024-06-26T19:38:09.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Fully preserve indented strings and match Nix parser\n\nThis should make sure that:\n- No sequences of characters get modified during parsing,\n indented strings are left exactly as is\n- We won't have any parsing bugs\n\nAlso added a ton of docs to explain how it works and more tests","shortMessageHtmlLink":"Fully preserve indented strings and match Nix parser"}},{"before":"d6ec6f554dca2b0f33951cab457454d180bbdc33","after":"086f0bc6af07604ef1157c8bd6b5e0413a07cf6c","ref":"refs/heads/match-nix-str-parsing","pushedAt":"2024-06-26T19:10:32.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Fully preserve indented strings and match Nix parser\n\nThis should make sure that:\n- No sequences of characters get modified during parsing,\n indented strings are left exactly as is\n- We won't have any parsing bugs\n\nAlso added a ton of docs to explain how it works and more tests","shortMessageHtmlLink":"Fully preserve indented strings and match Nix parser"}},{"before":"da518d7808a522bf797c342713033fd508c7930c","after":"d6ec6f554dca2b0f33951cab457454d180bbdc33","ref":"refs/heads/match-nix-str-parsing","pushedAt":"2024-06-26T19:09:35.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Fully preserve indented strings and match Nix parser\n\nThis should make sure that:\n- No sequences of characters get modified during parsing,\n indented strings are left exactly as is\n- We won't have any parsing bugs\n\nAlso added a ton of docs to explain how it works and more tests","shortMessageHtmlLink":"Fully preserve indented strings and match Nix parser"}},{"before":null,"after":"da518d7808a522bf797c342713033fd508c7930c","ref":"refs/heads/match-nix-str-parsing","pushedAt":"2024-06-26T19:03:40.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Add a test to ensure stable indentated strings","shortMessageHtmlLink":"Add a test to ensure stable indentated strings"}},{"before":"46a6d2a53eb5e8a3b009909933fbabf3e29d7d8b","after":"dc1f1ec885d4c648bad640549ea65598c13ebb78","ref":"refs/heads/fix/197","pushedAt":"2024-06-26T18:17:50.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dasJ","name":"Janne Heß","path":"/dasJ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4971975?s=80&v=4"},"commit":{"message":"Fix 197\n\nCloses https://github.com/NixOS/nixfmt/issues/197","shortMessageHtmlLink":"Fix 197"}},{"before":"56b63791a3832443d1d7d26b5265683aee40a983","after":"46a6d2a53eb5e8a3b009909933fbabf3e29d7d8b","ref":"refs/heads/fix/197","pushedAt":"2024-06-26T18:08:45.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dasJ","name":"Janne Heß","path":"/dasJ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4971975?s=80&v=4"},"commit":{"message":"Fix 197\n\nCloses https://github.com/NixOS/nixfmt/issues/197","shortMessageHtmlLink":"Fix 197"}},{"before":"9dbbc1da9426f2edef868054a62a8d9a027f01b7","after":"56b63791a3832443d1d7d26b5265683aee40a983","ref":"refs/heads/fix/197","pushedAt":"2024-06-26T18:07:22.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"dasJ","name":"Janne Heß","path":"/dasJ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4971975?s=80&v=4"},"commit":{"message":"Fix 197\n\nCloses https://github.com/NixOS/nixfmt/issues/197","shortMessageHtmlLink":"Fix 197"}},{"before":null,"after":"9dbbc1da9426f2edef868054a62a8d9a027f01b7","ref":"refs/heads/fix/197","pushedAt":"2024-06-26T08:13:53.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"dasJ","name":"Janne Heß","path":"/dasJ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4971975?s=80&v=4"},"commit":{"message":"Fix 197\n\nCloses https://github.com/NixOS/nixfmt/issues/197","shortMessageHtmlLink":"Fix 197"}},{"before":"9dbbc1da9426f2edef868054a62a8d9a027f01b7","after":null,"ref":"refs/heads/fix/197","pushedAt":"2024-06-26T08:12:52.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"dasJ","name":"Janne Heß","path":"/dasJ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4971975?s=80&v=4"}},{"before":null,"after":"9dbbc1da9426f2edef868054a62a8d9a027f01b7","ref":"refs/heads/fix/197","pushedAt":"2024-06-26T08:07:47.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"dasJ","name":"Janne Heß","path":"/dasJ","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4971975?s=80&v=4"},"commit":{"message":"Fix 197\n\nCloses https://github.com/NixOS/nixfmt/issues/197","shortMessageHtmlLink":"Fix 197"}},{"before":"3a254442856dcca4b82e25bfdaf8c724d4171f9b","after":null,"ref":"refs/heads/print-ast","pushedAt":"2024-05-28T18:25:56.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"tomberek","name":null,"path":"/tomberek","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/178444?s=80&v=4"}},{"before":"3b794633d9ce25c9fc3fba1cf0d6b07f293f2b5a","after":"c67a7b65906bd2432730929bd0e4957659c95b8e","ref":"refs/heads/master","pushedAt":"2024-05-28T18:25:56.000Z","pushType":"pr_merge","commitsCount":3,"pusher":{"login":"tomberek","name":null,"path":"/tomberek","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/178444?s=80&v=4"},"commit":{"message":"Merge pull request #202 from NixOS/print-ast\n\nAdd an AST pretty-printing mode","shortMessageHtmlLink":"Merge pull request #202 from NixOS/print-ast"}},{"before":"3bcb63c13e7aaf0b8e14081cf0c14c44f62e840a","after":"3b794633d9ce25c9fc3fba1cf0d6b07f293f2b5a","ref":"refs/heads/master","pushedAt":"2024-05-28T18:22:47.000Z","pushType":"pr_merge","commitsCount":4,"pusher":{"login":"tomberek","name":null,"path":"/tomberek","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/178444?s=80&v=4"},"commit":{"message":"Merge pull request #201 from NixOS/preserve-more-newlines\n\nPreserve more newlines","shortMessageHtmlLink":"Merge pull request #201 from NixOS/preserve-more-newlines"}},{"before":"84b3b6ceba93b746d5c6421ea5a9f34ddb14c4b6","after":null,"ref":"refs/heads/preserve-more-newlines","pushedAt":"2024-05-28T18:22:47.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"tomberek","name":null,"path":"/tomberek","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/178444?s=80&v=4"}},{"before":"7071b1a6f559d394911f1858bf5985a336bb944d","after":"84b3b6ceba93b746d5c6421ea5a9f34ddb14c4b6","ref":"refs/heads/preserve-more-newlines","pushedAt":"2024-05-14T21:50:22.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Only move non-empty lines below the `in`\n\nThis fixes the odd case introduced in the parent commit","shortMessageHtmlLink":"Only move non-empty lines below the in"}},{"before":"1b4093afd36dc32ccee4523fde1a285743cc739f","after":"7071b1a6f559d394911f1858bf5985a336bb944d","ref":"refs/heads/preserve-more-newlines","pushedAt":"2024-05-14T21:50:02.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Only move non-empty lines below the `in`","shortMessageHtmlLink":"Only move non-empty lines below the in"}},{"before":"2ed49bbbf2de3b9fb40694289f652c776cc9e62d","after":"1b4093afd36dc32ccee4523fde1a285743cc739f","ref":"refs/heads/preserve-more-newlines","pushedAt":"2024-05-14T21:32:56.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Only move non-empty lines below the `in`","shortMessageHtmlLink":"Only move non-empty lines below the in"}},{"before":"1eba1a76991fdcbfeba1894f4e0666f44db18527","after":"2ed49bbbf2de3b9fb40694289f652c776cc9e62d","ref":"refs/heads/preserve-more-newlines","pushedAt":"2024-05-14T21:27:27.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Only move non-empty lines below the `in`","shortMessageHtmlLink":"Only move non-empty lines below the in"}},{"before":"0e348cb5c2b03fdafcd084d46e7c56cd5f998d32","after":"1eba1a76991fdcbfeba1894f4e0666f44db18527","ref":"refs/heads/preserve-more-newlines","pushedAt":"2024-05-14T21:25:23.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Only move non-empty lines below the `in`","shortMessageHtmlLink":"Only move non-empty lines below the in"}},{"before":"c24ceee0e574fba957136c884918873466423714","after":"0e348cb5c2b03fdafcd084d46e7c56cd5f998d32","ref":"refs/heads/preserve-more-newlines","pushedAt":"2024-05-14T21:03:31.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Simplify and fix comments between items\n\nPreviously, newlines after the last list/attrs/let-in item would not be\npreserved. So e.g.\n\n [\n \"foo\"\n\n ]\n\nwould wrongly turn into\n\n [\n \"foo\"\n ]\n\nSubsequently it would turn into\n\n [ \"foo\" ]\n\nThis commit fixes it, such that the original is preserved in this case.\n\nWhereas previously all the newlines were stripped already during\nparsing, in this new commit all newlines are preserved, which both fixes\nthe above problem and simplifies the code.\n\nThis does introduce one odd edge case due to interaction with another\nfeature. That feature is that comments before a let-in's `in` part, get\nmoved below it. The following:\n\n let\n x = 10;\n # X\n in\n x\n\nGets reformatted into\n\n let\n x = 10;\n in\n # X\n x\n\nDue to how the new code preserves newlines, those newly also get moved\nfurther down. So whereas previously the following:\n\n let\n x = 10;\n\n in\n x\n\nWould wrongly remove the newline, turning it into:\n\n let\n x = 10;\n in\n x\n\nWith this change it won't anymore, but it will move the newline down:\n\n let\n x = 10;\n in\n\n x\n\nWhile this could be handled with a special case, I'm not sure if that's\nworth it. It might be better to rethink this moving of comments further\ndown idea, I'm not sure if that's necessary anymore.","shortMessageHtmlLink":"Simplify and fix comments between items"}},{"before":null,"after":"c24ceee0e574fba957136c884918873466423714","ref":"refs/heads/preserve-more-newlines","pushedAt":"2024-05-14T20:42:05.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Simplify and fix comments between items\n\nPreviously, newlines after the last list/attrs/let-in item would not be\npreserved. So e.g.\n\n [\n \"foo\"\n\n ]\n\nwould wrongly turn into\n\n [\n \"foo\"\n ]\n\nSubsequently it would turn into\n\n [ \"foo\" ]\n\nThis commit fixes it, such that the original is preserved in this case.\n\nWhereas previously all the newlines were stripped already during\nparsing, in this new commit all newlines are preserved, which both fixes\nthe above problem and simplifies the code.\n\nThis does introduce one odd edge case due to interaction with another\nfeature. That feature is that comments before a let-in's `in` part, get\nmoved below it. The following:\n\n let\n x = 10;\n # X\n in\n x\n\nGets reformatted into\n\n let\n x = 10;\n in\n # X\n x\n\nDue to how the new code preserves newlines, those newly also get moved\nfurther down. So whereas previously the following:\n\n let\n x = 10;\n\n in\n x\n\nWould wrongly remove the newline, turning it into:\n\n let\n x = 10;\n in\n x\n\nWith this change it won't anymore, but it will move the newline down:\n\n let\n x = 10;\n in\n\n x\n\nWhile this could be handled with a special case, I'm not sure if that's\nworth it. It might be better to rethink this moving of comments further\ndown idea, I'm not sure if that's necessary anymore.","shortMessageHtmlLink":"Simplify and fix comments between items"}},{"before":null,"after":"3a254442856dcca4b82e25bfdaf8c724d4171f9b","ref":"refs/heads/print-ast","pushedAt":"2024-05-14T20:41:49.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"},"commit":{"message":"Add an AST pretty-printing mode\n\nVery useful for debugging","shortMessageHtmlLink":"Add an AST pretty-printing mode"}},{"before":"19d12a6285a2ffa00ba9b7a835233f24509a7ec9","after":null,"ref":"refs/heads/nixpkgs-diff-for-forks","pushedAt":"2024-05-14T15:44:08.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"infinisil","name":"Silvan Mosberger","path":"/infinisil","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20525370?s=80&v=4"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEdWn2IgA","startCursor":null,"endCursor":null}},"title":"Activity · NixOS/nixfmt"}