You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expanding on the discussion happening in #3593 here.
discussion summary
I'd like to propose reducing/removing wildcard imports where we can. It generally helps with presenting context and making the side effects of implicits more explicit.
Possible Options for wildcards:
Be explicit until we hit some threshold then coalesce to wildcard
always be explicit about imports but configure scalafmt to make them more compact. Also provide info on import folding for IDEs.
Be explicit about imports, and if we use a lot from some other code base, namespace the useage of those things instead of wildcard importing.
In any of the above scenarios i think at a minimum we should move to explicitly importing implicits that are use just for clarity and potential safety.
As part of this i think we should also start figuring out a consistent set of guidelines and scalafix/fmt rules for this project.
The goal is to ease code maintenance burdens and do a big clean up on the project to get it all into a consistent style. Overall these changes help with readability as well.
Below is the basic scalafix config i've been using to help me clean up imports.
To follow up on the discussion from the previous thread, I agree with @sequencer 's proposal
I'm proposing an alignment for rocket-chip that: we can add import package._ for chisel3, chisel3.utils, diplomacy., cde., since these libraries are quite common and really to exist as a library. For other busips(subsystem, rocketcore) I personally wanna have a explicit importing, but will also respect others suggestions.
Expanding on the discussion happening in #3593 here.
discussion summary
I'd like to propose reducing/removing wildcard imports where we can. It generally helps with presenting context and making the side effects of implicits more explicit.
Possible Options for wildcards:
In any of the above scenarios i think at a minimum we should move to explicitly importing implicits that are use just for clarity and potential safety.
As part of this i think we should also start figuring out a consistent set of guidelines and scalafix/fmt rules for this project.
The goal is to ease code maintenance burdens and do a big clean up on the project to get it all into a consistent style. Overall these changes help with readability as well.
Below is the basic scalafix config i've been using to help me clean up imports.
@jerryrzhao @sequencer would greatly appreciate your ideas/input here.
Type of issue: other enhancement
Impact: no functional change
Development Phase: proposal
The text was updated successfully, but these errors were encountered: