Before starting: I am not part of the Nim team, I'm just following along and want people to have minimal issues the same way I would want for myself. See the original discussion for a more reliable source of information.
In light of the new Nim version that has been in development for more than a year now, one of the decisions made was to clean up the standard library. See here: https://github.com/nim-lang/RFCs/issues/437 ("Version 2.0" -> "Stretch goals" -> "Library").
These decisions were not advertised as much as the language features etc that were coming, however they're likely to impact a lot of users (maybe more), so I thought of making this thread for people to be informed.
Firstly, the system module changes: The system module, which is imported by default, is having some definitions moved out into new/other standard library modules in a transition period under the -d:nimPreviewSlimSystem compiler switch (as in, enabling this switch stops importing these definitions by default). The full list of these is changing, but the current list of the new modules can be found in the changelog: https://github.com/nim-lang/Nim/blob/devel/changelog.md#changes-affecting-backward-compatibility
To see which symbols are being moved out, check the development version docs of these modules. For example for syncio: http://nim-lang.github.io/Nim/syncio.html. This module has stuff like readFile, which has been imported by default so far, but won't be under -d:nimPreviewSlimSystem.
Since this switch will be opt-in initially, your code won't be affected yet. But if your code uses these symbols, you could start adding things like when (NimMajor, NimMinor) >= (2,0): import std/syncio to make the transition smoother when it gets made default.
Secondly, some modules in the standard library are being moved out into external Nimble packages. The 2 main reasons this is being done from what I understand is 1. the development of these modules is hindered due to being tied to Nim's release cycle, and 2. the burden of maintaining these does not fall to core Nim developers.
Again, the list of these modules is kind of arbitrary, but currently there is this RFC tracking progress: https://github.com/nim-lang/RFCs/issues/473. At the very least, less used and maintained modules are being prioritized at the moment, so most people shouldn't have to worry.
(I hope this list is complete.)
No further changes are planned for the time being, it's time to release v2.
No further changes are planned for the time being, it's time to release v2.
Woah ! @Araq do you really mean that V2 will be released within few days ? 😃🥲
The intention was to keep the modules in the standard library for a while with a warning saying "this module is deprecated, use the nimble package instead", but they were removed due to what I think might have been a technical reason.
The system module splits are really hard to warn about with Nim's existing mechanisms (there is not really a way to tell whether we explicitly imported the symbols from the modules), so work is still being done in this area.