visual-studio-code - VS Code、Git 提交和 Electron 非上下文感知本机模块
问题描述
我在 Windows 10 上使用 Git 2.26.2.windows.1 和 VS Code 1.45.1 作为提交日志消息编辑器
今天我在 VS Code 中使用git commit
并编辑了提交日志消息,然后退出了 VS Code(保存过程中的更改)。Git 完成了提交,但首先我收到了来自 VS Code 的各种 Electron 警告:
hint: Waiting for your editor to close the file...
[main 2020-06-05T15:08:31.739Z] update#setState idle
(node:1924) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
...
[main 2020-06-05T15:09:01.747Z] update#setState checking for updates
[main 2020-06-05T15:09:01.776Z] update#setState idle
这是什么意思?我的恐惧:这是否意味着 Electron 正在删除 VS Code 用作 Git 编辑器的东西,以便 Git 很快会删除 VS Code 支持?(我对 Electron 和 VS Code 实现的了解不够,无法完全解释这一点。)
解决方案
这条消息,如果它来自 VS Code 的标准输出日志,仅仅意味着 VS Code 当前使用了 Electron 团队计划弃用的功能。由于 VS Code 是使用 Electron 构建的,这是一个必须由 VS Code 开发人员解决的问题(他们很可能已经意识到这一点),并不意味着您最终会得到一个无法正常工作的编辑器. 由于 VS Code 捆绑了 Electron,只要它捆绑了一个可以使用的版本(它很可能会这样做;否则就没有意义了),你就可以使用 VS Code。
此外,Git 在技术上并不“支持” VS Code,您只是告诉 Git 使用 VS Code 来编辑您的消息。
推荐阅读
- c - 在 MIPS 中实现这个递归函数
- android - notifyDataSetChanged() 在 recyclerview 上做了什么?为什么每次我调用 notifyDataSetChanged() 时它都会不断添加新数据?
- kettle - PDI - 如何在水壶中实施 rijndael CBC 加密?
- c - C 中的文件 I/O 可能会遇到哪些错误?
- javascript - 计算星级 - ng-repeat 的替代方法
- python - cx_Freeze .exe 问题:Pygame 错误:无法打开“文件名”
- jquery - 如何从元素的 ng-init 调用 jQuery 函数?
- vue.js - vue-tables-2 彩色单元格背景
- android - 在 Play 商店中发布适用于手机和手表的 Android 应用
- php - LDAP 认证 - ldap_bind() 方法很慢