-
Notifications
You must be signed in to change notification settings - Fork 932
Open
Copy link
Labels
unstable optiontracking issue of an unstable optiontracking issue of an unstable option
Description
Tracking issue for unstable option: group_imports.
See Processes.md, "Stabilising an Option":
- Is the default value correct?The design and implementation of the option are sound and clean.The option is well tested, both in unit tests and, optimally, in real usage.There is no open bug about the option that prevents its use.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
j2ghz, Shatur, mbergkvist, ajeetdsouza, Burning1020 and 79 morefindepiShadowJonathan, ajeetdsouza, andrewbanchich, schneiderfelipe, NotNorom and 20 more
Sub-issues
Collapse Sub-issuesSub-issues
- Manage this item control⌃ shift⇧ uU
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
unstable optiontracking issue of an unstable optiontracking issue of an unstable option
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-][unstable option] `merge_imports`[/-][+][unstable option] `imports_granularity`[/+][-][unstable option] `imports_granularity`[/-][+][unstable option] `group_imports`[/+]stjepangolemac commentedon Feb 10, 2022
Would it be possible to add a fourth group for the workspace members? They're technically external crates but still different from 3rd party crates. Something like
StdExternalWorkspaceCrate
.(let me know if this isn't the right place to discuss this)
calebcartwright commentedon Feb 11, 2022
No worries @stjepangolemac fine to ask here (and probably worth having pointers to various issues anyway). In short, we're limited by the information that's actually available. More detailed in the issues linked below
rust-lang/style-team#131 (comment)
#4693
#4709
ShadowJonathan commentedon Feb 18, 2022
What's preventing the option from stablising as-is? #4693 to me seems to be about the addition of an extra option, but is there any problem with the current options? Any real bugs?
daboross commentedon Feb 19, 2022
#4709 seems like a fairly big bug to me. Besides that, did we actually decide that this was the only sane ordering? I'm pretty sure it was waiting on having a few different options for grouping imports before stabilizing, if it is ever going to stabilize.
calebcartwright commentedon Feb 19, 2022
I appreciate the interest and willingness of folks to participate in discussions, but should you choose to do so, a gentle reminder to be sure to thoroughly read the thread and linked material.
The process for stabilizing an option is both linked, and enumerated with checkboxes, in the issue description. None of those enumerated requirements can be cleared yet, including the fact that yes there's indeed real bugs that are either directly linked or transitively linked from issues/discussions that are directly linked. One can also search open issues to find additional related issues that aren't directly linked.
To again echo inline:
group_imports
does not differentiate between a local import and an external crate #4709 is not a bug as mentioned and discussed on that thread, but a case where people want more and where more might not be possible.SimonSapin commentedon Jun 24, 2022
I’d like for this option to have another value named
Visibility
that makes one group foruse example;
, one forpub(crate) use example;
and another forpub use example;
. (I’m less sure of the groups’ order.)This is to separate private imports (that are only there for convenience of naming things inside a module’s code) from reexports that affect the public API of a module or crate.
calebcartwright commentedon Jul 8, 2022
Seems I forgot to hit the "comment" button the other day, but yes @SimonSapin that type of grouping and variant should be possible with the information available to rustfmt.
However, I think it would be best to pull this additional-variant request out so it can be tracked as a separate feature requests, both for work tracking/implementation purposes and because it's not necessary for stabilization of the option nor related to it (we have the ability to add new, unstable variants to already stable options)
eth
domains n0-computer/iroh#54339 remaining items