Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler directives in files don't seem to be used #32

Open
baronfel opened this issue Apr 30, 2019 · 0 comments
Open

Compiler directives in files don't seem to be used #32

baronfel opened this issue Apr 30, 2019 · 0 comments
Labels
bug Something isn't working up-for-grabs

Comments

@baronfel
Copy link
Collaborator

at work I have the following code to bridge between Tasks and Hopac Jobs seamlessly:

// TaskBuilder marks a particular module as obsolete because it's not intended to be used normally. we're extending it to work better with Jobs, so that should be disregarded
#nowarn "44"


module TPLHopac =
  open Chessie.Hopac
  open FSharp.Control.Tasks.TaskBuilder

  type TaskBuilderV2 with
    member inline __.Bind (job : #Job<'a>, continuation : 'a -> 'b Step) : 'b Step = bindTaskConfigureFalse (Hopac.startAsTask job) continuation
    member inline __.Bind (job : JobResult<'a, 'err>, continuation : Chessie.ErrorHandling.Result<'a, 'err> -> 'b Step) : 'b Step = bindTaskConfigureFalse (Hopac.startAsTask (JobTrial.toJobOfResult job)) continuation
    member inline __.ReturnFrom(job : #Job<'a>) = bindTaskConfigureFalse (Hopac.startAsTask job) ret
    member inline __.ReturnFrom(job : JobResult<'a, 'err>) = bindTaskConfigureFalse (Hopac.startAsTask (JobTrial.toJobOfResult job)) ret

we have 'warnings as errorsset for warning 44 across the project file, but for this particular use it's unavoidable: the TaskBuilder.fs library marks theTaskBuilder` module obsolete to prevent casual use.

This code compiles via the compiler correctly, but either FCS or portacode don't recognize the inline #nowarn directive.

@humhei humhei added up-for-grabs bug Something isn't working labels May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working up-for-grabs
Projects
None yet
Development

No branches or pull requests

2 participants