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

[WIP] vscode-extensions.ms-python.python: 2019.6.24221 -> 2019.8.29288 #66501

Conversation

eadwu
Copy link
Member

@eadwu eadwu commented Aug 12, 2019

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@danbst
Copy link
Contributor

danbst commented Aug 15, 2019

Not quite a problem here, but turns out there exist ms-vscode.cpptools and ms-python.python. I'd expect both to be under same namespace, probably even just vscode-extensions.microsoft.{cpptools,python}

@danbst
Copy link
Contributor

danbst commented Aug 15, 2019

Also, I can't build it. Probably a network problem:

$ nix-prefetch-url https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-linux-x64.0.3.43.nupkg
warning: unable to download 'https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-linux-x64.0.3.43.nupkg': HTTP error 200 (curl error: Failure when receiving data from the peer); retrying in 284 ms
warning: unable to download 'https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-linux-x64.0.3.43.nupkg': HTTP error 200 (curl error: Failure when receiving data from the peer); retrying in 529 ms
^Cerror: download of 'https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-linux-x64.0.3.43.nupkg' was interrupted

[nix-shell:~/dev/nixpkgs]$ curl -LO https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-linux-x64.0.3.43.nupkg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  1 29.4M    1  498k    0     0   115k      0  0:04:21  0:00:04  0:04:17  115k
curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

curl works when trying several times, but Nix can't download that blob. Is it possible to replace the source of language server to https://github.com/microsoft/python-language-server?

@eadwu
Copy link
Member Author

eadwu commented Aug 15, 2019

~
➜ nix-prefetch-url https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-linux-x64.0.3.43.nupkg
[29.5 MiB DL]
path is '/nix/store/137457rdz78dbmws3y1ff46jf2j9bdb3-Python-Language-Server-linux-x64.0.3.43.nupkg'
04kgajsajsm33n9qnhhi472bgm7v9kqwpzgjjyx60kd9rb72np11

I don't think it can be replaced without compiling the source seeing how there are dlls in the archive. Also have no clue if that is the correct project since the version naming seems to be off or maybe they just got lazy?

@danbst
Copy link
Contributor

danbst commented Aug 15, 2019

@eadwu yeah, I can nix-prefetch this file from AWS us-east-1, but can't nix-prefetch it from my machine in Kyiv. OTOH, the regular download works fine (firefox). I can't say what is this issue about... I've seen a thread about Nix Fastly binary cache behaving same for some users.

I found this in their .nuspec file:

<projectUrl>https://github.com/Microsoft/python-language-server</projectUrl>

Bunch of DLLs is probably .NET core disttrib

@eadwu
Copy link
Member Author

eadwu commented Aug 15, 2019

Tried a basic dotnetBuildPackage and I'm getting

ms-python-language-server-unstable> __________________________________________________
ms-python-language-server-unstable> /build/Impl/Microsoft.Python.LanguageServer.csproj: error : /build/Impl/Microsoft.Python.LanguageServer.csproj: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  

@danbst
Copy link
Contributor

danbst commented Aug 16, 2019

I've got to making it build: 955c143

I'm still unable to prefetch PLS binary (I know about manual way, but the situation is still disturbing).

However when installing this extension into ~/.vscode/extensions/ms-python.python, it isn't recognized by vscode... Not sure why

@eadwu
Copy link
Member Author

eadwu commented Aug 16, 2019

Looks like it's missing files?

nixpkgs on  develop [⇣$] 
➜ ls result/share/vscode-insiders/extensions/ms-python.python/languageServer.0.3.40
'[Content_Types].xml'                                 System.IO.UnmanagedMemoryStream.dll
 createdump                                           System.Linq.dll
 cs                                                   System.Linq.Expressions.dll
 de                                                   System.Linq.Parallel.dll
 env-vars                                             System.Linq.Queryable.dll
 es                                                   System.Memory.dll
 fr                                                   System.Native.a
 get_search_paths.py                                  System.Native.so
 inspector.py                                         System.Net.dll
 it                                                   System.Net.Http.dll
 ja                                                   System.Net.HttpListener.dll
 ko                                                   System.Net.Http.Native.a
 libclrjit.so                                         System.Net.Http.Native.so
 libcoreclr.so                                        System.Net.Mail.dll
 libcoreclrtraceptprovider.so                         System.Net.NameResolution.dll
 libdbgshim.so                                        System.Net.NetworkInformation.dll
 libhostfxr.so                                        System.Net.Ping.dll
 libhostpolicy.so                                     System.Net.Primitives.dll
 libmscordaccore.so                                   System.Net.Requests.dll
 libmscordbi.so                                       System.Net.Security.dll
 libsosplugin.so                                      System.Net.Security.Native.a
 libsos.so                                            System.Net.Security.Native.so
 Microsoft.CSharp.dll                                 System.Net.ServicePoint.dll
 Microsoft.Extensions.FileSystemGlobbing.dll          System.Net.Sockets.dll
 Microsoft.Python.Analysis.Core.dll                   System.Net.WebClient.dll
 Microsoft.Python.Analysis.Core.pdb                   System.Net.WebHeaderCollection.dll
 Microsoft.Python.Analysis.deps.json                  System.Net.WebProxy.dll
 Microsoft.Python.Analysis.dll                        System.Net.WebSockets.Client.dll
 Microsoft.Python.Analysis.pdb                        System.Net.WebSockets.dll
 Microsoft.Python.Core.dll                            System.Numerics.dll
 Microsoft.Python.Core.pdb                            System.Numerics.Vectors.dll
 Microsoft.Python.LanguageServer                      System.ObjectModel.dll
 Microsoft.Python.LanguageServer.deps.json            System.Private.CoreLib.dll
 Microsoft.Python.LanguageServer.dll                  System.Private.DataContractSerialization.dll
 Microsoft.Python.LanguageServer.pdb                  System.Private.Uri.dll
 Microsoft.Python.LanguageServer.runtimeconfig.json   System.Private.Xml.dll
 Microsoft.Python.Parsing.dll                         System.Private.Xml.Linq.dll
 Microsoft.Python.Parsing.pdb                         System.Reflection.DispatchProxy.dll
 Microsoft.VisualBasic.dll                            System.Reflection.dll
 Microsoft.VisualStudio.Threading.dll                 System.Reflection.Emit.dll
 Microsoft.VisualStudio.Validation.dll                System.Reflection.Emit.ILGeneration.dll
 Microsoft.Win32.Primitives.dll                       System.Reflection.Emit.Lightweight.dll
 Microsoft.Win32.Registry.dll                         System.Reflection.Extensions.dll
 mscorlib.dll                                         System.Reflection.Metadata.dll
 Nerdbank.Streams.dll                                 System.Reflection.Primitives.dll
 netstandard.dll                                      System.Reflection.TypeExtensions.dll
 Newtonsoft.Json.dll                                  System.Resources.Reader.dll
 package                                              System.Resources.ResourceManager.dll
 pl                                                   System.Resources.Writer.dll
 pt-BR                                                System.Runtime.CompilerServices.VisualC.dll
 Python-Language-Server-linux-x64.nuspec              System.Runtime.dll
 _rels                                                System.Runtime.Extensions.dll
 ru                                                   System.Runtime.Handles.dll
 scrape_module.py                                     System.Runtime.InteropServices.dll
 SignLayout.deps.json                                 System.Runtime.InteropServices.RuntimeInformation.dll
 sosdocsunix.txt                                      System.Runtime.InteropServices.WindowsRuntime.dll
 SOS.NETCore.dll                                      System.Runtime.Loader.dll
 StreamJsonRpc.dll                                    System.Runtime.Numerics.dll
 Stubs                                                System.Runtime.Serialization.dll
 System.AppContext.dll                                System.Runtime.Serialization.Formatters.dll
 System.Buffers.dll                                   System.Runtime.Serialization.Json.dll
 System.Collections.Concurrent.dll                    System.Runtime.Serialization.Primitives.dll
 System.Collections.dll                               System.Runtime.Serialization.Xml.dll
 System.Collections.Immutable.dll                     System.Security.AccessControl.dll
 System.Collections.NonGeneric.dll                    System.Security.Claims.dll
 System.Collections.Specialized.dll                   System.Security.Cryptography.Algorithms.dll
 System.ComponentModel.Annotations.dll                System.Security.Cryptography.Cng.dll
 System.ComponentModel.DataAnnotations.dll            System.Security.Cryptography.Csp.dll
 System.ComponentModel.dll                            System.Security.Cryptography.Encoding.dll
 System.ComponentModel.EventBasedAsync.dll            System.Security.Cryptography.Native.OpenSsl.a
 System.ComponentModel.Primitives.dll                 System.Security.Cryptography.Native.OpenSsl.so
 System.ComponentModel.TypeConverter.dll              System.Security.Cryptography.OpenSsl.dll
 System.Configuration.dll                             System.Security.Cryptography.Primitives.dll
 System.Console.dll                                   System.Security.Cryptography.X509Certificates.dll
 System.Core.dll                                      System.Security.dll
 System.Data.Common.dll                               System.Security.Principal.dll
 System.Data.dll                                      System.Security.Principal.Windows.dll
 System.Diagnostics.Contracts.dll                     System.Security.SecureString.dll
 System.Diagnostics.Debug.dll                         System.ServiceModel.Web.dll
 System.Diagnostics.DiagnosticSource.dll              System.ServiceProcess.dll
 System.Diagnostics.FileVersionInfo.dll               System.Text.Encoding.dll
 System.Diagnostics.Process.dll                       System.Text.Encoding.Extensions.dll
 System.Diagnostics.StackTrace.dll                    System.Text.RegularExpressions.dll
 System.Diagnostics.TextWriterTraceListener.dll       System.Threading.dll
 System.Diagnostics.Tools.dll                         System.Threading.Overlapped.dll
 System.Diagnostics.TraceSource.dll                   System.Threading.Tasks.Dataflow.dll
 System.Diagnostics.Tracing.dll                       System.Threading.Tasks.dll
 System.dll                                           System.Threading.Tasks.Extensions.dll
 System.Drawing.dll                                   System.Threading.Tasks.Parallel.dll
 System.Drawing.Primitives.dll                        System.Threading.Thread.dll
 System.Dynamic.Runtime.dll                           System.Threading.ThreadPool.dll
 System.Globalization.Calendars.dll                   System.Threading.Timer.dll
 System.Globalization.dll                             System.Transactions.dll
 System.Globalization.Extensions.dll                  System.Transactions.Local.dll
 System.Globalization.Native.so                       System.ValueTuple.dll
 System.IO.Compression.Brotli.dll                     System.Web.dll
 System.IO.Compression.dll                            System.Web.HttpUtility.dll
 System.IO.Compression.FileSystem.dll                 System.Windows.dll
 System.IO.Compression.Native.a                       System.Xml.dll
 System.IO.Compression.Native.so                      System.Xml.Linq.dll
 System.IO.Compression.ZipFile.dll                    System.Xml.ReaderWriter.dll
 System.IO.dll                                        System.Xml.Serialization.dll
 System.IO.FileSystem.AccessControl.dll               System.Xml.XDocument.dll
 System.IO.FileSystem.dll                             System.Xml.XmlDocument.dll
 System.IO.FileSystem.DriveInfo.dll                   System.Xml.XmlSerializer.dll
 System.IO.FileSystem.Primitives.dll                  System.Xml.XPath.dll
 System.IO.FileSystem.Watcher.dll                     System.Xml.XPath.XDocument.dll
 System.IO.IsolatedStorage.dll                        tr
 System.IO.MemoryMappedFiles.dll                      Typeshed
 System.IO.Pipelines.dll                              WindowsBase.dll
 System.IO.Pipes.AccessControl.dll                    zh-Hans
 System.IO.Pipes.dll                                  zh-Hant

@eadwu eadwu force-pushed the vscode-extensions.ms-python.python/2019.8.29288 branch from 83d39f2 to d398d4a Compare August 17, 2019 01:23
@eadwu eadwu changed the title vscode-extensions.ms-python.python: 2019.6.24221 -> 2019.8.29288 [WIP] vscode-extensions.ms-python.python: 2019.6.24221 -> 2019.8.29288 Aug 18, 2019
@danbst
Copy link
Contributor

danbst commented Aug 18, 2019

@eadwu were you able to install/use the extension from this PR?

@eadwu
Copy link
Member Author

eadwu commented Aug 18, 2019

Installing works fine. I don't really think using the language server from Microsoft makes a difference since I just recalled that it's been broken for a while (#55149). Jedi still works fine though.

@eadwu eadwu force-pushed the vscode-extensions.ms-python.python/2019.8.29288 branch from d398d4a to e58e74e Compare September 7, 2019 01:14
@teto
Copy link
Member

teto commented Sep 20, 2019

I am looking into coc-python and I think I need this pakcage, mind fixing the issue :) ?

@eadwu
Copy link
Member Author

eadwu commented Sep 20, 2019

I'll look into it later today and/or over the weekend.

@eadwu
Copy link
Member Author

eadwu commented Sep 23, 2019

Have no clue how the dotnet build process works, might be better if someone who has some knowledge into it's workings fix the build.

@teto
Copy link
Member

teto commented Sep 30, 2019

Just for future reference, as I was experimenting with it a bit microsoft/python-language-server#770 (comment)

@eadwu eadwu closed this Nov 20, 2019
@eadwu eadwu deleted the vscode-extensions.ms-python.python/2019.8.29288 branch November 17, 2020 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants