热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

SmallLanguageServerfixes(togetVSCodeextensionworking)

ThisPRcontainsasetofminimalchangestotheLanguageServercode


  • This PR contains a set of minimal changes to the Language Server code

  • They are critical for some users who are running into issues when trying to use the VSCode extension (see #1261)

  • I am keeping them as small and self-contained as possible so we can release a patch ASAP

Changes

Suppress most error responses from the Language Server


  • By patching the
    1
    lsp.Connection

    object (the top-most entry point), we're catching all errors that would otherwise result in VSCode showing a warning (or worse, an information message that doesn't go away)


  • This is brute force, but it is still correct (DX-wise). We want the IDE to support all kinds of malformed projects without failing (just suppressing functionality). We're still logging the errors to the Redwood Language Server output channel.

  • Eventually, some of the errors that will get logged should be addressed more granularly at the structure/model level

Improve initialization order of LSP components


  • After looking at some usage logs I found sporadic "unhandled method" exceptions (thrown by the LSP client on the VSCode extension side) that were, in some cases, resulting in an empty outline, or in the extension host shutting down the extension altogether. It is hard to understand the race conditions involved, but initializing them as early as possible is a simple, albeit blunt, solution.

  • This is a really small fix that changes the initialization sequence of parts of the language server

  • It makes sure that several request handlers (commands, outline, etc) are installed as early as possible in the initialization process

Tolerate certain missing files and folders


  • Do not throw if schema.prisma does not exist or cannot be parsed

  • Do not throw "pages" folder does not exist (or processPagesDir fails)

  • More info in this issue comment

该提问来源于开源项目:redwoodjs/redwood

So there's currently not a way to use the upgrade command to specify a version. So I just created this PR which will make that possible:
https://github.com/redwoodjs/redwood/pull/1270



In the meantime, it's messy but you could use this to upgrade all at once (just swap out ${tag} with specific version):

1
2
bash

`yarn upgrade /core@${tag} && yarn workspace api upgrade /api@${tag} && yarn workspace web upgrade /web@${tag} /router@${tag} /forms@${tag}`

How to find canary specific to a PR
It's not a perfect system, but each time a PR is merged into




1
main

a GH Action is triggered than releases a new canary version. So you can look through the Actions here to find the associated PR:
https://github.com/redwoodjs/redwood/actions

The PR title is in bold. And you're looking for the Action type "Publish canaray packages to npm". So in the case of the PR titled "modify generated tailwind config to opt-in to upcoming changes", you can find the specific canary version here:
https://github.com/redwoodjs/redwood/runs/1206475453?check_suite_focus=true

1
2
3
4
5
6
7
8
9
bash

Found 15 packages to publish:

 - /api-server => 0.19.2-canary.37+4bed1aa2

lerna info auto-confirmed

 - /api => 0.19.2-canary.37+4bed1aa2

lerna info publish Publishing packages to npm...

 - /auth => 0.19.2-canary.37+4bed1aa2

 - /cli => 0.19.2-canary.37+4bed1aa2

...

So the canary version in this case is

1
0.19.2-canary.37

¯_(ツ)_/¯


   



推荐阅读
  • Python正则表达式学习记录及常用方法
    本文记录了学习Python正则表达式的过程,介绍了re模块的常用方法re.search,并解释了rawstring的作用。正则表达式是一种方便检查字符串匹配模式的工具,通过本文的学习可以掌握Python中使用正则表达式的基本方法。 ... [详细]
  • 利用Visual Basic开发SAP接口程序初探的方法与原理
    本文介绍了利用Visual Basic开发SAP接口程序的方法与原理,以及SAP R/3系统的特点和二次开发平台ABAP的使用。通过程序接口自动读取SAP R/3的数据表或视图,在外部进行处理和利用水晶报表等工具生成符合中国人习惯的报表样式。具体介绍了RFC调用的原理和模型,并强调本文主要不讨论SAP R/3函数的开发,而是针对使用SAP的公司的非ABAP开发人员提供了初步的接口程序开发指导。 ... [详细]
  • 本文讨论了如何在codeigniter中识别来自angularjs的请求,并提供了两种方法的代码示例。作者尝试了$this->input->is_ajax_request()和自定义函数is_ajax(),但都没有成功。最后,作者展示了一个ajax请求的示例代码。 ... [详细]
  • vue使用
    关键词: ... [详细]
  • 本文介绍了brain的意思、读音、翻译、用法、发音、词组、同反义词等内容,以及脑新东方在线英语词典的相关信息。还包括了brain的词汇搭配、形容词和名词的用法,以及与brain相关的短语和词组。此外,还介绍了与brain相关的医学术语和智囊团等相关内容。 ... [详细]
  • ZSI.generate.Wsdl2PythonError: unsupported local simpleType restriction ... [详细]
  • http:my.oschina.netleejun2005blog136820刚看到群里又有同学在说HTTP协议下的Get请求参数长度是有大小限制的,最大不能超过XX ... [详细]
  • 展开全部下面的代码是创建一个立方体Thisexamplescreatesanddisplaysasimplebox.#Thefirstlineloadstheinit_disp ... [详细]
  • 解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法
    本文介绍了解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法,包括检查location配置是否正确、pass_proxy是否需要加“/”等。同时,还介绍了修改nginx的error.log日志级别为debug,以便查看详细日志信息。 ... [详细]
  • 十大经典排序算法动图演示+Python实现
    本文介绍了十大经典排序算法的原理、演示和Python实现。排序算法分为内部排序和外部排序,常见的内部排序算法有插入排序、希尔排序、选择排序、冒泡排序、归并排序、快速排序、堆排序、基数排序等。文章还解释了时间复杂度和稳定性的概念,并提供了相关的名词解释。 ... [详细]
  • 本文介绍了关系型数据库和NoSQL数据库的概念和特点,列举了主流的关系型数据库和NoSQL数据库,同时描述了它们在新闻、电商抢购信息和微博热点信息等场景中的应用。此外,还提供了MySQL配置文件的相关内容。 ... [详细]
  • SQL Server 2008 到底需要使用哪些端口?
    SQLServer2008到底需要使用哪些端口?-下面就来介绍下SQLServer2008中使用的端口有哪些:  首先,最常用最常见的就是1433端口。这个是数据库引擎的端口,如果 ... [详细]
  • 本文介绍了解决Netty拆包粘包问题的一种方法——使用特殊结束符。在通讯过程中,客户端和服务器协商定义一个特殊的分隔符号,只要没有发送分隔符号,就代表一条数据没有结束。文章还提供了服务端的示例代码。 ... [详细]
  • Html5-Canvas实现简易的抽奖转盘效果
    本文介绍了如何使用Html5和Canvas标签来实现简易的抽奖转盘效果,同时使用了jQueryRotate.js旋转插件。文章中给出了主要的html和css代码,并展示了实现的基本效果。 ... [详细]
  • Sleuth+zipkin链路追踪SpringCloud微服务的解决方案
    在庞大的微服务群中,随着业务扩展,微服务个数增多,系统调用链路复杂化。Sleuth+zipkin是解决SpringCloud微服务定位和追踪的方案。通过TraceId将不同服务调用的日志串联起来,实现请求链路跟踪。通过Feign调用和Request传递TraceId,将整个调用链路的服务日志归组合并,提供定位和追踪的功能。 ... [详细]
author-avatar
mobiledu2502886833
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有