mirror of
https://github.com/nushell/nushell.git
synced 2025-06-07 02:26:52 +02:00
# Description `pub` has been overused in many parts of `nu-protocol`. This exposes implementation details in ways that things could break should we involve the internals. Also each public member can slow down the decisions to improve a certain implementation. Furthermore dead code can't be detected if things are marked as `pub`. Thus we need to judiciously remove more accidentally `pub` markings and eliminate the dead code if we come across it. This PR tackles `EngineState` and `StateWorkingSet` as important components of the engine and `nu-protocol`. Prompted by a large number of confusingly named methods surrounding overlays and scope management. - **Hide overlay predecl logic** - **Remove dead overlay code** - **Remove unused helper** - **Remove dead overlay code from `EngineState`** - **Hide update_plugin_file impl detail** - **Hide another overlay internal detail`** # API User-Facing Changes Removal of several formerly public members that potentially give intrusive access to the engine. We will button up some of our public API, feel free to explicitly complain so we can figure out what access should be granted. We want to evolve to stable APIs as much as possible which means hiding more implementation details and committing to a select few well defined and documented interfaces
nu-protocol
The nu-protocol crate holds the definitions of structs/traits that are used throughout Nushell. This gives us one way to expose them to many other crates, as well as make these definitions available to each other, without causing mutually recursive dependencies.