From 081dfea746d77f838dc60aecaf578abbba838ec5 Mon Sep 17 00:00:00 2001 From: Andrey Makarov Date: Sun, 16 Oct 2022 21:24:16 +0300 Subject: [PATCH] Fix "imported but not used" warnings (#20575) --- compiler/cgmeth.nim | 2 +- compiler/docgen.nim | 1 - compiler/modulegraphs.nim | 2 +- compiler/modules.nim | 2 +- compiler/passes.nim | 5 ++++- compiler/ropes.nim | 2 -- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/cgmeth.nim b/compiler/cgmeth.nim index 23dea1d18f..8fe8f225c0 100644 --- a/compiler/cgmeth.nim +++ b/compiler/cgmeth.nim @@ -11,7 +11,7 @@ import intsets, options, ast, msgs, idents, renderer, types, magicsys, - sempass2, strutils, modulegraphs, lineinfos + sempass2, modulegraphs, lineinfos when defined(nimPreviewSlimSystem): import std/assertions diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 5ba46c80b8..9271d49759 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -20,7 +20,6 @@ import import packages/docutils/rstast except FileIndex, TLineInfo from uri import encodeUrl -from std/private/globs import nativeToUnixPath from nodejs import findNodeJs when defined(nimPreviewSlimSystem): diff --git a/compiler/modulegraphs.nim b/compiler/modulegraphs.nim index cbf3db4564..e8f77a4913 100644 --- a/compiler/modulegraphs.nim +++ b/compiler/modulegraphs.nim @@ -11,7 +11,7 @@ ## represents a complete Nim project. Single modules can either be kept in RAM ## or stored in a rod-file. -import intsets, tables, hashes, md5_old, sequtils +import intsets, tables, hashes, md5_old import ast, astalgo, options, lineinfos,idents, btrees, ropes, msgs, pathutils, packages import ic / [packed_ast, ic] diff --git a/compiler/modules.nim b/compiler/modules.nim index 2becef38f9..7f6ff86226 100644 --- a/compiler/modules.nim +++ b/compiler/modules.nim @@ -10,7 +10,7 @@ ## Implements the module handling, including the caching of modules. import - ast, astalgo, magicsys, msgs, options, + ast, magicsys, msgs, options, idents, lexer, passes, syntaxes, llstream, modulegraphs, lineinfos, pathutils, tables, packages diff --git a/compiler/passes.nim b/compiler/passes.nim index 46c36f9d12..a8f67300c7 100644 --- a/compiler/passes.nim +++ b/compiler/passes.nim @@ -14,7 +14,10 @@ import options, ast, llstream, msgs, idents, syntaxes, modulegraphs, reorder, - lineinfos, pathutils, std/sha1, packages + lineinfos, pathutils, packages + +when defined(nimsuggest): + import std/sha1 when defined(nimPreviewSlimSystem): import std/syncio diff --git a/compiler/ropes.nim b/compiler/ropes.nim index 12eac733e7..5bf1543931 100644 --- a/compiler/ropes.nim +++ b/compiler/ropes.nim @@ -9,8 +9,6 @@ # Ropes for the C code generator. Ropes are mapped to `string` directly nowadays. -import hashes - from pathutils import AbsoluteFile when defined(nimPreviewSlimSystem):