microsoft / microsoft/vscode-cpptools-api

Improve UX if CustomConfigurationProvider is not ready yet

未关闭
#43 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
33
派生
20
PR 合并指标
30 天内没有已合并 PR

描述

Hi,

Glad to discuss how could we improve PlatformIO's developer experience when using VSCode + "cpptools" extension. See scenarios below when is clear what to do for the end developer who faces the first time with VSCode/PlatformIO:

  1. Developer installs PlatformIO IDE for VSCode which depends on the "cpptools"
  2. Developer opens PlatformIO project downloaded from Git/Internet. At this stage, project dependencies (toolchains, frameworks, libraries) are not installed/ready.
  3. PlatformIO resolves all dependencies automatically by pulling packages from the PlatformIO Registry. It can take a few minutes depending on the project complexity.
  4. Developer tries to open any C/C++ files from the project AND!!! receives warnings about unresolved headers, broken syntax, etc. Of course, "cpptools" extension is right here because PlatformIO has not been provided configuration yet. It is still in progress, we download it...
  5. Developer STARTS filling c_cpp_properties.json because the "cpptools" extension forces him to do it. The developer does not understand what to do. No clue about toolchains, etc. Developer contacts PlatformIO forum or team and asks for help. Very often, developers even leave 1-star review as "it does not work".

So, how could we improve this API? The ideal scenario is to inform the "cpptools" that WE ARE ELIGIBLE to provide configuration but it can take us some time. See proposed workflow:

  1. PlatformIO extension starts and initiates api = getCppToolsApi
  2. At this moment, "cpptools" knows that there is someone responsible for the configuration and DOES NOT START its IntelliSense service waiting for the "command" when the provider is ready
  3. PlatformIO extension resolves all project dependencies, toolchains, and api.notifyReady(provider).
  4. Starting from this moment "cpptools" can complain about unresolved includes and syntax errors.

Your ideas?

P.S: As a workaround, I see that we can make a face configuration provider and provider "infinite sleep" to the provideConfigurations and other methods. Nevertheless, it is not useful from a technical perspective.


Related issue:

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先从提议的 getCppToolsApi、notifyReady(provider) 和 provideConfigurations 工作流开始,然后查看链接的 PlatformIO issues 以了解背景。完成的标准是定义一种 API 行为,使 provider 能够在解析依赖项期间发出尚未准备就绪的信号,并且只有在 provider 准备就绪后才开始出现 IntelliSense 报告的问题。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript, vscode
领域
developer-experience, tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。