Skip to content

Conversation

@nojaf
Copy link
Contributor

@nojaf nojaf commented Feb 1, 2024

Description

This is more of an issue than a PR but:

I'm able to compile this fsc "@Foo.rsp both with and without --test:GraphBasedChecking.
However, running this from TypeCheck last file in project with transparent compiler doesn't work for me with the transparent compiler.

I get

image

while Foo.fs has the #nowarn "40"

module Meh

let bar (name:string) : 'a = failwith<'a> "todo"

#nowarn "40"

type Foo () =
    member __.Bar (name : string) : unit -> 'a =
            let rec prov : (unit -> 'a) ref = ref (fun () ->
                let p : (unit -> 'a) = bar name
                prov := p
                p())
            fun () -> (!prov)()

Fixes # (issue, if applicable)

Checklist

  • Test cases added

  • Performance benchmarks added in case of performance changes

  • Release notes entry updated:

    Please make sure to add an entry with short succinct description of the change as well as link to this pull request to the respective release notes file, if applicable.

    Release notes files:

    • If anything under src/Compiler has been changed, please make sure to make an entry in docs/release-notes/.FSharp.Compiler.Service/<version>.md, where <version> is usually "highest" one, e.g. 42.8.200
    • If language feature was added (i.e. LanguageFeatures.fsi was changed), please add it to docs/releae-notes/.Language/preview.md
    • If a change to FSharp.Core was made, please make sure to edit docs/release-notes/.FSharp.Core/<version>.md where version is "highest" one, e.g. 8.0.200.

    Information about the release notes entries format can be found in the documentation.
    Example:

    If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

@nojaf nojaf requested a review from a team as a code owner February 1, 2024 15:46
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2024

✅ No release notes required

@0101
Copy link
Contributor

0101 commented Feb 1, 2024

Yeah it's a bug. ApplyNoWarnsToTcConfig(TcConfig, ParseTree, fileName) has to happen at the correct time, which gives us correct diagnostics options.

Currently this is only handled in ParseAndCheckFileInProject but not in ComputeParseAndCheckProject. It might be a bit more tricky there since we need to process each file separately.

@nojaf
Copy link
Contributor Author

nojaf commented Feb 12, 2024

Closing in favour of #16667
Great work @dawedawe!

@nojaf nojaf closed this Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants