GithubHelp home page GithubHelp logo

Comments (17)

estebank avatar estebank commented on July 30, 2024 2

Please make it a self contained comment annotation to opt out in tests, not a centralized opt out file.

from compiler-team.

estebank avatar estebank commented on July 30, 2024 1

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.

eddyb avatar eddyb commented on July 30, 2024

@nikomatsakis meta question: should the last two sections of the template be left off?

from compiler-team.

nikomatsakis avatar nikomatsakis commented on July 30, 2024

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.

rfcbot avatar rfcbot commented on July 30, 2024

Team member @nikomatsakis has asked teams: T-compiler, for consensus on:

Do you generally approve of this plan to format the repository?

from compiler-team.

nikomatsakis avatar nikomatsakis commented on July 30, 2024

I'm going to close this issue -- we didn't feel this needed to be a meeting.

from compiler-team.

cramertj avatar cramertj commented on July 30, 2024

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.

Centril avatar Centril commented on July 30, 2024

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

Centril avatar Centril commented on July 30, 2024

That actually might be a problem when we use unstable features in the compiler itself... I hope rustfmt handles those gracefully.

from compiler-team.

cramertj avatar cramertj commented on July 30, 2024

It does not-- it currently fails to format anything if your code doesn't parse as a valid rust file.

from compiler-team.

Centril avatar Centril commented on July 30, 2024

@cramertj ah; but does rustfmt handle nightly features at least for some selection of features?

from compiler-team.

cramertj avatar cramertj commented on July 30, 2024

@Centril it handles some things, but obviously if you've just implemented a feature it wouldn't yet support it.

from compiler-team.

Centril avatar Centril commented on July 30, 2024

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

cramertj avatar cramertj commented on July 30, 2024

Are we not planning to require that tests also be formatted?

from compiler-team.

Centril avatar Centril commented on July 30, 2024

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

varkor avatar varkor commented on July 30, 2024

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.

Zoxc avatar Zoxc commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.