jetbrains

19 articles

← Back Live Monitor RSS Feed

告别粘贴令牌:JetBrains IDE 插件的 OAuth2 登录

Translated AI Summary eng
[AI 摘要] 本文介绍了如何在 JetBrains IDE 插件中安全实现 OAuth2 登录,避免用户手动粘贴令牌,并展示了完整的 PKCE 流程。
View content
当插件需要账户数据时,一个简单的 API 调用就会变成一个身份验证问题。这种不好的捷径大家都不陌生:要求用户创建个人访问令牌(PAT),让他们将其粘贴到设置中,并祈祷它永远不会泄露。 <p>对于一个 JetBrains IDE 插件,请改用此流程:用户点击 <strong>登录</strong> 按钮,浏览器打开,提供商处理登录,IDE 接收回调,插件存储令牌。</p> <p>在高层面上,插件将:</p> <ol> <li>在浏览器中打开提供商的授权页面。</li> <li>在 IDE 内部接收 OAuth2 回调。</li> <li>验证返回的 <code>state</code>。</li> <li>使用 PKCE 交换授权码。</li> <li>将访问令牌存储在 <code>PasswordSafe</code> 中。</li> </ol> <p>本文使用 GitHub 作为 OAuth2 提供商,但同样的模式也适用于其他地方。作用域、URL、令牌响应和刷新规则会有所不同。</p> <p><strong>示例代码:</strong><a href="https://github.com/JetBrains/intellij-sdk-docs/tree/main/code_samples/oauth2" target="_blank" rel="noreferrer noopener">https://github.com/JetBrains/intellij-sdk-docs/tree/main/code_samples/oauth2</a></p> <figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper"> <iframe title="Stop Pasting Tokens: OAuth2 for JetBrains IDE Plugins" src="https://www.youtube.com/embed/Qt8kLAQQYJE?feature=oembed" fram…
Show original
<p>The moment a plugin needs account data, a simple API call turns into an authentication problem. The bad shortcut is familiar: ask the user to create a personal access token (PAT), make them paste it into settings, and hope it never leaks.</p> <p>For a JetBrains IDE plugin, use this flow instead: the user clicks the <strong>Login</strong> button, the browser opens, the provider handles sign-in, the IDE receives a callback, and the plugin stores the token.</p> <p>At a high level, the plugin will:</p> <ol> <li>Open the provider&#8217;s authorization page in the browser.</li> <li>Receive the OAuth2 callback inside the IDE.</li> <li>Validate the returned <code>state</code>.</li> <li>Exchange the authorization code with PKCE.</li> <li>Store the access token in <code>PasswordSafe</code>.</li> </ol> <p>This post uses GitHub as the OAuth2 provider, but the same shape works elsewhere. Scopes, URLs, token responses, and refresh rules will change.</p> <p><strong>Samp…
Read article Original

Mellum2 开源发布:专为AI工作流设计的快速模型

Translated AI Summary eng
[AI 摘要] JetBrains 开源了专为软件工程任务优化的快速AI模型 Mellum2,旨在高效解决生产环境中的延迟和成本问题。
View content
<p><strong>Mellum2 从头开始训练,专为实际部署而设计,适用于路由、问答、子智能体以及软件工程系统中的私有AI应用。</strong></p> <p>今天,我们开源了 Mellum2,这是一个为了解决生产级AI最棘手问题——延迟、吞吐量和成本——而设计的120亿参数模型。它基于 Apache 2.0 许可证从头构建并发布,<a href="https://www.jetbrains.com/mellum/" target="_blank" rel="noopener">Mellum2</a> 为您的基础设施提供了一种高性能、高性价比的选择。</p> <p>Mellum 起初用于<a href="https://blog.jetbrains.com/ai/2025/04/mellum-goes-open-source-a-purpose-built-llm-for-developers-now-on-hugging-face/">代码补全</a>;现在我们已将其演进到能够同时处理自然语言和代码。它现在是一个多功能的工具,可以驱动现代AI工作流中的路由、摘要和中间推理步骤。</p> <p>无论您是想实验、微调还是大规模部署,Mellum2 都已准备好在您自己的系统中运行。</p> <p align="center"><a class="jb-download-button" href="https://huggingface.co/collections/JetBrains/mellum-2" target="_blank" rel="noopener"><i class="download-icon"></i>试用 Mellum</a></p> <h2 class="wp-block-heading">架构与性能</h2> <p>Mellum2 通过其架构和专注的、效率驱动的设计,致力于解决生产级系统的瓶颈问题。</p> <ul> <li><strong>混合专家(MoE)设计:</strong>该模型总参数量为120亿,但由于采用了混合专家设计,每个令牌仅激活25亿参数。这降低了计算成本,同时支持高吞吐量、低延迟的实时工作负载推理。</li> <li><strong>专一化焦点:</strong>与许多现代模型不同,Mellum2 并非…
Show original
<p><strong>Trained from scratch and designed for practical deployment, Mellum2 is built for routing, Q&amp;A, sub-agents, and private AI use in software engineering systems.</strong></p> <p>Today, we’re open-sourcing Mellum2, a 12B model engineered to solve the hardest parts of production AI: latency, throughput, and cost. Built from scratch and released under the Apache 2.0 license, <a href="https://www.jetbrains.com/mellum/" target="_blank" rel="noopener">Mellum2</a> offers a high-performance, cost-efficient alternative for your infrastructure.</p> <p>Mellum began with <a href="https://blog.jetbrains.com/ai/2025/04/mellum-goes-open-source-a-purpose-built-llm-for-developers-now-on-hugging-face/">code completion</a>; now we’ve evolved it to handle both natural language and code. It is now a versatile tool ready to power routing, summarization, and intermediate reasoning steps across your modern AI workflows.</p> <p>Whether you want to experiment, fine-tune, or deploy at scale…
Read article Original

如何使用 Qodana 修复常见的 TypeScript 问题

Translated AI Summary eng
[AI 摘要] 本文介绍了如何利用 Qodana 检测和修复 ESLint 无法覆盖的五种常见 TypeScript 问题,如隐式 any、未使用导出和重复逻辑。
View content
<figure class="wp-block-image size-full"><img style="width:100% !important; height:auto !important; max-width:100% !important;" decoding="async" loading="lazy" src="https://blog.jetbrains.com/wp-content/uploads/2026/06/ChatGPT-Image-Jun-1-2026-10_27_53-AM.png" alt="How to fix common TypeScript issues with Qodana " class="wp-image-710890"/></figure> <p>大多数 TypeScript 项目已经运行 <a href="https://eslint.org/" target="_blank" rel="noopener">ESLint</a> 并配合 <code><kbd>@typescript-eslint</kbd></code>。这覆盖了很多方面:显式的 <code><kbd>any</kbd></code>、悬空 Promise、非空断言等等。如果你的代码检查设置很稳固,你能在代码审查之前就在编辑器中捕获明显的问题。</p> <p>ESLint 规则无法生成跨文件的结果。每个规则都在单个文件的范围内运行,这意味着 ESLint 无法告诉你某个导出在代码库的其他地方从未被使用,一个文件中的 <kbd>any</kbd> 类型值是否导致了五个文件之外的不安全假设,或者两个组件是否独立实现了相同的逻辑。这正是 Qodana 填补的空白。</p> <p>以下是五个值得解决的 TypeScript 问题,按照 ESLint 能处理的范围和它无能为力的范围来组织。</p> <h2 class="wp-block-heading" id="implicit-any-spreading-through-your-codebase">隐式 <kbd>any</kbd> 在代码库中传播</h2> <p>ESLint 的 <kbd>no-explicit-any</kbd> 会捕获你编写 <kbd>any</k…
Show original
<figure class="wp-block-image size-full"><img style="width:100% !important; height:auto !important; max-width:100% !important;" decoding="async" loading="lazy" src="https://blog.jetbrains.com/wp-content/uploads/2026/06/ChatGPT-Image-Jun-1-2026-10_27_53-AM.png" alt="How to fix common TypeScript issues with Qodana " class="wp-image-710890"/></figure> <p>Most TypeScript projects already run <a href="https://eslint.org/" target="_blank" rel="noopener">ESLint</a> with <code><kbd>@typescript-eslint</kbd></code>. That covers a lot: explicit <code><kbd>any</kbd></code>, floating promises, non-null assertions, and more. If your linting setup is solid, you&#8217;re catching the obvious issues in the editor before code review.</p> <p>ESLint rules can&#8217;t produce cross-file findings. Each rule runs within a single file&#8217;s scope, which means ESLint can&#8217;t tell you that an export is unused everywhere in the codebase, that an <kbd>any</kbd>-typed value from one file is causing un…
Read article Original

Rust IDE 实际需要什么才能真正理解 Rust 代码?

Translated AI Summary eng
[AI 摘要] 本文总结了构建 Rust IDE 所面临的核心技术挑战,如重实现编译器前端、处理循环模块图和过程宏隔离。
View content
<p><em>免责声明:本文由基于人工智能的写作与沟通助手创作完成。借助它们的帮助,这场内容丰富且细致入微的直播核心主题被提炼成了紧凑的博客文章形式。</em></p> <p>Rust IDE 如何理解代码?这是一场最近的 RustRover 直播的核心探讨问题,参与者包括 Zed 的 Rust 工程师、<a href="https://rust-analyzer.github.io/" target="_blank" rel="noopener">rust-analyzer</a> 团队负责人 Lukas Wirth,以及 JetBrains <a href="https://www.jetbrains.com/rust/" target="_blank" rel="noopener">RustRover</a> 的工程师 Vlad Beskrovny。讨论并非比较编辑器或争论偏好,而是专注于当 IDE 分析 Rust 代码时,底层实际发生了什么。</p> <p>如果您错过了直播,可以在 JetBrains TV 观看完整录音。以下是本次会议中关键问题和见解的结构化回顾。</p> <figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper"> <iframe loading="lazy" title="rust-analyzer vs. RustRover: Clash of the Titans" src="https://www.youtube.com/embed/VbdD1c3owKc?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen…
Show original
<p><em>Disclaimer: This article was created using AI-based writing and communication companions. With their help, the core topics of this rich and nuanced livestream were distilled into a compact blog post format.</em></p> <p>How do Rust IDEs understand code? That was the central question explored in a recent RustRover livestream featuring Lukas Wirth, Rust engineer at Zed and team lead for <a href="https://rust-analyzer.github.io/" target="_blank" rel="noopener">rust-analyzer</a>, and Vlad Beskrovny, engineer on <a href="https://www.jetbrains.com/rust/" target="_blank" rel="noopener">RustRover </a>at JetBrains. Rather than comparing editors or debating preferences, the discussion focused on what actually happens under the hood when an IDE analyzes Rust code.</p> <p>If you missed the livestream, you can watch the full recording on JetBrains TV. Below is a structured recap of the key questions and insights from the session.</p> <figure class="wp-block-embed is-type-video is-pr…
Read article Original

Hibernate 7.4 新功能

Translated AI Summary eng
[AI 摘要] Hibernate 7.4 改进了分页查询处理,并内置了历史记录与审计表支持,无需额外库。
View content
<p>Hibernate 7.4 <a href="https://docs.hibernate.org/orm/7.4/whats-new/" target="_blank" rel="noopener">引入了几项改进</a>,简化了加载一页数据及其关联的子集合、访问历史数据和审计日志记录。</p> <p>本文将重点介绍以下功能:</p> <ul> <li><strong>限制与抓取连接</strong>:Hibernate 7.4 如何改进使用抓取关联的分页查询。</li> <li><strong>历史记录与审计表</strong>:新功能如何支持跨时间查询实体状态和处理历史数据。</li> </ul> <p><br><strong>你可以在</strong><a href="https://github.com/sivaprasadreddy/hibernate-7.4-demo" target="_blank" rel="noopener"><strong>GitHub 仓库</strong></a><strong>中查看本文的示例代码。</strong></p> <h2 class="wp-block-heading">限制与抓取连接</h2> <p>数据驱动应用程序中的一个常见需求是加载一页父实体及其关联的子实体集合。例如,假设一个应用程序有一个 <code>Order</code> 实体,包含一个 <code>Set&lt;OrderItem&gt;</code> 集合,我们想加载前几个订单及其订单项。</p> <pre class="EnlighterJSRAW" data-enlighter-language="java" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">List&lt;Order> orders = session .createSelectionQuery( "select o f…
Show original
<p>Hibernate 7.4 introduced <a href="https://docs.hibernate.org/orm/7.4/whats-new/" target="_blank" rel="noopener">several improvements</a> that simplify loading a page of data along with their associated child collection, historical data access, and audit logging.</p> <p>The article will focus on the following features:</p> <ul> <li><strong>Limits and Fetch Joins</strong>: How Hibernate 7.4 improves working with paginated queries that include fetched associations.</li> <li><strong>History and Audit Tables</strong>: How the new capabilities support querying entity state across time and working with historical data.</li> </ul> <p><br><strong>You can check out the sample code for this article in this </strong><a href="https://github.com/sivaprasadreddy/hibernate-7.4-demo" target="_blank" rel="noopener"><strong>GitHub repository</strong></a><strong>.</strong></p> <h2 class="wp-block-heading">Limits and Fetch Joins</h2> <p>One common requirement in data-driven applicatio…
Read article Original

我们如何使用 AlphaEvolve 让复杂的 IDE 算法更快

Translated AI Summary eng
[AI 摘要] 该文章介绍了 JetBrains 如何使用谷歌 DeepMind 的 AlphaEvolve 系统,通过自动化搜索和优化,成功加速了基于 IntelliJ 的 IDE 中复杂的索引算法。
View content
<p><a href="https://deepmind.google/blog/alphaevolve-impact/" rel="noopener" target="_blank">AlphaEvolve</a> 是谷歌 DeepMind 的一个算法发现系统,它使用 Gemini 模型来生成、测试和优化可能的算法改进。它的任务不是回答问题;而是搜索解决复杂算法问题的更快方法。我们在基于 IntelliJ 的 IDE 的一个狭窄但重要的部分上对其进行了尝试:索引,这是项目打开后使导航、搜索、补全、重构、检查和其他代码洞察功能可用的后台工作。</p> <p>这使得索引速度成为一个简单但难以提升的衡量指标。它取决于语言、框架、项目结构、后台 IDE 工作以及底层的存储层。微小的变化可能会淹没在噪声中。有些优化在微基准测试中是有效的,但在完整的 IDE 运行中则不可见。</p> <p>我们已经在此投入了大量的工程时间,这种手动性能优化工作仍在继续。本文所述的实验并非要取代工程判断、性能分析、代码审查或产品验证。它只是一种额外搜索方法的测试:谷歌 DeepMind 的 AlphaEvolve 能否帮助我们在已经研究了多年的代码中找到有用的优化候选方案?</p> <div class="jb-alpha-widget" data-jb-alpha-widget> <section class="jb-alpha-snapshot" aria-label="Result snapshot"> <div class="jb-alpha-copy"> <h2>结果快照</h2> <p>我们首先在合成基准测试上测试了生成的候选方案,然后在完整的 IDE 环境中验证了其中最有前景的几个。</p> <div class="jb-alpha-chart-wrap"> <svg class="jb-alpha-hero-chart" role="img" aria-label="Baseline and solution comparison; lower time is better"></svg> </div> <p class="jb-alpha-note">集成测试,以秒为单位,数值越低越…
Show original
<p><a href="https://deepmind.google/blog/alphaevolve-impact/" rel="noopener" target="_blank">AlphaEvolve</a> is a Google DeepMind algorithm-discovery system that uses Gemini to generate, test, and refine possible algorithm improvements. Its job is not to answer questions; it searches for faster ways to solve complex algorithmic problems. We tried it on a narrow but important part of IntelliJ-based IDEs: indexing, the background work that makes navigation, search, completion, refactorings, inspections, and other code insight available after a project opens.</p> <p>That makes indexing speed a simple metric to say out loud and a hard metric to improve. It depends on the language, the framework, the shape of the project, background IDE work, and the storage layer underneath the indexes. Small changes can disappear in noise. Some wins are real in a microbenchmark and invisible in a full IDE run.</p> <p>We already invest a lot of engineering time here, and that manual performance work…
Read article Original

JetBrains Academy:五月精选资讯

Translated AI Summary eng
[AI 摘要] 该文介绍了JetBrains Academy五月提供的多项学习资源,包括奖学金、新AI课程、IDE集成项目以及一篇关于编程学习的反思文章。
View content
<p>嗨!</p> <p>本月的资讯列表虽短,但每一项都值得你花时间了解。</p> <p>请在6月9日之前申请最多40个JetBrains基金会提供的CSAI学士学位课程奖学金,尝试一门面向开发者的全新AI工具课程,了解一个将动手编程实践引入JetBrains IDE的项目,并阅读一篇关于在学习编程中“有价值的挣扎”的文章。</p> <div class="newsletter"> <h2>学习亮点</h2> <article class="newsletter__post"> <img style="width:100% !important; height:auto !important; max-width:100% !important;" decoding="async" class="newsletter__post-img" src="https://blog.jetbrains.com/wp-content/uploads/2026/05/1779443084114.jpeg" alt=""> <div class="newsletter__post-text"> <h3>JetBrains基金会奖学金</h3> <p>JetBrains基金会为帕福斯内亚波利斯大学为期四年的CSAI学士学位课程提供多达40个全额奖学金,涵盖学费、住宿和其他费用,外加每月300欧元的津贴。第二轮申请即将截止。</p> …
Show original
<p>Hey!&nbsp;</p> <p>This month’s list is short, but every item is worth your time.&nbsp;</p> <p>Apply for one of up to 40 JetBrains Foundation scholarships for the CSAI BSc program by June 9, try a new AI tools course for developers, discover a program that brings hands-on coding practice into JetBrains IDEs, and read about the value of productive struggle in learning to code.</p> <div class="newsletter"> <h2>Learning highlights</h2> <article class="newsletter__post"> <img style="width:100% !important; height:auto !important; max-width:100% !important;" decoding="async" class="newsletter__post-img" src="https://blog.jetbrains.com/wp-content/uploads/2026/05/1779443084114.jpeg" alt=""> <div class="newsletter__post-text"> …
Read article Original

TeamCity 2026.1.1 现已发布

Translated AI Summary eng
[AI 摘要] TeamCity 2026.1.1 是一个错误修复更新,解决了超过 20 个问题和性能问题。
View content
<p>今天我们推出了 TeamCity 本地部署版 2026.1 服务器的首个错误修复。此次更新解决了超过 20 个问题和性能问题,包括:</p> <ul> <li>TeamCity 忽略构建代理的备用 IP 地址;</li> <li>Rake 插件损坏;</li> <li>上传到 S3 存储桶失败;</li> <li>带有 "Exists" 代理要求的 .NET 构建无法找到兼容的构建代理来运行。</li> </ul> <p>完整的已解决问题列表请参阅 <a href="https://www.jetbrains.com/help/teamcity/teamcity-2026-1-1-release-notes.html" target="_blank" rel="noopener">TeamCity 2026.1.1 发行说明</a>。</p> <h3 class="wp-block-heading"><strong>为何要更新?</strong></h3> <p>跟进次要版本更新可确保您的 TeamCity 实例获得以下好处:</p> <ul> <li>性能改进。</li> <li>与集成工具的兼容性更好。</li> <li>构建更快、更稳定。</li> <li>工作流的安全性得到增强。</li> </ul> <h3 class="wp-block-heading"><strong>兼容性</strong></h3> <p>TeamCity 2026.1.1 与所有 2026.1.x 版本共享相同的数据格式。您可以在该系列版本内升级或降级,无需备份和恢复。</p> <h3 class="wp-block-heading"><strong>如何升级</strong></h3> <ol> <li>使用您当前 TeamCity 版本中的<strong>自动更新</strong>功能。</li> <li>直接从 <a href="https://www.jetbrains.com/teamcity/download/" target="_blank" rel="noopener">JetBrains 网站</a>下载最新版本。</li> <li>拉取更新的 TeamCity Docker 镜像。</li> </ol> <h3 class="wp-b…
Show original
<p>Today we&#8217;re rolling out the first bug-fix for TeamCity On-Premises 2026.1 servers. This update addresses over 20 issues and performance issues, including:</p> <ul> <li>Build agent alternate IP addresses ignored by TeamCity;</li> <li>Damaged Rake plugin;</li> <li>Failing uploads to S3 buckets;</li> <li>.NET builds with &#8220;Exists&#8221; agent requirements cannot find a compatible build agent to run.</li> </ul> <p>See <a href="https://www.jetbrains.com/help/teamcity/teamcity-2026-1-1-release-notes.html" target="_blank" rel="noopener">TeamCity 2026.1.1 Release Notes</a> for the complete list of resolved issues.</p> <h3 class="wp-block-heading"><strong>Why update?</strong></h3> <p>Staying up to date with minor releases ensures your TeamCity instance benefits from the following:</p> <ul> <li>Performance improvements.</li> <li>Better compatibility with integrations.</li> <li>Faster, more stable builds.</li> <li>Enhanced security for your workflow…
Read article Original

DataSpell的落幕将至

Translated AI Summary eng
[AI 摘要] JetBrains将停止销售DataSpell作为独立产品,并将其功能整合到PyCharm中,同时为现有用户提供迁移路径。
View content
<p>经过慎重考虑,我们做出了一个艰难的决定:将DataSpell作为独立产品停止运营。</p> <p>DataSpell的诞生旨在JetBrains生态系统中,专注于满足数据科学与分析专业人士的需求。它使我们能够构建并优化用于Jupyter笔记本、数据探索和分析工作流的专属体验。这些改进已成功集成到PyCharm中,从而能够惠及更广泛的用户群体。</p> <p>如今,我们已认识到,维护一个独立产品已不再是前进的最佳路径。这一选择是JetBrains更广泛战略的一部分,旨在围绕用户最依赖的工作流构建一个更加统一的生态系统。通过将这些功能整合到PyCharm中,我们可以发展得更快、简化整体体验,并在一个地方提供更大价值。</p> <h2 class="wp-block-heading">DataSpell用户的下一步?</h2> <p>自2026年9月1日起,我们将协助现有的DataSpell用户过渡到PyCharm,在那里,数据科学与分析工作流将继续被积极开发和改进。</p> <p>为使过渡尽可能顺利,符合条件的DataSpell客户将能够以零额外费用迁移到PyCharm。当前的DataSpell用户还将通过备用许可证保持访问权限。</p> <p>过渡将分阶段进行:</p> <ul> <li><strong>2026年5月28日:</strong> DataSpell将被弃用为独立产品,这意味着将无法再购买新的DataSpell订阅。现有许可证将继续有效。</li> <li><strong>2026年9月1日:</strong> 符合条件的DataSpell订阅将转换为PyCharm Pro订阅。符合条件的客户将获得与其剩余DataSpell订阅期价值相匹配的JetBrains AI积分。 <ul> <li>如果个人客户在9月1日转换时已同时拥有PyCharm Pro和DataSpell许可证,则不会发生任何变化。其DataSpell许可证将保持有效,直至原始到期日。</li> </ul> </li> </ul> <p></p> <p>如需为9月1日的过渡做准备并寻求帮助,请联系我们。</p> <h3 class="wp-block-heading">针对组织商业客户</h3> <p>我们计划在<strong>2026年9月1日</stron…
Show original
<p>After careful consideration, we have made the difficult decision to sunset DataSpell as a standalone product.</p> <p>DataSpell was created to focus on the needs of data science and analytics professionals within the JetBrains ecosystem. It allowed us to build and refine a dedicated experience for working with Jupyter notebooks, data exploration, and analytical workflows. These improvements have been successfully integrated into PyCharm, where they can benefit a much broader audience.&nbsp;</p> <p>Today, we’ve reached a point where maintaining a separate product is no longer the most effective path forward. This choice is part of JetBrains’ broader strategy to build a more cohesive ecosystem around the workflows users rely on most. By consolidating these capabilities in PyCharm, we can move faster, simplify the overall experience, and deliver more value in one place.</p> <h2 class="wp-block-heading">What’s next for DataSpell users?</h2> <p>Starting from September 1, 2026…
Read article Original

弃用 dotMemory Unit

Translated AI Summary eng
[AI 摘要] 由于缺乏维护、兼容性及安全问题,JetBrains 宣布将弃用 dotMemory Unit 内存分析测试工具。
View content
<p>dotMemory Unit 长期以来一直作为检测 .NET 代码内存问题的单元测试框架。我们感谢所有在其开发和测试工作流中使用过它的用户。</p> <p>经过仔细考虑,我们决定停止使用 dotMemory Unit。该项目将不再进行积极维护、兼容性更新或安全修复,我们建议用户计划停止使用它。</p> <h2 class="wp-block-heading">我们做出此变更的原因</h2> <p>此决定基于若干技术、安全和产品方面的考量。</p> <p>dotMemory Unit 已有一段时间未进行积极开发,且不支持最新的 .NET 版本。要使其达到现代兼容性、可靠性和安全标准,需要进行重大的架构重新设计。</p> <p>此外,dotMemory Unit 生成的工作空间采用旧版格式,与近期版本的 dotMemory 不兼容。这给用户带来了不便,并阻碍了与最新 JetBrains 性能分析工具的无缝集成。</p> <p>最后,该项目的部分依赖项已过时,且包含已知的安全漏洞。由于 dotMemory Unit 不再积极维护,我们无法在不引发兼容性问题或进行完全重建的情况下可靠地更新这些依赖项。继续分发或支持存在未修补漏洞的工具将无法满足我们的安全标准。</p> <h2 class="wp-block-heading">这对您意味着什么</h2> <p>如果您当前正在使用 dotMemory Unit,我们强烈建议您停止使用,尤其是在安全敏感的环境中。</p> <p>我们理解 dotMemory Unit 对于测试内内存分析很有价值,也认识到其弃用可能会在某些工作流中造成缺口。目前,我们没有直接的替代方案。</p> <h2 class="wp-block-heading">时间表</h2> <p>[2026年5月20日]:dotMemory Unit 在 <a href="https://www.nuget.org/packages/JetBrains.DotMemoryUnit/" target="_blank" rel="noopener">NuGet.org</a> 上被标记为已弃用。将不再发布任何更新、补丁或安全修复。</p> <p>[2026年5月28日]:在不同渠道发布正式弃用通知。<a href="https://www.j…
Show original
<p>dotMemory Unit has long served as a unit testing framework for detecting memory issues in .NET code. We are grateful to everyone who has used it as part of their development and testing workflows.</p> <p>After careful consideration, we have decided to retire dotMemory Unit. The project will no longer receive active maintenance, compatibility updates, or security fixes, and we recommend that users plan to discontinue its use.</p> <h2 class="wp-block-heading">Why we’re making this change</h2> <p>This decision is based on several technical, security, and product considerations.</p> <p>dotMemory Unit has not been actively developed for some time and does not support the latest .NET versions. Bringing it up to modern compatibility, reliability, and security standards would require a substantial architectural redesign.</p> <p>In addition, dotMemory Unit generates workspaces in a legacy format that is incompatible with recent versions of dotMemory. This creates friction for…
Read article Original

Cloud9 JetStream 主题现已登陆 JetBrains IDE

Translated AI Summary eng
[AI 摘要] 本文介绍了 Cloud9 与 JetBrains 合作推出的专为 JetBrains IDE 打造的 Cloud9 JetStream 深色主题。
View content
<p>Cloud9 与 JetBrains 一直在合作开展连接软件开发与电子竞技的项目,从 <a href="https://blog.jetbrains.com/blog/2026/04/16/sky-s-the-limit-hackathon-180-projects-connecting-developers-and-esports/" target="_blank" data-type="link" data-id="https://blog.jetbrains.com/blog/2026/04/16/sky-s-the-limit-hackathon-180-projects-connecting-developers-and-esports/" rel="noreferrer noopener">Sky’s The Limit 黑客松</a>,到为现场活动、播客和战队内容构建的定制工具。</p> <p>这一合作的最新成果之一便是 Cloud9 JetStream,一款专为 <a href="https://plugins.jetbrains.com/plugin/31876-cloud9-jetstream" data-type="link" data-id="https://plugins.jetbrains.com/plugin/31876-cloud9-jetstream" target="_blank" rel="noopener">JetBrains IDE 定制的主题</a>。</p> <figure class="wp-block-image size-full"><img style="width:100% !important; height:auto !important; max-width:100% !important;" decoding="async" loading="lazy" src="https://blog.jetbrains.com/wp-content/uploads/2026/05/default-vs-jetstream.gif" alt="" class="wp-image-709753"/></figure> <p>该主题将 Cloud9 的视觉标识融入开发环境,采用深色界面、Cloud9 蓝色调…
Show original
<p>Cloud9 and JetBrains have been working together on projects that connect software development and esports, from the <a href="https://blog.jetbrains.com/blog/2026/04/16/sky-s-the-limit-hackathon-180-projects-connecting-developers-and-esports/" target="_blank" data-type="link" data-id="https://blog.jetbrains.com/blog/2026/04/16/sky-s-the-limit-hackathon-180-projects-connecting-developers-and-esports/" rel="noreferrer noopener">Sky’s The Limit hackathon</a> to custom tools built for live events, podcasts, and team content.</p> <p>One of the latest results of this collaboration is Cloud9 JetStream, a <a href="https://plugins.jetbrains.com/plugin/31876-cloud9-jetstream" data-type="link" data-id="https://plugins.jetbrains.com/plugin/31876-cloud9-jetstream" target="_blank" rel="noopener">custom theme</a> for JetBrains IDEs.</p> <figure class="wp-block-image size-full"><img style="width:100% !important; height:auto !important; max-width:100% !important;" decoding="async" loading="laz…
Read article Original

使用TensorFlow和PyCharm为Reachy Mini构建实时物体检测应用

Translated AI Summary eng
[AI 摘要] 本文教程讲解如何使用 TensorFlow、PyCharm 和 OpenCV 构建实时物体检测应用,并将其部署到 Reachy Mini 开源机器人上,实现物体跟踪与交互。
View content
<p><em>这是来自 <a href="https://blog.jetbrains.com/pycharm/2026/05/build-a-live-object-detection-app-for-reachy-mini-with-tensorflow-and-pycharm/#author" data-type="link" data-id="https://blog.jetbrains.com/pycharm/2026/05/build-a-live-object-detection-app-for-reachy-mini-with-tensorflow-and-pycharm/#author">Iulia Feroli</a> 的客座文章,她是 Back To Engineering YouTube 社区的创始人。</em></p> <figure class="wp-block-image size-full"><img style="width:100% !important; height:auto !important; max-width:100% !important;" decoding="async" loading="lazy" src="https://blog.jetbrains.com/wp-content/uploads/2026/05/PC-social-BlogFeatured-1280x720-1-5.png" alt="构建实时物体检测应用" class="wp-image-709808"/></figure> <p>在本教程中,我们将使用 TensorFlow 和 <a href="https://www.jetbrains.com/pycharm/" target="_blank" rel="noopener">PyCharm</a> 构建一个实时物体检测应用,然后将其部署到 Reachy Mini 开源机器人上,以实现实时物体跟踪。</p> <p><a href="https://github.com/pollen-robotics/reachy_mini" target="_blank" rel="noopener">Reachy Mini</a> 是一款紧凑型开源机器人,由 Pollen Ro…
Show original
<p><em>This is a guest post from <a href="https://blog.jetbrains.com/pycharm/2026/05/build-a-live-object-detection-app-for-reachy-mini-with-tensorflow-and-pycharm/#author" data-type="link" data-id="https://blog.jetbrains.com/pycharm/2026/05/build-a-live-object-detection-app-for-reachy-mini-with-tensorflow-and-pycharm/#author">Iulia Feroli</a>, founder of the Back To Engineering YouTube community.</em></p> <figure class="wp-block-image size-full"><img style="width:100% !important; height:auto !important; max-width:100% !important;" decoding="async" loading="lazy" src="https://blog.jetbrains.com/wp-content/uploads/2026/05/PC-social-BlogFeatured-1280x720-1-5.png" alt="Build a Live Object Detection App" class="wp-image-709808"/></figure> <p>In this tutorial, we build a live object detection app using TensorFlow and <a href="https://www.jetbrains.com/pycharm/" target="_blank" rel="noopener">PyCharm</a>, then deploy it onto the Reachy Mini open-source robot for real-time object tracki…
Read article Original

2026年构建应用程序的顶级智能体框架

Translated AI Summary eng
[AI 摘要] 该文章评估了2026年用于构建人工智能应用程序的主要智能体框架,并根据其编排模型和适用场景进行了比较。
View content
<p>2026年,人工智能世界正以前所未有的速度变化。人工智能系统仅处理单一提示交互的时代即将结束。相反,这些模型正在演变为<a href="https://www.jetbrains.com/pycharm/data-science/" target="_blank" rel="noopener">智能体系统</a>——由智能体框架驱动的、长期运行、目标导向的软件,它正在成为现代应用架构的关键一层。</p> <p>这一快速转变意味着,构建自主系统的Python开发者越来越多地依赖智能体框架来管理推理、记忆、工具和多个智能体之间的协作。</p> <p>你可能已经听说过一些最流行的框架。LangChain和AutoGen已经声名鹊起,但还有数十种框架,其中许多是开源的,只有一到两年的历史。面对如此多承诺不同智能体能力的框架,真正的挑战在于知道哪些最适合你要构建的应用类型。</p> <p>让我们更深入地了解2026年市场上一些最重要的智能体框架,比较它们各自的优势,并根据我们的关键比较标准进行评分,以帮助你发现哪个最适合你的项目。</p> <h2 class="wp-block-heading">什么是人工智能智能体?</h2> <p><a href="https://www.jetbrains.com/pycharm/features/ai/" target="_blank" rel="noopener">人工智能智能体</a>是一种能够自主推理、设定目标并代表用户或另一个系统执行任务的软件。顾名思义,人工智能智能体具有一定程度的自主性,能够学习、适应并独立做出决策。这意味着它们可以改进自身的行为,并随着时间的推移,自主选择行动以实现特定目标或成果。</p> <p>人工智能智能体遵循感知、推理、行动、反思(PRAR)循环,使他们能够:</p> <ul> <li><strong>感知:</strong> 观察环境,包括用户输入、系统状态、工具和记忆,以理解任务的当前上下文和约束。</li> <li><strong>推理:</strong> 使用大型语言模型或混合逻辑进行规划、决策和选择行动。</li> <li><strong>行动:</strong> 执行调用工具、更新记忆或触发工作流等行动。</li> <li><strong>反思:</strong…
Show original
<p>In 2026, the world of AI is changing at a serious pace. The days of AI systems dealing solely in single-prompt interactions are coming to an end. Instead, these models are evolving into <a href="https://www.jetbrains.com/pycharm/data-science/" target="_blank" rel="noopener">agentic systems</a> – long-running, goal-driven software enabled by agentic frameworks that are becoming a critical layer in modern application architecture.</p> <p>This rapid shift means that Python developers building autonomous systems are increasingly relying on agentic frameworks to manage reasoning, memory, tools, and collaboration among multiple agents.</p> <p>You’ve probably already heard of some of the most popular frameworks. LangChain and AutoGen have risen to prominence, but there are dozens more, many of them open-source and only one to two years old. With so many frameworks promising different agentic capabilities, the real challenge is knowing which ones are best suited for the kind of appli…
Read article Original

Toolbox App 3.5:更优的远程开发可观测性、更可靠的企业配置与更顺畅的日常交互

Translated AI Summary eng
[AI 摘要] Toolbox App 3.5 增强了远程开发可观测性,提升了企业配置可靠性,并优化了日常交互体验与错误修复。
View content
<p>Toolbox App 3.5 致力于让日常工作更顺畅,并使托管开发环境更易于监控。该应用现在支持使用熟悉的快捷键进行界面缩放,为企业远程开发连接提供 OpenTelemetry 指标,并更妥善地处理了一些长期存在的可靠性问题。</p> <h2 class="wp-block-heading">远程开发可观测性</h2> <p>Toolbox App 现在会为远程开发连接的延迟和可靠性发出 OpenTelemetry 指标。您可以将它们发送到 Grafana、Datadadog、Prometheus 或其他兼容 OTEL 的技术栈,以监控整个开发者舰队的连接健康状况。</p> <h2 class="wp-block-heading">缩放控制</h2> <p>您现在可以使用熟悉的键盘快捷键缩放 Toolbox App 界面:Cmd/Ctrl + 放大,Cmd/Ctrl – 缩小,Cmd/Ctrl 0 重置。该设置会跨重启保持,因此您偏好的缩放级别将被保留。</p> <h2 class="wp-block-heading">更清晰的更新进度</h2> <p>检查更新不再隐藏在通用旋转图标后面。您现在会看到应用正在检查什么、正在解压什么以及进度如何——提供更清晰的进度感。</p> <h2 class="wp-block-heading">企业配置</h2> <p>对于使用 JetBrains IDE Services 的企业客户,Toolbox App 现在在与后端服务通信时会同时发送静态和动态头信息。头信息更新也会自动推送到正在运行的 IDE——无需重启 IDE 即可获取新的头信息。</p> <h2 class="wp-block-heading">错误修复</h2> <ul> <li>基于 IntelliJ 的 IDE 不再从 Toolbox App 主视图中随机消失。</li> <li>Android Studio 和其他别名 IDE 在更新后会保留其显示名称。</li> <li>KDE Plasma 6.6 上的任务栏图标以及 Pop!__OS 上的托盘和应用程序图标现在能可靠地显示。</li> </ul> <h2 class="wp-block-heading">远程开发修复</h2> <ul> <li>SSH 规范化失败不再中断…
Show original
<p>Toolbox App 3.5 focuses on making daily work smoother and managed development environments easier to monitor. The app now supports interface zooming with familiar shortcuts, provides OpenTelemetry metrics for enterprise remote development connections, and handles several long-standing reliability issues more gracefully.</p> <h2 class="wp-block-heading">Remote development observability</h2> <p>The Toolbox App now emits OpenTelemetry metrics for remote development connection latency and reliability. You can send them to Grafana, Datadog, Prometheus, or another OTEL-compatible stack to monitor connection health across your developer fleet.</p> <h2 class="wp-block-heading">Zoom controls</h2> <p>You can now zoom the Toolbox App interface using familiar keyboard shortcuts: Cmd/Ctrl + to zoom in, Cmd/Ctrl &#8211; to zoom out, and Cmd/Ctrl 0 to reset. The setting persists across restarts, so your preferred zoom level is preserved.</p> <h2 class="wp-block-heading">Cleaner upd…
Read article Original

WPF热重载现已上线:在Rider中编辑XAML即可实时查看更新

Translated AI Summary eng
[AI 摘要] Rider 2026.2 EAP 2新增WPF热重载功能,允许在调试时实时编辑XAML并立即预览更改。
View content
<p>自2026.2 EAP 2版本起,Rider现已支持WPF热重载功能。您可以在调试器运行应用程序时编辑XAML,并立即看到更改生效,无需重新构建、无需重启、也不会丢失应用程序中的当前位置。结合Rider中已有的C#热重载支持,这完善了WPF的“编辑并继续”工作流。</p> <p>这个功能酝酿已久,我们对此直言不讳。<a href="https://youtrack.jetbrains.com/issue/NETPM-371/Support-Hot-Reload-for-WPF-projects-in-Rider" target="_blank" rel="noopener">在Rider中支持WPF热重载的请求</a>是Rider历史上获得最多投票的问题之一。我们仔细阅读了您的每一条评论,我们今天发布的功能正是基于这些反馈直接塑造而成。</p> <p>在继续之前,先做一个简短而诚实的说明:这是一个<strong>测试版</strong>。WPF的涵盖面很广,某些场景尚未完全覆盖。我们将在下文清晰地列出这些场景,以便您确切了解可以期待什么。</p> <div class="buttons"> <div class="buttons__row"> <a href="https://www.jetbrains.com/rider/nextversion/" class="btn" target="_blank" rel="noopener">下载 Rider 2026.2 EAP</a> </div> </div> <h2 class="wp-block-heading">WPF热重载能做什么</h2> <p>当您在Rider调试器下运行WPF应用程序时,现在可以修改XAML并将保存的更改反映到实时运行的应用程序中。调整边距、重新设计按钮样式、微调<code>DataTemplate</code>、更改颜色、重新设计布局——然后保存,用户界面就会即时更新。应用程序保持当前状态。您无需再通过五个屏幕导航回到您正在处理的视图。您无需…
Show original
<p>WPF Hot Reload is now available in Rider, starting with the 2026.2 EAP 2 build. You can edit your XAML while your app is running under the debugger and see the changes immediately, with no rebuild, no restart, and no losing your place in the application. Together with the C# Hot Reload support that&#8217;s already in Rider, this completes the Edit and Continue workflow for WPF.</p> <p>This one has been a long time coming, and we want to be straight about that. The <a href="https://youtrack.jetbrains.com/issue/NETPM-371/Support-Hot-Reload-for-WPF-projects-in-Rider" target="_blank" rel="noopener">request for WPF Hot Reload</a> is one of the most upvoted issues in Rider&#8217;s entire history. We read every word of your comments, and the feature we’re shipping today is shaped directly by that feedback.&nbsp;</p> <p>A quick, honest note before we go further: this is a <strong>beta</strong>. The surface area of WPF is large, and some scenarios are not covered yet. We&#8217;ll lay …
Read article Original

RustWeek 2026:我们的收获、遇到的伙伴以及Rust的未来展望

Translated AI Summary eng
[AI 摘要] 本文总结了RustWeek 2026大会的关键收获、社区对话及未来趋势,重点关注嵌入式Rust增长和Rust在专业开发中的普及。
View content
<p>2026年RustWeek大会在荷兰乌得勒支吸引了超过900名Rust开发者、教育者和维护者,通过为期数天的演讲、走廊交流、社区聚会、黑客马拉松和研讨会,全方位探讨Rust相关话题。</p> <p>作为连续第三年的金牌赞助商,RustRover团队参会旨在支持Rust生态系统,与开发者面对面交流,并深入了解人们当下如何运用Rust进行开发。</p> <p>会议期间,我们与多位Rust社区成员进行了系列快速采访,探讨Rust的未来。本文将分享这些对话、观察到的趋势以及让我们印象深刻的社区瞬间。</p> <h2 class="wp-block-heading">RustRover参与RustWeek 2026的初衷</h2> <p>开发者大会是少数能完全脱离工单、问题追踪器和发布说明进行交流的场合之一。对我们的团队而言,RustWeek 2026是一个机会,让我们暂时离开屏幕,与每天使用Rust构建真实项目的开发者共度时光。</p> <figure class="wp-block-image size-full"><img style="width:100% !important; height:auto !important; max-width:100% !important;" decoding="async" fetchpriority="high" src="https://blog.jetbrains.com/wp-content/uploads/2026/05/IMG_2837.jpg" alt="RustRover团队在RustWeek 2026" class="wp-image-710509"/><figcaption class="wp-element-caption"> RustRover团队在RustWeek现场 </figcaption></figure> <p>我们带来了产品演示、贴纸、问答环节、一些新奇的奖品创意,以及RustRover的最新功能更新,包括ACP、Cargo nextest支持和调用层级功能。</p> …
Show original
<p>RustWeek 2026 brought more than 900 Rust developers, educators, and maintainers to Utrecht, Netherlands, for a few days of talks, hallway conversations, community meetups, hackathons, and workshops about all things Rust.</p> <p>As a Gold sponsor for the third year in a row, the RustRover team joined the event to support the Rust ecosystem, connect with developers in person, and learn more about how people are building with Rust today.</p> <p>Along the way, we sat down with members of the Rust community for a series of quick interviews about the future of Rust. In this post, we’re sharing the conversations, trends, and community moments that stood out most to us.</p> <h2 class="wp-block-heading">What brought RustRover to RustWeek 2026</h2> <p>Developer conferences are one of the few places where conversations happen completely outside of tickets, issue trackers, and release notes. For our team, RustWeek 2026 was an opportunity to step away from our screens and spend time…
Read article Original

Kotlin 2.4.0 版本发布

Translated AI Summary eng
[AI 摘要] Kotlin 2.4.0 版本发布,包含语言特性更新、标准库稳定化及多平台编译器改进。
View content
<p>Kotlin 2.4.0 版本已发布!以下是主要亮点:</p> <ul> <li><strong>语言</strong>:稳定的上下文参数、显式支持字段以及用于注解使用点目标的多种新功能。</li> <li><strong>标准库</strong>:UUID API 的支持已稳定,并新增了检查排序顺序的支持。</li> <li><strong>Kotlin/JVM</strong>:支持 Java 26,并且默认启用元数据中的注解支持。</li> <li><strong>Kotlin/Native</strong>:支持将 Swift 包作为依赖项、Swift 导出的更新,并且默认启用 CMS 垃圾回收。</li> <li><strong>Kotlin/Wasm</strong>:默认启用增量编译,并支持 WebAssembly 组件模型。</li> <li><strong>Kotlin/JS</strong>:支持值类导出以及在 JS 代码内联中使用 ES2015 特性。</li> <li><strong>Gradle</strong>:与 Gradle 9.5.0 兼容。</li> <li><strong>Maven</strong>:Java 和 JVM 目标版本之间自动对齐。</li> <li><strong>Kotlin 编译器</strong>:在 <code>.klib</code> 编译期间,内联函数的行为更加一致。</li> </ul> <p>要查看完整的变更列表,请参阅 <a href="https://kotlinlang.org/docs/whatsnew24.html" data-type="link" data-id="https://kotlinlang.org/docs/whatsnew24.html" target="_blank" rel="noopener">Kotlin 2.4.0 新功能介绍</a> 或 <a href="https://github.com/JetBrains/kotlin/releases/tag/v2.4.0" target="_blank" rel="noopener">GitHub 上的发布说明</a>。</p> <h2 class="wp-block-heading">如何安装 Kot…
Show original
<p>The Kotlin 2.4.0 release is out! Here are the main highlights:</p> <ul> <li><strong>Language</strong>: Stable context parameters, explicit backing fields, and multiple features for annotation use-site targets.</li> <li><strong>Standard library</strong>: Stabilized support for the UUID API and support for checking sorted order.</li> <li><strong>Kotlin/JVM</strong>: Support for Java 26 and annotations in metadata enabled by default.</li> <li><strong>Kotlin/Native</strong>: Support for Swift packages as dependencies, updates on Swift export, and the CMS GC enabled by default.</li> <li><strong>Kotlin/Wasm</strong>: Incremental compilation enabled by default and support for WebAssembly Component Model.</li> <li><strong>Kotlin/JS</strong>: Support for value class export and ES2015 features in JS code inlining.</li> <li><strong>Gradle</strong>: Compatibility with Gradle 9.5.0.</li> <li><strong>Maven</strong>: Automatic alignment between Java and JVM target versions…
Read article Original

IntelliJ IDEA 2025.3.6 发布!

Translated AI Summary eng
[AI 摘要] IntelliJ IDEA 2025.3.6 发布,包含 Java 21 关键安全更新和错误修复。
View content
<p>IntelliJ IDEA 2025.3.6 现已发布,包含适用于 Java 21 的最新 Oracle 关键补丁更新。此次更新包含相应的 JetBrains Runtime 变更,并修复了问题 [<a href="https://youtrack.jetbrains.com/issue/IDEA-389015/jbr25.0.3-resourcemanager.sketchImporter.ResourceFileGeneratorTest-throws-ComparisonFailure" target="_blank" rel="noopener">IDEA-389015</a>],提供了改进的可靠性和安全性。</p> <p>您可以在 IDE 内部通过 <a href="https://www.jetbrains.com/toolbox-app/" target="_blank" rel="noopener">Toolbox App</a> 更新到此版本,Ubuntu 用户可以使用 snaps 进行更新。您也可以从我们的<a href="https://www.jetbrains.com/idea/download/" target="_blank" rel="noopener">网站</a>下载。</p> <p>有关修复的详细概述,请参阅<a href="https://youtrack.jetbrains.com/articles/IDEA-A-2100662688" data-type="link" data-id="https://youtrack.jetbrains.com/articles/IDEA-A-2100662688" target="_blank" rel="noopener">发行说明</a>。如果您发现任何问题,请通过<a href="https://youtrack.jetbrains.com/issues/IDEA" target="_blank" rel="noopener">问题跟踪器</a>告知我们。</p> <p>祝开发愉快!</p>
Show original
<p>IntelliJ IDEA 2025.3.6 is now available with the latest Oracle critical patch update for Java 21. The update includes the corresponding JetBrains Runtime changes and fixes the issue [<a href="https://youtrack.jetbrains.com/issue/IDEA-389015/jbr25.0.3-resourcemanager.sketchImporter.ResourceFileGeneratorTest-throws-ComparisonFailure" target="_blank" rel="noopener">IDEA-389015</a>], providing improved reliability and security.</p> <p>You can update to this version from inside the IDE, using the <a href="https://www.jetbrains.com/toolbox-app/" target="_blank" rel="noopener">Toolbox App</a>, or using snaps if you are a Ubuntu user. You can also download it from our <a href="https://www.jetbrains.com/idea/download/" target="_blank" rel="noopener">website</a>.</p> <p>For a comprehensive overview of the fixes, see the <a href="https://youtrack.jetbrains.com/articles/IDEA-A-2100662688" data-type="link" data-id="https://youtrack.jetbrains.com/articles/IDEA-A-2100662688" target="_blank"…
Read article Original

异步VFS内容写入——插件作者须知

Translated AI Summary eng
[AI 摘要] 本文介绍了IntelliJ平台异步VFS写入的变化,要求插件作者在通过外部进程或NIO直接读取磁盘文件前必须刷新待写入内容。
View content
<p>某些插件代码遵循以下模式:</p> <ol> <li>保存打开的文档。</li> <li>获取文件或目录路径。</li> <li>将该路径传递给IDE外部工具,如格式化器、linter、编译器、版本控制命令、语言服务器或自定义CLI工具。</li> </ol> <p>过去,人们通常可以合理地假设:一旦保存操作完成,磁盘上的文件就已经包含了最新的编辑器文本。</p> <p>这种假设现在不再成立。</p> <p>IntelliJ平台现在可以先更新VFS,稍后在后台完成磁盘写入。通过IntelliJ平台文件API读取文件的代码仍能立即看到新内容。而通过<code>Path</code>、<code>File</code>、<code>Files.*</code>或外部进程读取同一文件的代码,可能需要在数据交接前显式刷新。</p> <p>官方SDK文档在<a href="https://plugins.jetbrains.com/docs/intellij/virtual-file.html#when-are-virtualfile-changes-persisted-on-disk-and-loaded-from-disk-to-vfs" target="_blank" rel="noopener">VirtualFile变更何时持久化到磁盘并从磁盘加载到VFS?</a>中涵盖了此契约。</p> <h2 class="wp-block-heading"><strong>此机制存在的原因</strong></h2> <p>对<a href="https://github.com/JetBrains/intellij-community/blob/master/platform/core-api/src/com/intellij/openapi/vfs/VirtualFile.java" target="_blank" rel="noopener"><code>VirtualFile</code></a>的写入必须在写操作下执行。至今为止,保存文件通常意味着在写操作仍开启时执行实际的文件系统写入。</p> <p>当文件系统响应缓慢、位于远程或通过WSL/Docker挂载时,这种做法开销很大。将磁盘写入移出写操作,旨在减少文档保存时的卡顿。</p> <h…
Show original
<p>Some plugin code follows this pattern:</p> <ol> <li>Save open documents.</li> <li>Get a file or directory path.</li> <li>Pass that path to something outside the IDE, such as a formatter, linter, compiler, VCS command, language server, or custom CLI tool.</li> </ol> <p>Historically, it was reasonable to assume that once the save finishes, the file on disk already contains the latest editor text.</p> <p>That is no longer guaranteed.</p> <p>The IntelliJ Platform can now update the VFS first and finish the disk write in the background a bit later. Code that reads the file through IntelliJ Platform file APIs still sees the new content immediately. Code that reads the same file through <code>Path</code>, <code>File</code>, <code>Files.*</code>, or an external process may need an explicit flush before the handoff.</p> <p>The official SDK docs cover that contract in<a href="https://plugins.jetbrains.com/docs/intellij/virtual-file.html#when-are-virtualfile-changes-persi…
Read article Original