Comments (15)
But I do think that for the benefit of everybody's time, it would be best to archive other formatters if the RFC is accepted and implemented.
from alejandra.
After trying nixfmt-rfc-style, I have decided to keep using alejandra in my personal projects. My opinion is that it is ok to have different formatters to choose from, that don't comply with the "standard"
from alejandra.
It's probably a good question for the community once the RFC is adopted, the options are:
- make Alejandra follow the suggested style
- make Alejandra keep its existing style (there will always be an audience for this style)
- archive all alternative formatters so the community only has 1 option available
from alejandra.
As much as I'd love for us all to fall on a single standard, after trying out the new nixfmt I don't think I'm willing to use an RFC166 compliant formatter on any of my projects. I'd prefer that alejandra remain as it is currently.
from alejandra.
The main intention behind making it a standard is to not make the implementation the standard. This allows some room for both bug fixes and minor improvements, but it also makes it clear which changes need to go though another RFC.
And while Nixpkgs will have to use the official formatter, there's no problem with other standard-complient formatters existing. It would also be possible to change out the underlying implementation of the official formatter (as long as it's standards-compliant).
from alejandra.
But I do think that for the benefit of everybody's time, it would be best to archive other formatters if the RFC is accepted and implemented.
I disagree on this end, I think alejandra should adopt the standard, but some formatters, of course, can be archived like nixpkgs-fmt. Since that had one goal in mind, alejandra is more broad and widely used in the community (including myself) so I think its best to continue supporting it and change it to adhere to the RFC.
from alejandra.
We could have different modes tbf
Is anyone actually going to work on and maintain that when there's already alternative formatting tools out there?
It seems to me that alejandra has different goals to RFC 166. If so this should be considered a "won't fix".
from alejandra.
cc: @kamadorueda
from alejandra.
It's probably a good question for the community once the RFC is adopted, the options are:
1. make Alejandra follow the suggested style 2. make Alejandra keep its existing style (there will always be an audience for this style) 3. archive all alternative formatters so the community only has 1 option available
As I understand 3 is a non-goal, the formatter implementation is supposed to be considered more of a standard specification for formatting, so different implementations could exist as well, 1. Would be the most optimal.
from alejandra.
If adapting Alejandra to the RFC166 format was easy, I'd already have done so half a year ago. Initially, nixfmt was only our second choice after Alejandra.
from alejandra.
If adapting Alejandra to the RFC166 format was easy, I'd already have done so half a year ago. Initially, nixfmt was only our second choice after Alejandra.
What's wrong with Alejandra that makes it harder to adher to RFC0166?
from alejandra.
We recorded some meetings notes about that here
from alejandra.
Nix Formatter is now out for testing in nixpkgs.
https://discourse.nixos.org/t/call-for-testing-nix-formatter/39179/
from alejandra.
@kamadorueda
The time is now to decide I guess, since NixOS/rfcs#166 got officially merged, and their now a tracking issue for nixfmt: NixOS/nixfmt#153
from alejandra.
As much as I'd love for us all to fall on a single standard, after trying out the new nixfmt I don't think I'm willing to use an RFC166 compliant formatter on any of my projects. I'd prefer that alejandra remain as it is currently.
We could have different modes tbf
from alejandra.
Related Issues (20)
- non-sensible newlines in inherit block after comment HOT 1
- Comment at the top of function body is missing indentation HOT 1
- Comments not attached to following line
- long line made even longer
- consider making some aspects customizable HOT 1
- Pre-commit autoupdate reverts from v3.0.0 to v1.3.0 HOT 8
- Consider less indentation for concatenated values
- double-asterisk in block comment opening delimiter forced onto separate lines
- Whitepace added around parentheses within string
- Add macOS/Darwin binaries HOT 3
- Doom Emacs integration after migrating to apheleia HOT 2
- Keep short multi-line comments on one line HOT 1
- Version on crates.io is obsolete, has no README
- Comments in inherits have extra newlines inserted. HOT 2
- Sometimes requires several runs to converge upon a stable formatting HOT 1
- alejandra modifies the logical contents of multiline strings
- Parse failure after formatting `(123).attr or "OK"`
- Parse failure with carriage return character
- Newline inserted at end-of-file comment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alejandra.