Skip to content

Move namespaces from FSharpy.TaskSeq to FSharp.Control #71

Closed

Description

@abelbraaksma

We should either target Microsoft.FSharp.Control or FSharp.Control. I noticed that these namespaces, or at least the first one, is auto-opened in F# projects. According to @dsyme that shouldn't happen, so that behavior may not stick, but FusionTasks does exhibit that behavior, see for instance this source file on Async extensions, which get auto-opened as soon as you project has a reference to that lib.

I'll have to toy with the options a bit. Maybe the above behavior is only that way because Async is a type in F# Core already, but TaskSeq isn't.

Just opening this to keep track of options. Suggestions welcome.

Activity

  1. added
    enhancementNew feature or request
    refactoringCleanup, refactoring and minor fixes
    build and infraRelated to building or infrastructure
    and removed
    refactoringCleanup, refactoring and minor fixes
    on Nov 4, 2022
  2. dsyme commented on Nov 5, 2022

    @dsyme
    Contributor

    They add their own AutoOpen in FusionTasks

    https://github.com/kekyo/FSharp.Control.FusionTasks/blob/e326fc32b3ad314ea62c34b50e609434bdd1fa4b/FSharp.Control.FusionTasks/CommonAssemblyInfo.fs#L21

    They don't need to be in Microsoft.* though, would be better if they weren't

  3. dsyme commented on Nov 5, 2022

    @dsyme
    Contributor

    That is, if an assembly adds its own AutoOpen, then that indeed applies to the contents of the assembly.

    However we won't add such an AutoOpen here

  4. abelbraaksma commented on Nov 5, 2022

    @abelbraaksma
    MemberAuthor

    No, we won't. I figured, if it is the default behavior of F#, let's go with it. Otherwise, I think it is better if people just "opt in".

    I used the same approach as AsyncSeq, i.e., not Microsoft.*, just FSharp.Control.TaskSeq.

  5. dsyme commented on Nov 5, 2022

    @dsyme
    Contributor

    Thinking about it further, there are two things that may motivate an auto-open

    1. people are not "used" to opening FSharp.Control, and may think it's already done
    2. This library will likely want to add some functions or extension methods to Task, Async etc. Eg to allow "for" over IAsyncEnumerable. These are really hard to discover.

    I'm not totally advocating a nanesuace AutoOpen and they should very rarely be used, but having thought about it a little more it's worth leaving oprn as a question.

  6. locked and limited conversation to collaborators on Nov 7, 2022
  7. converted this issue into a discussion #84 on Nov 7, 2022
  8. added this to the v0.1.0 milestone on Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    build and infraRelated to building or infrastructureenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions