Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group imports by their visiblities #5696

Closed
kafji opened this issue Feb 20, 2023 · 1 comment
Closed

Group imports by their visiblities #5696

kafji opened this issue Feb 20, 2023 · 1 comment

Comments

@kafji
Copy link

kafji commented Feb 20, 2023

Hi, this is a feature request.

I'm using group_imports: One and I found that it's difficult to distinguish re-exported imports at glance.

Unordered:

use chrono::Utc;
use super::update::convert_publish_payload;

pub use juniper::{FieldError, FieldResult};
use uuid::Uuid;
use alloc::alloc::Layout;

use std::sync::Arc;

use broker::database::PooledConnection;

use super::schema::{Context, Payload};
use core::f32;
use crate::models::Event;

Ordered:

use super::schema::{Context, Payload};
use super::update::convert_publish_payload;
use crate::models::Event;
use alloc::alloc::Layout;
use broker::database::PooledConnection;
use chrono::Utc;
use core::f32;
pub use juniper::{FieldError, FieldResult};
use std::sync::Arc;
use uuid::Uuid;

I'm proposing another variant Visiblity that will group them by their visibilities.

Unordered:

pub(super) use chrono::Utc;
pub use super::update::convert_publish_payload;

pub(crate) use juniper::{FieldError, FieldResult};
pub(in crate::models) use uuid::Uuid;
use alloc::alloc::Layout;

use std::sync::Arc;

pub(self) use broker::database::PooledConnection;

use super::schema::{Context, Payload};
use core::f32;
pub use crate::models::Event;

Ordered:

use super::schema::{Context, Payload};
use alloc::alloc::Layout;
use core::f32;
use std::sync::Arc;

pub(self) use broker::database::PooledConnection;

pub(super) use chrono::Utc;

pub(crate) use juniper::{FieldError, FieldResult};

pub(in crate::models) use uuid::Uuid;

pub use super::update::convert_publish_payload;
pub use crate::models::Event;

I've made a patch here.

What do you think?

@ytmimi
Copy link
Contributor

ytmimi commented Feb 20, 2023

@kafji Thanks for reaching out! This feels like a duplicate of #4070 so I'm going to close this issue.

PRs are always welcome, but I want to be up front and say that there are higher priorities on the teams backlog and it might be a while before we're able to give it a review.

@ytmimi ytmimi closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants