flutter / flutter/devtools

"could not read file as String: devtools_extensions/..." if pointing to different version of package without extension present

未关闭
#8,981 7 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看
bug devtools extensions P1 product-quality
主要语言
Dart
星标
1.7k
派生
404
平均合并
6 天 17 小时
30 天内合并 PR
18

描述

This is splitting off a separate issue from #8912 from https://github.com/flutter/devtools/issues/8912#issuecomment-2672370477 based on discussion in comment https://github.com/flutter/devtools/issues/8912#issuecomment-2679871965.

If you point to a version of a package that has a devtool extension, then point to another version that does not have that extension present (i.e. built), you get an error about "could not read file".

> If you point to a version of rohd which has a devtools extension present (e.g. the artifacts branch), and get it loaded up successfully, it then adds to the devtools_options.yaml file:
>
> description: This file stores settings for Dart & Flutter DevTools.
> documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
> extensions:
> - rohd: true
> If you then point to a version of rohd which does not have the devtools extension (e.g. the main branch), then when you open devtools, the rohd tab is still present but you get an error
>
> could not read file as String: devtools_extensions/rohd_0.0.1/index.html
>
> ![Image](https://github.com/user-attachments/assets/6fffbdd5-3317-4509-ac31-0213c3a46de2)
>
> Is that the intended error message when an extension is not present?

贡献指南

打开贡献指南

调研方向

通过加载带有 DevTools 扩展的包版本,然后切换到不带内置扩展的版本来复现该问题。首先跟踪扩展文件缺失时,已保存的 devtools_options.yaml 扩展条目是如何处理的。当缺失扩展时的行为和错误消息是有意设计的,并且已由回归测试覆盖或得到明确改进时,即表示完成。

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

评估

技术栈
dart
领域
tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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