From 89c3bae3cf68fac9b6bf10fd377cd11de040be71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 11 Feb 2023 23:33:37 +0100 Subject: Add -Wunused-module. * module/language/tree-il/analyze.scm (): New record type. (unused-module-analysis): New variable. (make-unused-module-analysis): New analysis. (make-analyzer): Add it. * module/system/base/message.scm (%warning-types): Add 'unused-module'. * test-suite/tests/tree-il.test (%opts-w-unused-module): New variable. ("warnings")["unused-module"]: New test prefix. * NEWS: Update. --- NEWS | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 4313880c7..a0009406f 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,23 @@ See the end for copying conditions. Please send Guile bug reports to bug-guile@gnu.org. +Changes in 3.0.10 (since 3.0.9) + +* New interfaces and functionality + +** New warning: unused-module + +This analysis, enabled at `-W2', issues warnings for modules that appear +in a `use-modules' form or as a #:use-module clause of `define-module', +and whose bindings are unused. This is useful to trim the list of +imports of a module. + +In some cases, the compiler cannot conclude whether a module is +definitely unused---this is notably the case for modules that are only +used at macro-expansion time, such as (srfi srfi-26). In those cases, +the compiler reports it as "possibly unused". + + Changes in 3.0.9 (since 3.0.8) * Notable changes -- cgit v1.2.1