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

Update to use BinaryDefense.FSharp.Analyzers.Hashing 0.2.2. Pinned Fantomas version to 3.2. #238

Merged
merged 2 commits into from
May 25, 2021

Conversation

enovales
Copy link
Contributor

@enovales enovales commented May 24, 2021

Proposed Changes

This updates the paket.dependencies used by the template projects, to pull in BinaryDefense.FSharp.Analyzers.Hashing 0.2.2, and fsharp-analyzers 0.8.0, for compatibility with the latest F# compiler service, analyzer SDK, etc. The paket.lock file for the templates was also updated, resulting in a number of other dependency updates.

This also pins the version of Fantomas to 3.2 (previously unpinned), so it doesn't move when running paket update, until the template can be updated accordingly.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • Build and tests pass locally
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Further comments

I created library and console projects with the template locally, and confirmed that they build out of the box.

@TheAngryByrd
Copy link
Owner

Getting build failure

Generating API Docs for /tmp/tmpwO1nIX/MyCoolLib/src/MyCoolLib/MyCoolLib.fsproj
generateDocs failure System.TypeInitializationException: The type initializer for '<StartupCode$FSharp-Formatting-Common>.$YaafFSharpScripting' threw an exception.
 ---> System.MissingMethodException: Method not found: 'FSharp.Compiler.SourceCodeServices.FSharpChecker FSharp.Compiler.SourceCodeServices.FSharpChecker.Create(Microsoft.FSharp.Core.FSharpOption`1<Int32>, Microsoft.FSharp.Core.FSharpOption`1<Boolean>, Microsoft.FSharp.Core.FSharpOption`1<Boolean>, Microsoft.FSharp.Core.FSharpOption`1<Resolver>, Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Core.FSharpFunc`2<System.Tuple`2<System.String,System.DateTime>,Microsoft.FSharp.Core.FSharpOption`1<System.Tuple`3<System.Object,IntPtr,Int32>>>>, Microsoft.FSharp.Core.FSharpOption`1<Boolean>, Microsoft.FSharp.Core.FSharpOption`1<Boolean>, Microsoft.FSharp.Core.FSharpOption`1<Boolean>)'.
   --- End of inner exception stack trace ---
   at <StartupCode$FSharp-Formatting-Common>.$YaafFSharpScripting.ofArgs$cont@987(Tuple`2 state, FsiOptions parsed, String arg, Unit unitVar)
   at Microsoft.FSharp.Collections.SeqModule.Fold[T,TState](FSharpFunc`2 folder, TState state, IEnumerable`1 source) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 731
   at Yaaf.FSharp.Scripting.FsiOptions.ofArgs(IEnumerable`1 args)
   at Microsoft.FSharp.Core.OptionModule.Map[T,TResult](FSharpFunc`2 mapping, FSharpOption`1 option) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\option.fs:line 53
   at FSharp.Literate.FsiEvaluator..ctor(FSharpOption`1 options, FSharpOption`1 fsiObj)
   at Program.GenerateDocs.parse@122.Invoke(String fileName, String source) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 140
   at Program.GenerateDocs.generateDocs@171.Invoke(String filePath) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 180
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@75.DoMoveNext(b& curr) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 81
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System.Collections.IEnumerator.MoveNext() in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 68
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at Program.GenerateDocs.generateDocs(IGlobbingPattern docSourcePaths, Configuration cfg) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 169
   at Program.GenerateDocs.generateDocs@273-4.Invoke(Unit unitVar) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 273
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 386
   at Program.GenerateDocs.generateDocs@272-9.Invoke(AsyncActivation`1 ctxt) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 272
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 104
Deleting directory /tmp/b32a858ab9464b6b9a02ba80785b7823
Deleting directory /tmp/6c5fe12144ec4a868d236fec5f5c56d0
Fatal error: System.AggregateException: One or more errors occurred. (Could not load type 'FSharp.Compiler.SourceCodeServices.FSharpErrorInfo' from assembly 'FSharp.Compiler.Service, Version=39.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.)
 ---> System.TypeLoadException: Could not load type 'FSharp.Compiler.SourceCodeServices.FSharpErrorInfo' from assembly 'FSharp.Compiler.Service, Version=39.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at Yaaf.FSharp.Scripting.CompilerServiceExtensions.FSharpAssemblyHelper.getProjectReferences[a](a frameworkVersion, FSharpOption`1 otherFlags, FSharpOption`1 libDirs, IEnumerable`1 dllFiles)
   at Yaaf.FSharp.Scripting.CompilerServiceExtensions.FSharpAssembly.LoadFiles.Static(IEnumerable`1 dllFiles, FSharpOption`1 libDirs, FSharpOption`1 otherFlags, FSharpOption`1 manualResolve)
   at FSharp.MetadataFormat.MetadataFormat.Generate(IEnumerable`1 dllFiles, FSharpOption`1 parameters, FSharpOption`1 xmlFile, FSharpOption`1 sourceRepo, FSharpOption`1 sourceFolder, FSharpOption`1 publicOnly, FSharpOption`1 libDirs, FSharpOption`1 otherFlags, FSharpOption`1 markDownComments, FSharpOption`1 urlRangeHighlight)
   at FSharp.MetadataFormat.MetadataFormat.Generate(String dllFile, FSharpOption`1 parameters, FSharpOption`1 xmlFile, FSharpOption`1 sourceRepo, FSharpOption`1 sourceFolder, FSharpOption`1 publicOnly, FSharpOption`1 libDirs, FSharpOption`1 otherFlags, FSharpOption`1 markDownComments, FSharpOption`1 urlRangeHighlight)
   at Program.GenerateDocs.generate@216.Invoke(String projInfo) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 221
   at Program.GenerateDocs.generateAPI@265-1.Invoke(String x) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 265
   at Microsoft.FSharp.Collections.ArrayModule.Parallel.Collect@1311-1.Invoke(Int32 i) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\array.fs:line 1311
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
   at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
   at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
   at Microsoft.FSharp.Collections.ArrayModule.Parallel.Collect[T,TResult](FSharpFunc`2 mapping, T[] array) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\array.fs:line 1310
   at Program.GenerateDocs.generateAPI(Configuration cfg) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 263
   at Program.GenerateDocs.generateAPI@281-2.Invoke(Unit unitVar) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 281
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 386
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 104
--- End of stack trace from previous location ---
   at Microsoft.FSharp.Control.AsyncResult`1.Commit() in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 337
   at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronouslyInCurrentThread[a](CancellationToken cancellationToken, FSharpAsync`1 computation) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 870
   at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronously[T](CancellationToken cancellationToken, FSharpAsync`1 computation, FSharpOption`1 timeout) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 878
   at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 1142
   at Program.GenerateDocs.renderDocs(Configuration cfg) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 285
   at Program.GenerateDocs.buildDocs(Configuration cfg) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 291
   at Program.main(String[] argv) in /tmp/tmpwO1nIX/MyCoolLib/docsTool/Program.fs:line 436

@enovales
Copy link
Contributor Author

enovales commented May 25, 2021

Ah, I wonder if the Docs group needs to pin its own version of FSharp.Compiler.Service? Let me see if that helps.

@TheAngryByrd TheAngryByrd merged commit c83e3d0 into TheAngryByrd:master May 25, 2021
TheAngryByrd added a commit that referenced this pull request May 25, 2021
## [0.26.4-beta001] - 2021-05-25

### Changed
- Update to use BinaryDefense.FSharp.Analyzers.Hashing 0.2.2 from [@enovales](https://github.com/enovales) - #238
TheAngryByrd added a commit that referenced this pull request May 25, 2021
## [0.26.4] - 2021-05-25

### Changed
- Update to use BinaryDefense.FSharp.Analyzers.Hashing 0.2.2 from [@enovales](https://github.com/enovales) - #238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants