Skip to content

Should the namespace really be System.IO.Abstractions? #365

Closed

Description

@bentorkington

I get that it clearly communicates that these are abstractions for System.IO, but isn't it a bit cheeky to put the library in the System.IO namespace? That might suggest to someone unfamiliar that it is part of .NET.

Activity

  1. added
    state: needs discussion
    on Oct 8, 2018
  2. fgreinacher commented on Oct 8, 2018

    @fgreinacher
    Contributor

    I agree this naming choice was a bit cheeky more than eight years ago, but changing that now would be a severe breaking change for all users, probably causing a lot more trouble than the confusion people might currently encounter.

    Additional thoughts @jpreese @tathamoddie?

  3. bentorkington commented on Oct 8, 2018

    @bentorkington
    Author

    True - I agree such a breaking change would be unwelcome.

    Incidentally, this was how I learned that namespace System.IO.Abstractions { ... } implicitly adds the System.IO namespace. In my code, I removed all my using System.IO lines so I didn't inadvertently use any classes outside the abstraction layer, only to find that I needed it for constants like System.IO.FileMode, etc. anyway.

    When browsing the Abstractions code, I saw the library uses these constants without fully qualified names, and without using System.IO anywhere. I haven't been able to find this behaviour of the namespace keyword explicitly documented anywhere.

  4. jpreese commented on Oct 8, 2018

    @jpreese
    Member

    Yeah, it's a slightly unfortunate name, but I don't think theres enough value return to go about changing it.

    We considered it when Microsoft barred the use of the System.IO namespace a bit ago, making it impossible to deploy package updates to nuget, but thats been since resolved. We were essentially grandfathered in.

  5. bentorkington commented on Oct 9, 2018

    @bentorkington
    Author

    Thanks for the discussion, and such a useful testing library!

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

    state: needs discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions