Skip to content

Nuget warnings in fsi are emitted to stdout and cannot be suppressed with --quiet #18086

Open
@legezam

Description

@legezam

in F# interactive, Nuget warnings are not suppressed when using --quiet flag.

Repro steps

using this fsx script:

#r "nuget:Dmx.Amyris.Bio"


let [| |] = [||]
  1. dotnet fsi --quiet foo.fsx
  2. observe that nuget warnings are emitted to stdout instead of stderr, regardless whether you add --quiet flag or not:
/home/legezam/.packagemanagement/nuget/Projects/110555--97ce5992-5bc5-4645-82e6-4431e11b5756/Project.fsproj : warning NU1608: Detected package version outside of dependency constraint: Dmx.Amyris.Bio 2.0.32 requires FSharp.Core (>= 6.0.0 && < 7.0.0) but version FSharp.Core 8.0.300 was resolved.
/home/legezam/.packagemanagement/nuget/Projects/110555--97ce5992-5bc5-4645-82e6-4431e11b5756/Project.fsproj : warning NU1608: Detected package version outside of dependency constraint: Dmx.Amyris.Bio 2.0.32 requires FSharp.Core (>= 6.0.0 && < 7.0.0) but version FSharp.Core 8.0.300 was resolved.

This makes it impossible to create a unix like command that prints its results to stdout because fsi puts garbage to stdout.

Expected behavior

  1. maybe the nuget warnings should go to stderr by default
  2. even if they don't, --quiet should make them go away as per the promises in fsi help

Actual behavior

F# compiler warnings are not emitted correctly, nuget warnings go to stdout.

Known workarounds

Found no workarounds.

Related information

This happens on Ubuntu linux for me but i suppose the issue is general.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-FSIBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.help wanted

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions