This repository was archived by the owner on Feb 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of the type provider (#50)
* Initial implementation of the type provider (#44) Initial import of the type provider source code from ProtoTypes repository. (https://github.com/takemyoxygen/ProtoTypes) * Initial import of the type provider from ProtoTypes * Fix compilation errors * Rename project folder * Fix namespaces in TypeProvider project * Normalize module definitions in TypeProvider project * Add project for type provider unit tests * Fix version of FSharp.Core used by type provider tests * Import unit tests for the type provider * Fix fixed/sfixed types serialization * Recalculate SerializedLength of Message every time **Still to do:** - [ ] Import tests - [ ] Change repeated and map properties from mutable ones of type list<T> or IReadOnlyDictionary<T, K> to read-only properties of type ResizeArray<T> and IDictionary<T, K> - [ ] Fix compiler warnings - [ ] Valid default values instead of nulls ("" for string, empty collections for repeated and map fields) - [ ] Null checks when serializing - [ ] Exception type * Run tests in parallel; change tests timeout from 5 to 10 minutes * Downgrade framework to .NET 4.5 * Fix linux build. Update references to include System.Data and System.Data.Linq * Use read-only properties of mutable collection types for repeated and map fields (#51) * Fix warnings and tidy-up type provider code (#52) * Init fields with proper default values for types; null checks. (#53) * Introduce TypeContext wrapping protobuf type, kind and corresponding .NET type * Use TypeContext in MapDescriptor * Set default values in the message constructor * Check if required fields of other message types were specified when serializing * Make sure reference type properties can't be set to null * Remove required properties checks when serializing * Add custom exception types * Add logging and type provider caching * Add support for building project in Debug * Invalidate cached type provider when proto file changes * Support enums declared on the root level of the proto file * Create Froto.TypeProvider NuGet Package (#54) * Create Froto.TypeProvider nuget package * Add nuspec file for TypeProvider package * Move TypeProvider.Tests to the new file * Do not index github paket dependencies via SourceLink * Add AssemblyResolve event handler * Include pdb in the TypeProvider package * Docs and example of usage (#55) * Add some documentation of type provider usage * Update solution name in build.fsx and include type provider docs as solution files * Document limitations of the current implementaiton of the TP * Fix resolving types defined in the root scope
- Loading branch information
Showing
48 changed files
with
2,443 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.24720.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Froto.TypeProvider.Test", "TypeProvider.Test\Froto.TypeProvider.Test.fsproj", "{710D3AFE-1EB9-4ABB-B9B3-D30991B862DB}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{60E8A8C7-D42A-4C33-A2AD-32752CB33A46}" | ||
ProjectSection(SolutionItems) = preProject | ||
docs\type-provider\paket.dependencies = docs\type-provider\paket.dependencies | ||
docs\type-provider\protocol.proto = docs\type-provider\protocol.proto | ||
docs\type-provider\sample.fsx = docs\type-provider\sample.fsx | ||
docs\type-provider\type-provider.md = docs\type-provider\type-provider.md | ||
EndProjectSection | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{710D3AFE-1EB9-4ABB-B9B3-D30991B862DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{710D3AFE-1EB9-4ABB-B9B3-D30991B862DB}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{710D3AFE-1EB9-4ABB-B9B3-D30991B862DB}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{710D3AFE-1EB9-4ABB-B9B3-D30991B862DB}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.