-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Remove unused usings. #758
Conversation
Affect: * src\Nest * src\Profiling * src\Serialization * src\Tests
Woah thanks @tkirill Will gladly pull this in but will have to ask you to sign our CLA before I may do so: http://www.elasticsearch.org/contributor-agreement/ Thanks in advance. |
@Mpdreamz Oh, I completely forgot about this! I'm going to do this right now. |
Conflicts: src/Nest/DSL/AnalyzeDescriptor.cs src/Nest/DSL/Bulk/BulkUpdateDescriptor.cs src/Nest/DSL/BulkDescriptor.cs src/Nest/DSL/ClearCacheDescriptor.cs src/Nest/DSL/ClearScrollDescriptor.cs src/Nest/DSL/CloseIndexDescriptor.cs src/Nest/DSL/ClusterHealthDescriptor.cs src/Nest/DSL/ClusterStateDescriptor.cs src/Nest/DSL/CreateIndexDescriptor.cs src/Nest/DSL/DeleteByQueryDescriptor.cs src/Nest/DSL/DeleteDescriptor.cs src/Nest/DSL/DeleteIndexDescriptor.cs src/Nest/DSL/DeleteMappingDescriptor.cs src/Nest/DSL/DeleteRepositoryDescriptor.cs src/Nest/DSL/DeleteSnapshotDescriptor.cs src/Nest/DSL/DeleteTemplateDescriptor.cs src/Nest/DSL/DeleteWarmerDescriptor.cs src/Nest/DSL/DocumentExistsDescriptor.cs src/Nest/DSL/FlushDescriptor.cs src/Nest/DSL/GetAliasesDescriptor.cs src/Nest/DSL/GetDescriptor.cs src/Nest/DSL/GetIndexSettingsDescriptor.cs src/Nest/DSL/GetMappingDescriptor.cs src/Nest/DSL/GetSnapshotDescriptor.cs src/Nest/DSL/GetTemplateDescriptor.cs src/Nest/DSL/GetWarmerDescriptor.cs src/Nest/DSL/IndexDescriptor.cs src/Nest/DSL/IndexExistsDescriptor.cs src/Nest/DSL/IndicesStatsDescriptor.cs src/Nest/DSL/IndicesStatusDescriptor.cs src/Nest/DSL/InfoDescriptor.cs src/Nest/DSL/MoreLikeThisDescriptor.cs src/Nest/DSL/MultiGet/SimpleGetDescriptor.cs src/Nest/DSL/MultiSearchDescriptor.cs src/Nest/DSL/NodesInfoDescriptor.cs src/Nest/DSL/NodesStatsDescriptor.cs src/Nest/DSL/OpenIndexDescriptor.cs src/Nest/DSL/OptimizeDescriptor.cs src/Nest/DSL/Paths/DocumentOptionalPathDescriptor.cs src/Nest/DSL/Paths/DocumentPathDescriptor.cs src/Nest/DSL/Paths/FixedIndexTypePathDescriptor.cs src/Nest/DSL/Paths/IndexOptionalPathDescriptor.cs src/Nest/DSL/Paths/IndexPathDescriptor.cs src/Nest/DSL/Paths/IndexTypePathDescriptor.cs src/Nest/DSL/Paths/IndexTypePathTypedDescriptor.cs src/Nest/DSL/Paths/IndicesOptionalExplicitAllPathDescriptor.cs src/Nest/DSL/Paths/IndicesOptionalPathDescriptor.cs src/Nest/DSL/Paths/IndicesOptionalTypesNamePathDecriptor.cs src/Nest/DSL/Paths/IndicesTypePathDescriptor.cs src/Nest/DSL/Paths/NodeIdOptionalDescriptor.cs src/Nest/DSL/Paths/QueryPathDescriptor.cs src/Nest/DSL/PercolateDescriptor.cs src/Nest/DSL/PutMappingDescriptor.cs src/Nest/DSL/PutWarmerDescriptor.cs src/Nest/DSL/RefreshDescriptor.cs src/Nest/DSL/RegisterPercolatorDescriptor.cs src/Nest/DSL/Reindex/ReindexDescriptor.cs src/Nest/DSL/ScrollDescriptor.cs src/Nest/DSL/SegmentsDescriptor.cs src/Nest/DSL/SourceDescriptor.cs src/Nest/DSL/SuggestDescriptor.cs src/Nest/DSL/UnregisterPercolatorDescriptor.cs src/Nest/DSL/UpdateDescriptor.cs src/Nest/DSL/UpdateSettingsDescriptor.cs src/Nest/Domain/Bulk/BaseBulkOperation.cs src/Nest/Domain/Responses/BaseResponse.cs src/Nest/ElasticClient-DeleteIndex.cs src/Nest/ElasticClient-DeleteMany.cs src/Nest/ElasticClient-IndicesStats.cs src/Nest/ElasticClient-MultiSearch.cs src/Nest/ElasticClient-Search.cs src/Nest/ElasticClient-State.cs src/Nest/ElasticClient.cs src/Nest/ExposedInternals/INestSerializer.cs src/Tests/Nest.Tests.Integration/Core/Get/GetMultiTests.cs src/Tests/Nest.Tests.Integration/Indices/AliasTests.cs src/Tests/Nest.Tests.Integration/RawCalls/HasUsefultServerExceptionTests.cs src/Tests/Nest.Tests.Integration/Reproduce/Reproduce654Tests.cs src/Tests/Nest.Tests.Integration/Reproduce/Reproduce659Tests.cs src/Tests/Nest.Tests.Unit/Core/Bulk/BulkTests.cs src/Tests/Nest.Tests.Unit/Search/InitializerSyntax/InitializerExample.cs
Conflicts: src/Nest/DSL/Facets/DateInterval.cs src/Nest/DSL/Query/MatchPhrasePrefixQueryDescriptor.cs src/Nest/Domain/Mapping/Descriptors/PropertiesDescriptor.cs
Preserve these usings even if they are not used: * System * System.Collections.Generic * System.Linq Affect: src\Nest src\Profiling src\Serialization src\Tests It doesn't affect src\CodeGeneration and src\Elasticsearch.Net because I'm not sure what code is generated and what isn't.
@Mpdreamz OK, I set to never remove these namespaces too and then removed unused usings again. It still doesn't affect src\CodeGeneration and src\Elasticsearch.Net. I would be grateful if you could explain reasons why do you have these exclusions? I see it for the first time and it is pretty interesting. |
@tkirill The main reasoning behind leaving those namespaces, especially System, is because they contain many of the basic .NET classes that you would just expect to be there without having to manually add a using for. In the case of NEST, we make heavy use of Linq and generics, so a lot of the time we rely on System.Linq and System.Generic.Colletions already being there. It's just simply for convenience ;). Thanks for updating your PR, we'll take another look and re-consider pulling it in. |
Thanks for the PR @tkirill I'm sure this will settle some folks OCD 👍 |
Hi all!
This PR contains not so useful changes but at least this makes my ReSharper happy. 😃
Affects:
It doesn't affect src\CodeCompletion and src\Elasticsearch.Net because I'm not sure what code is generated and what isn't.