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

Fix FakeTimeProvider namespace, add readme #4544

Merged
merged 5 commits into from
Oct 12, 2023

Conversation

Tratcher
Copy link
Member

@Tratcher Tratcher commented Oct 9, 2023

The Microsoft.Extensions.Time.Testing namespace was mismatched to the package name Microsoft.Extensions.TimeProvider.Testing;.

Added a readme.

Microsoft Reviewers: Open in CodeFlow

@Tratcher Tratcher added this to the 8.0-rtm milestone Oct 9, 2023
@Tratcher Tratcher self-assigned this Oct 9, 2023
@geeknoid
Copy link
Member

Note that I intentionally used the Time namespace instead of TimeProvider, since having a type as a namespace component leads to all sorts of weird/unfortunate confusion with the C# compiler.

@Tratcher
Copy link
Member Author

Note that I intentionally used the Time namespace instead of TimeProvider, since having a type as a namespace component leads to all sorts of weird/unfortunate confusion with the C# compiler.

@geeknoid ok, I can appreciate that. We should still re-consider if A) the package and namespace should align, and B) if there would be some other namespace that would be more appropriate, this is the only type in this namespace and it doesn't correlate with the type being tested/extended (System.TimeProvider). I'm not concerned about putting the type in a more common namespace because the type name is unique and the package will only be added to test projects that need it.

Alternatives:

  1. Change the namespace to:
    1. System (Matches TimeProvider)
    2. System.Testing (Adjacent to TimeProvider)
    3. System.Time.Testing (Adjacent to TimeProvider, more narrow scope)
  2. Rename the package to Microsoft.Extensions.Time.Testing to match the namespace.

This reverts commit c6ff1a3.


Revert "Fix FakeTimeProvider namespace, add readme"

This reverts commit 3e4e2fc.

# Conflicts:
#	src/Libraries/Microsoft.Extensions.TimeProvider.Testing/README.md
@Tratcher
Copy link
Member Author

I've reverted the namespace change for now.

@joperezr joperezr merged commit 5e143e3 into dotnet:release/8.0 Oct 12, 2023
6 checks passed
@joperezr
Copy link
Member

I've reverted the namespace change for now.

Do you plan on tracking that in the same fit & finish workitem or want to log a new one in favor of closing the fit & fnish one? I'm fine either way, as long as we make sure we revisit this in the next couple of weeks 😃

@Tratcher Tratcher deleted the tratcher/timereadme branch October 12, 2023 21:46
@Tratcher
Copy link
Member Author

Using the same work item is easier.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants