Prexonite, a .NET hosted scripting language with a focus on meta-programming and embedded DSLs
0

Configure Feed

Select the types of activity you want to include in your feed.

PRX-45: Migrate to .NET 5.0; bump version number to 1.95

Christian Klauser (Dec 29, 2020, 12:50 AM +0100) b317e2d3 82066c8c

+23 -76
-14
Prexonite.5.1.ReSharper
··· 1 - <Configuration> 2 - <CustomStructuralPatterns> 3 - <Pattern Severity="ERROR"> 4 - <Comment>IsInstanceOfType is obsolete</Comment> 5 - <ReplaceComment>Use IsInstanceOf instead</ReplaceComment> 6 - <ReplacePattern>Assert.IsInstanceOf($args$);</ReplacePattern> 7 - <SearchPattern>Assert.IsInstanceOfType($args$);</SearchPattern> 8 - <Params /> 9 - <Placeholders> 10 - <ArgumentPlaceholder Name="args" Minimal="-1" Maximal="-1" /> 11 - </Placeholders> 12 - </Pattern> 13 - </CustomStructuralPatterns> 14 - </Configuration>
-14
Prexonite.6.0.ReSharper
··· 1 - <Configuration> 2 - <CustomStructuralPatterns> 3 - <Pattern Severity="ERROR" FormatAfterReplace="True" ShortenReferences="True" Language="CSHARP"> 4 - <Comment>IsInstanceOfType is obsolete</Comment> 5 - <ReplaceComment>Use IsInstanceOf instead</ReplaceComment> 6 - <ReplacePattern>Assert.IsInstanceOf($args$);</ReplacePattern> 7 - <SearchPattern>Assert.IsInstanceOfType($args$);</SearchPattern> 8 - <Params /> 9 - <Placeholders> 10 - <ArgumentPlaceholder Name="args" Minimal="-1" Maximal="-1" /> 11 - </Placeholders> 12 - </Pattern> 13 - </CustomStructuralPatterns> 14 - </Configuration>
-14
Prexonite.6.1.ReSharper
··· 1 - <Configuration> 2 - <CustomStructuralPatterns> 3 - <Pattern Severity="ERROR" FormatAfterReplace="True" ShortenReferences="True" Language="CSHARP"> 4 - <Comment>IsInstanceOfType is obsolete</Comment> 5 - <ReplaceComment>Use IsInstanceOf instead</ReplaceComment> 6 - <ReplacePattern>Assert.IsInstanceOf($args$);</ReplacePattern> 7 - <SearchPattern>Assert.IsInstanceOfType($args$);</SearchPattern> 8 - <Params /> 9 - <Placeholders> 10 - <ArgumentPlaceholder Name="args" Minimal="-1" Maximal="-1" /> 11 - </Placeholders> 12 - </Pattern> 13 - </CustomStructuralPatterns> 14 - </Configuration>
+1 -1
Prexonite/Compiler/AST/AstNamespaceUsage.cs
··· 74 74 get => _referencePath; 75 75 set 76 76 { 77 - if(!ReferenceEquals(_referencePath,null)) 77 + if(_referencePath != null) 78 78 throw new InvalidOperationException("Can only assign namespace usage reference path once."); 79 79 _referencePath = value; 80 80 }
+2 -9
Prexonite/Compiler/Parser.Code.cs
··· 174 174 175 175 public DeclarationScopeBuilder([NotNull]SymbolStoreBuilder localScopeBuilder, QualifiedId prefix, [NotNull]LocalNamespace ns) 176 176 { 177 - if (localScopeBuilder == null) 178 - throw new ArgumentNullException(nameof(localScopeBuilder)); 179 - if (ns == null) 180 - throw new ArgumentNullException(nameof(ns)); 181 - if (prefix == null) 182 - throw new ArgumentNullException(nameof(prefix)); 183 - 184 - _localScopeBuilder = localScopeBuilder; 177 + _localScopeBuilder = localScopeBuilder ?? throw new ArgumentNullException(nameof(localScopeBuilder)); 185 178 _prefix = prefix; 186 - _namespace = ns; 179 + _namespace = ns ?? throw new ArgumentNullException(nameof(ns)); 187 180 } 188 181 189 182 [NotNull]
+6 -9
Prexonite/Compiler/Symbolic/QualifiedId.cs
··· 34 34 35 35 namespace Prexonite.Compiler.Symbolic 36 36 { 37 - public struct QualifiedId : IReadOnlyList<string>, IEquatable<QualifiedId>, IComparable<QualifiedId> 37 + public readonly struct QualifiedId : IReadOnlyList<string>, IEquatable<QualifiedId>, IComparable<QualifiedId> 38 38 { 39 39 public void ToString([NotNull] TextWriter writer) 40 40 { ··· 56 56 } 57 57 } 58 58 59 - public override String ToString() 59 + public override string ToString() 60 60 { 61 61 var sb = new StringWriter(); 62 62 ToString(sb); ··· 93 93 return GetEnumerator(); 94 94 } 95 95 96 - public int Count 97 - { 98 - get { return _elements == null ? 0 : _elements.Length; } 99 - } 96 + public int Count => _elements?.Length ?? 0; 100 97 101 98 public string this[int index] 102 99 { ··· 116 113 { 117 114 var next = new string[_elements.Length + 1]; 118 115 Array.Copy(_elements,next, _elements.Length); 119 - next[next.Length - 1] = suffix; 116 + next[^1] = suffix; 120 117 return new QualifiedId(next); 121 118 } 122 119 } ··· 162 159 } 163 160 else 164 161 { 165 - // Compare paths in revrese, becaus they are much more likely to 162 + // Compare paths in reverse, because they are much more likely to 166 163 // differ at the end than at the beginning 167 164 for (var i = _elements.Length - 1; i >= 0; i++) 168 165 { ··· 206 203 public override bool Equals(object obj) 207 204 { 208 205 if (ReferenceEquals(null, obj)) return false; 209 - return obj is QualifiedId && Equals((QualifiedId)obj); 206 + return obj is QualifiedId id && Equals(id); 210 207 } 211 208 212 209 public override int GetHashCode()
+4 -4
Prexonite/Prexonite.csproj
··· 1 1 <Project Sdk="Microsoft.NET.Sdk"> 2 2 3 3 <PropertyGroup> 4 - <TargetFramework>netcoreapp3.1</TargetFramework> 5 - <LangVersion>8</LangVersion> 4 + <TargetFramework>net5.0</TargetFramework> 5 + <LangVersion>9</LangVersion> 6 6 7 7 </PropertyGroup> 8 8 9 9 <PropertyGroup> 10 10 <IsPackable>true</IsPackable> 11 - <Version>1.91</Version> 11 + <Version>1.95</Version> 12 12 <Title>Prexonite Scripting Language</Title> 13 13 <PackageDescription>An embeddable scripting language with a focus on meta programming and domain specific languages.</PackageDescription> 14 14 <Description>$(PackageDescription)</Description> 15 - <Copyright>Christian Klauser © 2019</Copyright> 15 + <Copyright>Christian Klauser © 2021</Copyright> 16 16 <PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression> 17 17 <IncludeSymbols>true</IncludeSymbols> 18 18 <IncludeSource>true</IncludeSource>
+2 -2
PrexoniteTests/PrexoniteTests.csproj
··· 3 3 <PropertyGroup> 4 4 <OutputType>Exe</OutputType> 5 5 <IsTestProject>true</IsTestProject> 6 - <TargetFramework>netcoreapp3.1</TargetFramework> 7 - <LangVersion>8</LangVersion> 6 + <TargetFramework>net5.0</TargetFramework> 7 + <LangVersion>9</LangVersion> 8 8 </PropertyGroup> 9 9 10 10 <PropertyGroup>
+2 -3
PrexoniteTests/Tests/Configurations/ModuleCacheV2.cs
··· 22 22 23 23 [ThreadStatic] 24 24 private static Engine? _sharedEnginePrototype; 25 + 26 + private static readonly TraceSource _trace = new("PrexoniteTests.Tests.Configurations.ModuleCacheV2"); 25 27 26 28 private static readonly Lazy<string> _slnPath = new Lazy<string>(() => 27 29 { ··· 41 43 }, LazyThreadSafetyMode.ExecutionAndPublication); 42 44 43 45 public static string SolutionPath => _slnPath.Value; 44 - 45 - private static readonly TraceSource _trace = 46 - new TraceSource("PrexoniteTests.Tests.Configurations.ModuleCacheV2"); 47 46 48 47 private static ISelfAssemblingPlan sharedPlan 49 48 {
+4 -4
Prx/Prx.csproj
··· 6 6 7 7 <PropertyGroup> 8 8 <OutputType>exe</OutputType> 9 - <TargetFramework>netcoreapp3.1</TargetFramework> 9 + <TargetFramework>net5.0</TargetFramework> 10 10 <AppConfig>config/app.$(Configuration).config</AppConfig> 11 - <LangVersion>8</LangVersion> 12 - <Version>1.91</Version> 11 + <LangVersion>9</LangVersion> 12 + <Version>1.95</Version> 13 13 <Title>Prexonite CLI</Title> 14 14 <Description>Prexonite command line interpreter and compiler.</Description> 15 - <Copyright>Christian Klauser © 2019</Copyright> 15 + <Copyright>Christian Klauser © 2020</Copyright> 16 16 <PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression> 17 17 <IncludeSymbols>true</IncludeSymbols> 18 18 <IncludeSource>true</IncludeSource>
+1 -1
Prx/SuperConsole.cs
··· 313 313 { 314 314 e.Cancel = true; 315 315 ctrlCEvent.Set(); 316 - MainEngineThread.Abort(); 316 + Environment.Exit(2); 317 317 } 318 318 } 319 319
+1 -1
azure-pipelines.yml
··· 35 35 steps: 36 36 - task: UseDotNet@2 37 37 inputs: 38 - version: '3.1.x' 38 + version: '5.0.x' 39 39 40 40 - task: NuGetAuthenticate@0 41 41