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

updated to Roslyn 2.11.0-beta1-final #1365

Merged
merged 7 commits into from
Jan 2, 2019
Merged

Conversation

filipw
Copy link
Member

@filipw filipw commented Dec 15, 2018

Fixes #1364
Additionally, added C# 8.0 to the language version converter and added a test to verify that scripting defaults to C# 8.0 (it should always use latest version).

I think this should only be merged after we release a new version from master, as master has Roslyn 2.10.0 and we have not yet released a 2.10.0-based OmniSharp.

@filipw
Copy link
Member Author

filipw commented Dec 15, 2018

Looks like this works on Windows, but on Mono fails with the following stack

System.TypeLoadException: Could not load type of field 'Microsoft.CodeAnalysis.SQLite.Interop.SqlConnection:_handle' (0) due to: Could not load file or assembly 'SQLitePCLRaw.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1488e028ca7ab535' or one of its dependencies.
  at (wrapper managed-to-native) System.RuntimeType.GetPropertiesByName_native(System.RuntimeType,intptr,System.Reflection.BindingFlags,bool)
  at System.RuntimeType.GetPropertiesByName (System.String name, System.Reflection.BindingFlags bindingAttr, System.Boolean icase, System.RuntimeType reflectedType) [0x0001b] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at System.RuntimeType.GetPropertyCandidates (System.String name, System.Reflection.BindingFlags bindingAttr, System.Type[] types, System.Boolean allowPrefixLookup) [0x00010] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at System.RuntimeType.GetProperties (System.Reflection.BindingFlags bindingAttr) [0x00000] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at System.Reflection.RuntimeReflectionExtensions.GetRuntimeProperties (System.Type type) [0x00006] in <0f8aeac9d63d4b8aa575761bb4e65b79>:0 
  at System.Composition.TypedParts.Discovery.TypeInspector+<DiscoverPropertyExports>d__7.MoveNext () [0x00030] in <9aac21a4a3f24063b2b8b59143acddfc>:0 
  at System.Composition.TypedParts.Discovery.TypeInspector+<DiscoverExports>d__5.MoveNext () [0x000dc] in <9aac21a4a3f24063b2b8b59143acddfc>:0 
  at System.Composition.TypedParts.Discovery.TypeInspector.InspectTypeForPart (System.Reflection.TypeInfo type, System.Composition.TypedParts.Discovery.DiscoveredPart& part) [0x00061] in <9aac21a4a3f24063b2b8b59143acddfc>:0 
  at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor (System.Collections.Generic.IEnumerable`1[T] types, System.Composition.Convention.AttributedModelProvider attributeContext) [0x00037] in <9aac21a4a3f24063b2b8b59143acddfc>:0 
  at System.Composition.Hosting.ContainerConfiguration.CreateContainer () [0x00042] in <9aac21a4a3f24063b2b8b59143acddfc>:0 
  at Microsoft.CodeAnalysis.Host.Mef.MefHostServices.Create (System.Collections.Generic.IEnumerable`1[T] assemblies) [0x00052] in <584f9e64c3434f96bb53a5fb697dcadf>:0 
  at OmniSharp.HostServicesAggregator.CreateHostServices () [0x00000] in <2c158e114ee34d36a470a54c234f4f73>:0 
  at OmniSharp.OmniSharpWorkspace..ctor (OmniSharp.HostServicesAggregator aggregator, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, OmniSharp.FileWatching.IFileSystemWatcher fileSystemWatcher) [0x0000b] in <2c158e114ee34d36a470a54c234f4f73>:0 
  at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,System.Composition.Hosting.Core.LifetimeContext,System.Composition.Hosting.Core.CompositionOperation)
  at System.Composition.TypedParts.ActivationFeatures.DisposalFeature+<>c__DisplayClass0_0.<RewriteActivator>b__0 (System.Composition.Hosting.Core.LifetimeContext c, System.Composition.Hosting.Core.CompositionOperation o) [0x00000] in <9aac21a4a3f24063b2b8b59143acddfc>:0 
  at System.Composition.Hosting.Core.LifetimeContext.GetOrCreate (System.Int32 sharingId, System.Composition.Hosting.Core.CompositionOperation operation, System.Composition.Hosting.Core.CompositeActivator creator) [0x000a8] in <8e026c716fc84f38aae28085eaaee9fc>:0 
  at System.Composition.TypedParts.ActivationFeatures.LifetimeFeature+<>c__DisplayClass1_0.<RewriteActivator>b__0 (System.Composition.Hosting.Core.LifetimeContext c, System.Composition.Hosting.Core.CompositionOperation o) [0x00011] in <9aac21a4a3f24063b2b8b59143acddfc>:0 
  at System.Composition.Hosting.Core.CompositionOperation.Run (System.Composition.Hosting.Core.LifetimeContext outermostLifetimeContext, System.Composition.Hosting.Core.CompositeActivator compositionRootActivator) [0x0001c] in <8e026c716fc84f38aae28085eaaee9fc>:0 
  at System.Composition.Hosting.Core.LifetimeContext.TryGetExport (System.Composition.Hosting.Core.CompositionContract contract, System.Object& export) [0x0001d] in <8e026c716fc84f38aae28085eaaee9fc>:0 
  at System.Composition.Hosting.CompositionHost.TryGetExport (System.Composition.Hosting.Core.CompositionContract contract, System.Object& export) [0x00000] in <8e026c716fc84f38aae28085eaaee9fc>:0 
  at System.Composition.CompositionContext.GetExport (System.Composition.Hosting.Core.CompositionContract contract) [0x00000] in <12675e53c8854b48abd187539ce374db>:0 
  at System.Composition.CompositionContext.GetExport (System.Type exportType, System.String contractName) [0x00008] in <12675e53c8854b48abd187539ce374db>:0 
  at System.Composition.CompositionContext.GetExport[TExport] (System.String contractName) [0x00000] in <12675e53c8854b48abd187539ce374db>:0 
  at System.Composition.CompositionContext.GetExport[TExport] () [0x00000] in <12675e53c8854b48abd187539ce374db>:0 
  at OmniSharp.Stdio.Host.Initialize () [0x0000d] in <4fba2e716b9d446e8a7aaee8c0ec1500>:0 
  at OmniSharp.Stdio.Host..ctor (System.IO.TextReader input, OmniSharp.Stdio.Services.ISharedTextWriter writer, OmniSharp.IOmniSharpEnvironment environment, System.IServiceProvider serviceProvider, OmniSharp.CompositionHostBuilder compositionHostBuilder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Threading.CancellationTokenSource cancellationTokenSource) [0x00070] in <4fba2e716b9d446e8a7aaee8c0ec1500>:0 
  at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_1.<Main>b__1 () [0x00138] in <f4fbf3b1468c4d85a1b6d592ea2ed3a2>:0 
  at OmniSharp.CommandLineApplication+<>c__DisplayClass11_0.<OnExecute>b__0 () [0x0000b] in <1029fd70a97546d4980c6c1d970ab776>:0 
  at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) [0x00039] in <344a1e8cd6594b17b1e01f8df6ae8827>:0 
  at OmniSharp.CommandLineApplication.Execute (System.Collections.Generic.IEnumerable`1[T] args) [0x00042] in <1029fd70a97546d4980c6c1d970ab776>:0 
  at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_0.<Main>b__0 () [0x00028] in <f4fbf3b1468c4d85a1b6d592ea2ed3a2>:0 
  at OmniSharp.HostHelpers.Start (System.Func`1[TResult] action) [0x0001c] in <1029fd70a97546d4980c6c1d970ab776>:0 

this is new to me, does the new Roslyn version now ship with an embedded SQLite?

@filipw
Copy link
Member Author

filipw commented Dec 15, 2018

OK I think Mono is no longer shipping SQLitePCLRaw.core in its GAC (I think it used to) so we should bundle it.
SQLite is a dependency of Microsoft.CodeAnalysis.Workspaces. I am not sure why it doesn't resolve now, looks like a packaging issue.
When I pull it from nuget and include in the artifact output folder, OmniSharp starts fine. Will include this in the PR then.

@rchande rchande merged commit ee748be into master Jan 2, 2019
@filipw filipw deleted the feature/roslyn.2-11-beta1 branch January 24, 2019 16:19
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