-
Notifications
You must be signed in to change notification settings - Fork 847
Closed
Labels
Milestone
Description
When you create an [<AutoOpen>] Module and later decide to mark it as obsolete, most of the time no warning will be triggered on the consumer side.
Repro steps
lib.fs:
[<System.Obsolete("This is obsolete")>]
[<AutoOpen>]
module MyNamespace.MyModule
let testFun () = printfn "test"script.fsx
#r "lib.dll"
open MyNamespace
testFun ()fsc -a lib.fsfsi test.fsx
Expected behavior
script.fsx(3,6): warning FS0044: This construct is deprecated. This is obsolete
test
Actual behavior
test
Known workarounds
Mark all module members as obsolete...
Related information
- Operating system: Windows 10 x64
- Visual Studio 2015 Update 3
- Severity: Annoyance
IMHO the F# compiler should only warn when the obsolete module is actually used in the current context. It would even be fine when fsc would warn on the the first instance (as fsc is a single pass compiler).
Giving no warning at all feels like a bug...
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done