Comments (17)
Please make it a self contained comment annotation to opt out in tests, not a centralized opt out file.
from compiler-team.
This feels like it would only be a problem when we start using a feature in the compiler itself, not for the tests, and I would argue that having rustfmt support for features that we feel are useful/safe enough for the compiler should be a priority.
from compiler-team.
@nikomatsakis meta question: should the last two sections of the template be left off?
from compiler-team.
We discussed this in our planning meeting today and decided that we do not need to have a meeting for this. We believe there is general agreement to the plan. However, @Mark-Simulacrum wanted to make sure we uncovered anybody who might have a strong objection, therefore I'm doing a poll:
@rfcbot poll Do you generally approve of this plan to format the repository?
from compiler-team.
Team member @nikomatsakis has asked teams: T-compiler, for consensus on:
Do you generally approve of this plan to format the repository?
- @Zoxc
- @cramertj
- @eddyb
- @estebank
- @michaelwoerister
- @nagisa
- @nikomatsakis
- @oli-obk
- @petrochenkov
- @pnkfelix
- @varkor
from compiler-team.
I'm going to close this issue -- we didn't feel this needed to be a meeting.
from compiler-team.
I actually had a minor question in the meantime: how should we handle the formatting of tests which are testing new syntax that is being introduced in the change, but not yet supported by rustfmt?
from compiler-team.
@cramertj We can exclude those directories explicitly in some manner (either by not having .enforcefmt
in there or by listing paths explicitly).
from compiler-team.
That actually might be a problem when we use unstable features in the compiler itself... I hope rustfmt handles those gracefully.
from compiler-team.
It does not-- it currently fails to format anything if your code doesn't parse as a valid rust file.
from compiler-team.
@cramertj ah; but does rustfmt handle nightly features at least for some selection of features?
from compiler-team.
@Centril it handles some things, but obviously if you've just implemented a feature it wouldn't yet support it.
from compiler-team.
@cramertj Makes sense; this might be a problem in some instances -- which I guess we can fix with opt-outs in case of emergency -- on the other hand, this might also push us to be better at introducing things to rustfmt quicker, which might be a welcome outcome.
from compiler-team.
Are we not planning to require that tests also be formatted?
from compiler-team.
@cramertj Sure, but we can do opt-outs for specific folders and files for newly introduced features so as to not let development of new features be hindered by lack of initial rustfmt support. It's sort of a catch-22. Rustfmt can't easily add support without the feature implemented and we couldn't test if we didn't opt out without rustfmt support.
from compiler-team.
I would like to see some discussion about the settings we use for rustfmt in rustc, but I definitely think formatting the repository is a good idea overall.
from compiler-team.
I would like a tool which can format a branch based on say the last commit before the repo is formatted, injecting a commit which formats the repo. So the procedure for updating a branch would be:
- rebase to the last commit which is unformatted
- run the tool
- rebase to master, but skip the commit formatting the repo
from compiler-team.
Related Issues (20)
- Add Hotpatch flag HOT 1
- Promote arm64ec-pc-windows-msvc to tier 2 HOT 4
- Policy decision about v0 symbol mangling HOT 1
- `-Zfixed-x18` HOT 6
- Add a `--emit=nameres` for IDEs HOT 2
- Fully rustfmt `use` declarations HOT 17
- Project Goals Discussion
- LLVM optional target-cpu features enabled by default
- Promote loongarch64-unknown-linux-musl to tier 2 HOT 4
- Remove `src/tools/rust-demangler` HOT 3
- Extract rustc stable hasher into it's own crate HOT 3
- Enable `clang-format` for `rustc` HOT 2
- [Tracking Issue] RFC 3599 Reorganize the Compiler Team
- Contracts: Experimental attributes and language intrinsics HOT 4
- Promote wasm32-wasip2 to a Tier 2 target HOT 7
- Promote Mac Catalyst targets to Tier 2 HOT 5
- Change `-Z asm_comments` to `-Z verbose_asm`, stop stripping handwritten assembly comments HOT 4
- Remove `Nonterminal` and `TokenKind::Interpolated` HOT 3
- Add `-Z embed-source` (DWARFv5 source code embedding extension) HOT 3
- MCP: Alternate cargo freshness algorithm, unstable flag to annotate depinfo file with checksums and file sizes HOT 4
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 compiler-team.