Skip to content

Commit

Permalink
Merge pull request #4 from apiiro/ohad/net-core-6
Browse files Browse the repository at this point in the history
net core 6
  • Loading branch information
ariel-levy authored Dec 2, 2021
2 parents 41149cd + 7b025fc commit 583154a
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 24 deletions.
32 changes: 32 additions & 0 deletions make-nuget.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# NOTE:
# Until we'll set the version as an argument make sure to change the version in the 'nuget push' lines to matach the version in binaries.

WORK_DIR=`pwd`

pushd ./src/LanguageServer/Impl
dotnet pack --configuration Release
dotnet nuget push $WORK_DIR/output/bin/Release/Microsoft.Python.LanguageServer.1.0.2.nupkg --source "github" --skip-duplicate --no-symbols true
popd

pushd ./src/Analysis/Ast/Impl
dotnet pack --configuration Release
dotnet nuget push $WORK_DIR/output/bin/Release/Microsoft.Python.Analysis.1.0.2.nupkg --source "github" --skip-duplicate --no-symbols true
popd

pushd ./src/Analysis/Core/Impl
dotnet pack --configuration Release
dotnet nuget push $WORK_DIR/output/bin/Release/Microsoft.Python.Analysis.Core.1.0.2.nupkg --source "github" --skip-duplicate --no-symbols true
popd

pushd ./src/Parsing/Impl
dotnet pack --configuration Release
dotnet nuget push $WORK_DIR/output/bin/Release/Microsoft.Python.Parsing.1.0.2.nupkg --source "github" --skip-duplicate --no-symbols true
popd

pushd ./src/Core/Impl
dotnet pack --configuration Release
dotnet nuget push $WORK_DIR/output/bin/Release/Microsoft.Python.Core.1.0.2.nupkg --source "github" --skip-duplicate --no-symbols true
popd

4 changes: 2 additions & 2 deletions src/Analysis/Ast/Impl/Microsoft.Python.Analysis.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Microsoft.Python.Analysis</RootNamespace>
<AssemblyName>Microsoft.Python.Analysis</AssemblyName>
<PackageId>Microsoft.Python.Analysis</PackageId>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
<Authors>Apiiro</Authors>
<Company>Apiiro</Company>
<RepositoryUrl>https://github.com/apiiro/python-language-server</RepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Microsoft.Python.Analysis.Tests</RootNamespace>
<AssemblyName>Microsoft.Python.Analysis.Tests</AssemblyName>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Analysis/Core/Impl/Microsoft.Python.Analysis.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Microsoft.Python.Analysis</RootNamespace>
<AssemblyName>Microsoft.Python.Analysis.Core</AssemblyName>
<PackageId>Microsoft.Python.Analysis.Core</PackageId>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
<Authors>Apiiro</Authors>
<Company>Apiiro</Company>
<RepositoryUrl>https://github.com/apiiro/python-language-server</RepositoryUrl>
Expand Down
19 changes: 10 additions & 9 deletions src/Core/Impl/Extensions/EnumerableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,15 @@ public static IEnumerable<T> TraverseDepthFirst<T>(this T root, Func<T, IEnumera
}
}

public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> selector) {
var seen = new HashSet<TKey>();

foreach (var item in source) {
if (seen.Add(selector(item))) {
yield return item;
}
}
}
// this method is implemented is System.Linq in .net core 6
// public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> selector) {
// var seen = new HashSet<TKey>();
//
// foreach (var item in source) {
// if (seen.Add(selector(item))) {
// yield return item;
// }
// }
// }
}
}
4 changes: 2 additions & 2 deletions src/Core/Impl/Microsoft.Python.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Microsoft.Python.Core</RootNamespace>
<AssemblyName>Microsoft.Python.Core</AssemblyName>
<PackageId>Microsoft.Python.Core</PackageId>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
<Authors>Apiiro</Authors>
<Company>Apiiro</Company>
<RepositoryUrl>https://github.com/apiiro/python-language-server</RepositoryUrl>
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Test/Microsoft.Python.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Microsoft.Python.Core.Tests</RootNamespace>
<AssemblyName>Microsoft.Python.Core.Tests</AssemblyName>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Microsoft.Python.LanguageServer</RootNamespace>
<AssemblyName>Microsoft.Python.LanguageServer</AssemblyName>
<PackageId>Microsoft.Python.LanguageServer</PackageId>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
<Authors>Apiiro</Authors>
<Company>Apiiro</Company>
<PackageDescription>Apiiro Python Language Server</PackageDescription>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Microsoft.Python.LanguageServer.Tests</RootNamespace>
<AssemblyName>Microsoft.Python.LanguageServer.Tests</AssemblyName>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Parsing/Impl/Microsoft.Python.Parsing.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Microsoft.Python.Parsing</RootNamespace>
<AssemblyName>Microsoft.Python.Parsing</AssemblyName>
<PackageId>Microsoft.Python.Parsing</PackageId>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
<Authors>Apiiro</Authors>
<Company>Apiiro</Company>
<RepositoryUrl>https://github.com/apiiro/python-language-server</RepositoryUrl>
Expand Down
2 changes: 1 addition & 1 deletion src/Parsing/Test/Microsoft.Python.Parsing.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Microsoft.Python.Parsing.Tests</RootNamespace>
<AssemblyName>Microsoft.Python.Parsing.Tests</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/UnitTests/Core/Impl/UnitTests.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Microsoft.Python.UnitTests.Core</RootNamespace>
<AssemblyName>Microsoft.Python.UnitTests.Core</AssemblyName>
</PropertyGroup>
Expand Down

0 comments on commit 583154a

Please sign in to comment.