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

Extensions: Adding FileProviders and FileSystemGlobbing #33212

Merged
merged 14 commits into from
Mar 13, 2020

Conversation

maryamariyan
Copy link
Member

@maryamariyan maryamariyan commented Mar 5, 2020

  • Initial commits are bulk changes on remaining (upcoming projects) (First 5 commits)
  • FileSystemGlobbing (6th commit)
  • FileProviders (7th commit)

Todo on this PR:

  • For FileSystemGlobbing: Fix packaging error + nit PR feedback changes (8th commit)
  • For FileProviders.Physical project: Fix test project (commit 11)
  • Bring over newer commit history from extensions repo
  • For FileProviders projects (Abstractions/Composite/Physical): add pkg (9th commit)

For upcoming PRs:

  • Enable remaining packages: Configurations, Hosting, Logging, Options, DependencyInjection
    there will be some tasks I'll get to once all projects are building, like:
  • Adding solutions files
  • Removing styling and whitespace nit errors skipped using NoWarns (refer to Directory.Build.props diff)
  • Identifying and removing unused classes (especially in shared/extensions folders)

@maryamariyan maryamariyan changed the title Extensions: Enable, FileProviders and FileSystemGlobbing Extensions: Adding FileProviders and FileSystemGlobbing Mar 5, 2020
@ericstj
Copy link
Member

ericstj commented Mar 5, 2020

Fix runtime test error on FileProviders.Physical project

I'm not seeing this?

@ericstj
Copy link
Member

ericstj commented Mar 5, 2020

@steveharter @layomia looks like Json tests timed out here:

  Discovering: System.Text.Json.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Text.Json.Tests (found 1690 of 1718 test cases)
  Starting:    System.Text.Json.Tests (parallel test collections = on, max threads = 2)
   System.Text.Json.Tests: [Long Running Test] 'System.Text.Json.Serialization.Tests.StreamTests.RoundTripAsync', Elapsed: 00:03:45
   System.Text.Json.Tests: [Long Running Test] 'System.Text.Json.Serialization.Tests.StreamTests.RoundTripAsync', Elapsed: 00:05:45
   System.Text.Json.Tests: [Long Running Test] 'System.Text.Json.Serialization.Tests.StreamTests.RoundTripAsync', Elapsed: 00:07:45
   System.Text.Json.Tests: [Long Running Test] 'System.Text.Json.Serialization.Tests.StreamTests.RoundTripAsync', Elapsed: 00:09:45
   System.Text.Json.Tests: [Long Running Test] 'System.Text.Json.Serialization.Tests.StreamTests.RoundTripAsync', Elapsed: 00:11:45
   System.Text.Json.Tests: [Long Running Test] 'System.Text.Json.Serialization.Tests.StreamTests.RoundTripAsync', Elapsed: 00:13:45

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sln files?

src/libraries/pkg/descriptions.json Outdated Show resolved Hide resolved
@@ -15,7 +17,7 @@
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<IsAspNetCoreApp>true</IsAspNetCoreApp>
<!-- Temporarily ignore nit warning/errors (e.g. extra whitespace) from Extensions projects -->
<NoWarn Condition="!$(MSBuildProjectName.EndsWith('.Tests'))">$(NoWarn);SA1129;SA1028;SA1027;SA1121;CA1200</NoWarn>
<NoWarn Condition="!$(MSBuildProjectName.EndsWith('.Tests'))">$(NoWarn);SA1129;SA1028;SA1027;SA1121;CA1200;SA1000;CA1507;CA1802;CA1825</NoWarn>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the curious (like me)
SA1129: DoNotUseDefaultValueTypeConstructor
SA1028: CodeMustNotContainTrailingWhitespace
SA1027: UseTabsCorrectly
SA1121: UseBuiltInTypeAlias
CA1200: Avoid using cref tags with a prefix
SA1000 : KeywordsMustBeSpacedCorrectly
CA1507: Use nameof in place of string
CA1802: Use Literals Where Appropriate
CA1825: Avoid zero-length array allocations

Most of these should be easy to come back and fix at once.

@ericstj
Copy link
Member

ericstj commented Mar 5, 2020

Decide on how to do packaging that has 3 pairs of src/ref projects

Match what extensions did, which should be 1:1 library to package.

<TargetFrameworks>netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore;validation;options</PackageTags>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do these "PackageTags" go now? If we are removing them here, where should it go?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I don't think they are worth preserving, but I'm happy to hear otherwise if folks feel strongly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you feel they are not worth preserving? They assist when searching on nuget.org.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well aspnetcore is not really accurate anymore, and I the other two don't feel very informative (though I could be wrong). My experience with this sort of thing is that folks put stuff there because it was in a template then it gets stale. If on the other hand there was a concerted effort to deliberately set tags and make them meaningful then by all means keep them. It doesn't hurt to just copy all these into the pkgproj for now and we'll fix the bug where they don't make it into nuspec.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anurse @bradygaster - how much effort/thought went into the existing tags?

I agree we can easily dropp aspnetcore from these. But I'm not so sure about the other tags.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought? Almost none ;). Feel free to change them at-will.

@maryamariyan
Copy link
Member Author

I'm not seeing this?

@ericstj that should show up in next PR

@steveharter
Copy link
Member

@steveharter @layomia looks like Json tests timed out here:
System.Text.Json.Tests: [Long Running Test] 'System.Text.Json.Serialization.Tests.StreamTests.RoundTripAsync', Elapsed: 00:13:45

I have not seen a timeout here before.

I looked at the test and it doesn't seem possible to get a hang\deadlock.

The test uses ~.5MB -- is memory low on the hardware?

note: will be replaced by GenerateReferenceSource afterwards
from: Resources.resx to Resources\Strings.resx
-- note: in a previous bulk commit, descriptions
for FileProviders and FileSystemGlobbing were already added in json file

- [ ] TODO: test packaging failed with message:
 Unable to find description for package Microsoft.Extensions.FileSystemGlobbing
 (perhaps because it wants to create package for netcoreapp)
- [x] Enable on Directory.Build.props
- [x] build ref/src projects and used GenerateReferenceSource
- [x] cleanup src csproj properties
- [x] set proper targetframeworks

TODO
- [ ] Add package, 3 projects go in one package
- [ ] Fix failing test on M.E.FP.Physical with message:
Could not load file or assembly 'Microsoft.Extensions.FileProviders.Abstractions, Version=5.0.0.0
- Fix packaging issue
- Remove InternalsVisibleTo in src csproj
- Add sln file
- Abstractions
- Composite
- Physical
Done:
[x] bring over more history from extensions repo for
- TaskExtensions.cs
- ITestCondition.cs
- OperatingSystems.cs
- OSSkipConditionAttribute.c
@ericstj
Copy link
Member

ericstj commented Mar 12, 2020

This looks good now. CI is going 📗 🚀

@maryamariyan
Copy link
Member Author

@maryamariyan
Copy link
Member Author

The remaining failure on the CI is for System.IO.FileSystem.Watcher.Tests
https://github.com/dotnet/runtime/pull/33212/checks?check_run_id=504464776

This should be good to merge

@maryamariyan maryamariyan merged commit 473d6f9 into dotnet:master Mar 13, 2020
@ericstj
Copy link
Member

ericstj commented Mar 13, 2020

Did you open an issue for the FileSystem.Watcher test failure? Was there one already tracking it?

@ericstj
Copy link
Member

ericstj commented Mar 13, 2020

Here we go: #24181
I've reopened it.

Please make sure you take some action when you observe a failure that isn't caused by your change. That's how we get better 👍

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

Successfully merging this pull request may close these issues.

6 participants